#global snapdate 20120717 %global snaphash 5d07303 #global snapver {snapdate}.git{snaphash} %global libdc_version 0.2.0 Name: subsurface Version: 2.0.1 #Release: 1.{snapver}{?dist} Release: 3%{?dist} Summary: Rough divelog in C and Gtk License: GPLv2 URL: https://github.com/torvalds/subsurface #Source0: torvalds-subsurface-v1.2-0-gc912e1f.tar.gz # Sources generated via: # git clone https://github.com/torvalds/subsurface.git && cd subsurface # git archive --format=tar --prefix=subsurface-7fe652a/ 7fe652a | xz -z > subsurface-1.2-20120717git7fe652a.tar.xz #Source0: subsurface-1.2-20120717git7fe652a.tar.xz # Retrieved from https://github.com/torvalds/subsurface/tarball/v2.0.1 Source0: torvalds-subsurface-v%{version}-0-g14856aa.tar.gz BuildRequires: libdivecomputer-devel == %{libdc_version} BuildRequires: libdivecomputer-static == %{libdc_version} BuildRequires: libxml2-devel, gtk2-devel BuildRequires: GConf2-devel, libxslt-devel BuildRequires: desktop-file-utils # Since we build against the static libdivecomputer # I want to have a hard constraint on the version compiled against # I'll update both when needed. Requires: libdivecomputer == %{libdc_version} %description Subsurface is an open source dive log program. Developed in C using GTK+-2.0, glib-2 and libxml-2, it relies on libdivecomputer to connect to the dive computer and thus support all the dive computer supported by libdivecomputer. %prep %setup -q -n torvalds-%{name}-%{snaphash} %build make %{?_smp_mflags} %install make install DESTDIR=$RPM_BUILD_ROOT desktop-file-install \ --delete-original \ --dir=$RPM_BUILD_ROOT%{_datadir}/applications \ $RPM_BUILD_ROOT/%{_datadir}/applications/%{name}.desktop chmod -x $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/scalable/apps/subsurface.svg %post /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : %postun if [ $1 -eq 0 ] ; then /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null /usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || : fi %posttrans /usr/bin/gtk-update-icon-cache -f %{_datadir}/icons/hicolor &>/dev/null || : %files %doc README Documentation %{_bindir}/subsurface %{_datadir}/applications/%{name}.desktop %{_datadir}/icons/hicolor/scalable/apps/%{name}.svg %{_datadir}/%{name}/ %{_mandir}/man1/%{name}.1.* %changelog * Thu Oct 18 2012 Pierre-Yves Chibon - 2.0.1-3 - Use $$RPM_BUILD_ROOT everywhere - The license is GPLv2 only * Wed Oct 17 2012 Pierre-Yves Chibon - 2.0.1-2 - Use the macro libdc_version in the R and BR - Add desktop-file-utils as BR * Wed Oct 10 2012 Pierre-Yves Chibon - 2.0.1-1 - Update to release 2.0.1 - * Wed Jul 18 2012 Pierre-Yves Chibon - 1.2-3.20120717.git7fe652a - BR: libdivecomputer-static * Tue Jul 17 2012 Pierre-Yves Chibon - 1.2-2.20120717.git7fe652a - Git snapshot * Mon Jul 16 2012 Pierre-Yves Chibon - 1.2-1 - Initial packaging work for Fedora