diff --git a/.gitignore b/.gitignore index e69de29..5fd4204 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +datovka-*.tar.gz diff --git a/datovka.spec b/datovka.spec new file mode 100644 index 0000000..f4de75f --- /dev/null +++ b/datovka.spec @@ -0,0 +1,71 @@ +Name: datovka +Version: 2.1.2 +Release: 2%{?dist} +Summary: A free graphical interface for Czech Databox (Datové schránky) +Group: Applications/Communications +License: LGPLv2+ +URL: http://labs.nic.cz/datove-schranky/ +Source0: http://www.nic.cz/public_media/datove_schranky/releases/datovka-%{version}/src/%{name}-%{version}.tar.gz +BuildArch: noarch +Requires: python-dslib >= 2.0, python-reportlab, python-sqlalchemy +Requires: pygtk2, python-pyasn1 +BuildRequires: python-setuptools, desktop-file-utils + +%description +GUI application allowing access to Czech Databox - an electronic communication +interface endorsed by the Czech government. + +%prep +%setup -q +sed -i 's/Office/Office;/g' %{name}.desktop + +%build +CFLAGS="%{optflags}" %{__python} setup.py build + +%install +%{__python} setup.py install --single-version-externally-managed \ + --root=%{buildroot} + +desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop + +# move docs to right place +mkdir -p %{buildroot}%{_docdir}/%{name}-%{version} +mv %{buildroot}%{_datadir}/%{name}/doc/* %{buildroot}%{_docdir}/%{name}-%{version} +rmdir %{buildroot}%{_datadir}/%{name}/doc + +# remove hashbangs +pushd %{buildroot}%{python_sitelib}/%{name} +for f in *.py +do + sed -i '/^[ \t]*#!\/usr\/bin\/env/ d' $f +done +popd + +%find_lang %{name} + +%post +%{_bindir}/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : + +%postun +if [ $1 -eq 0 ] ; then + %{_bindir}/touch --no-create %{_datadir}/icons/hicolor &>/dev/null + %{_bindir}/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || : +fi + +%posttrans +%{_bindir}/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || : + +%files -f %{name}.lang +%doc LICENSE README.txt +%{python_sitelib}/* +%{_bindir}/%{name} +%{_datadir}/%{name} +%{_datadir}/applications/* +%{_datadir}/icons/hicolor/* + +%changelog +* Tue Sep 25 2012 Jaroslav Škarvada - 2.1.2-2 +- Replaced some hardcoded paths by macros + +* Wed Sep 05 2012 Jaroslav Škarvada - 2.1.2-1 +- Initial version diff --git a/sources b/sources index e69de29..c0c9ff6 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +a4f62faa9481c458906fad4677919488 datovka-2.1.2.tar.gz