Created
October 20, 2015 20:34
-
-
Save armando-basile/a7ec045fc0f0cd47f393 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%define archivename monosim | |
%define comexbase comex-base | |
%define comexfolder comex | |
Summary: Qt user interface for comex project | |
Name: monosim-qt | |
Version: 2.0.1 | |
Release: %mkrel 1 | |
License: GPLv2 | |
#ExcludeArch: ppc64 | |
Group: Communications/Mobile | |
Source: https://github.com/armando-basile/%archivename/archive/%{name}-%{version}.tar.gz | |
# get sources from https://github.com/armando-basile/%archivename/archive/%{version}.tar.gz | |
# and rename folder from monosim to monosim-qt | |
URL: https://github.com/armando-basile/%archivename/ | |
BuildArch: noarch | |
BuildRequires: mono-devel | |
BuildRequires: log4net-devel | |
BuildRequires: %{comexbase} >= 0.1.9 | |
BuildRequires: qyoto-devel | |
BuildRequires: qyoto | |
#BuildRequires: pinentry-qt4 | |
BuildRequires: pkgconfig | |
Requires: mono | |
Requires: log4net | |
Requires: %{comexbase} >= 0.1.9 | |
Requires: qyoto | |
Requires: qyoto-devel | |
%description | |
Is Qt user interface of a simple application that can be used | |
to manage sim card contacts using PC/SC standard readers or | |
smartmouse phoenix serial reader. | |
%prep | |
%setup -q | |
%build | |
# build commands | |
cd %{_builddir}/%{name}-%{version}/build-linux | |
ln -s %{_prefix}/lib/%{comexfolder}/%comexbase.dll %{_builddir}/%{name}-%{version}/%comexbase.dll | |
bash ./build-lnx-monosim-qt.sh | |
%install | |
# create folders if not exists | |
mkdir -p %{buildroot}%{_prefix}/lib/%{name} | |
mkdir -p %{buildroot}%{_bindir} | |
mkdir -p %{buildroot}%{_datadir}/pixmaps | |
mkdir -p %{buildroot}%{_datadir}/applications | |
mkdir -p %{buildroot}%{_datadir}/%{name} | |
mkdir -p %{buildroot}%{_docdir}/%{name} | |
# install commands | |
cp -f %{_builddir}/%{name}-%{version}/%{name}/bin/Debug/%{name}.exe* %{buildroot}%{_prefix}/lib/%{name}/ | |
cp -rf %{_builddir}/%{name}-%{version}/%{name}/bin/Debug/Languages %{buildroot}%{_datadir}/%{name}/ | |
cp -f %{_builddir}/%{name}-%{version}/resources/monosim_48.png %{buildroot}%{_datadir}/pixmaps/%{name}.png | |
cp -f %{_builddir}/%{name}-%{version}/%{name}/Resources/%{name} %{buildroot}%{_datadir}/applications/%{name}.desktop | |
ln -s %{_prefix}/lib/%{comexfolder}/%comexbase.dll %{buildroot}%{_prefix}/lib/%{name}/%comexbase.dll | |
# generate bin script | |
( | |
cat <<EOF | |
#!/bin/sh | |
exec mono "%{_prefix}/lib/%{name}/%{name}.exe" "\$@" | |
EOF | |
) >> %{buildroot}%{_bindir}/%{name} | |
chmod 775 %{buildroot}%{_bindir}/%{name} | |
%files | |
%doc copying.gpl %{name}/readme | |
%{_bindir}/%{name} | |
%_prefix/lib/%{name}/%{name}.exe* | |
%_prefix/lib/%{name}/%comexbase.dll | |
%{_datadir}/%{name}/Languages/* | |
%{_datadir}/pixmaps/%{name}.png | |
%{_datadir}/applications/%{name}.desktop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment