Created
October 19, 2015 22:11
-
-
Save armando-basile/f1e2463860dff368c6a4 to your computer and use it in GitHub Desktop.
spec file for monosim-gtk
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: GTK user interface for comex project | |
Name: monosim-gtk | |
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-gtk | |
URL: https://github.com/armando-basile/%archivename/ | |
BuildArch: noarch | |
BuildRequires: mono-devel | |
BuildRequires: log4net-devel | |
BuildRequires: %{comexbase} >= 0.1.9 | |
BuildRequires: gtk-sharp2-devel | |
BuildRequires: glade-sharp2 | |
BuildRequires: pkgconfig | |
Requires: mono | |
Requires: log4net | |
Requires: %{comexbase} >= 0.1.9 | |
Requires: gtk-sharp2 | |
Requires: glade-sharp2 | |
Requires: glib-sharp2 | |
%description | |
Is GTK 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-gtk.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