Created
October 19, 2015 15:21
-
-
Save armando-basile/ddf646165af8fe261385 to your computer and use it in GitHub Desktop.
spec file for comex-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 comex-project | |
%define comexbase comex-base | |
%define comexfolder comex | |
Summary: GTK user interface for comex project | |
Name: comex-gtk | |
Version: 0.1.9 | |
Release: %mkrel 1 | |
License: GPLv2 | |
#ExcludeArch: ppc64 | |
Group: Office/Utilities | |
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 comex-project to comex-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 exchange | |
data with smartcards using PC/SC standard readers or smartmouse | |
phoenix serial reader. | |
%prep | |
%setup -q | |
%build | |
# build commands | |
cd %{_builddir}/%{name}-%{version}/build-linux | |
bash ./build-lnx-comex-gtk.sh | |
%install | |
# create folders if not exists | |
mkdir -p %{buildroot}%{_prefix}/lib/%{comexfolder} | |
mkdir -p %{buildroot}%{_bindir} | |
mkdir -p %{buildroot}%{_datadir}/pixmaps | |
mkdir -p %{buildroot}%{_datadir}/applications | |
mkdir -p %{buildroot}%{_docdir}/%{name} | |
# install commands | |
cp -f %{_builddir}/%{name}-%{version}/%{name}/bin/Debug/%{name}.exe* %{buildroot}%{_prefix}/lib/%{comexfolder}/ | |
cp -f %{_builddir}/%{name}-%{version}/resources/Images/comex_48.png %{buildroot}%{_datadir}/pixmaps/%{name}.png | |
cp -f %{_builddir}/%{name}-%{version}/%{name}/Resources/%{name} %{buildroot}%{_datadir}/applications/%{name}.desktop | |
# generate bin script | |
( | |
cat <<EOF | |
#!/bin/sh | |
exec mono "%{_prefix}/lib/%{comexfolder}/%{name}.exe" "\$@" | |
EOF | |
) >> %{buildroot}%{_bindir}/%{name} | |
chmod 775 %{buildroot}%{_bindir}/%{name} | |
%files | |
%doc copying.gpl %{name}/readme | |
%{_bindir}/%{name} | |
%_prefix/lib/%{comexfolder}/%{name}.exe* | |
%{_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