#global snapdate 20120717
#%global snaphash 5d07303
#global snapver {snapdate}.git{snaphash}
%global libdc_version 0.4.1
Name: subsurface
Version: 4.0.2
#Release: 1.{snapver}{?dist}
Release: 2%{?dist}
Summary: A feature-full divelog in Qt
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
Source0: http://subsurface.hohndel.org/downloads/Subsurface-%{version}.tgz
BuildRequires: libdivecomputer-devel == %{libdc_version}
BuildRequires: libdivecomputer-static == %{libdc_version}
BuildRequires: qt-devel
BuildRequires: libudev-devel
BuildRequires: marble-devel
BuildRequires: libxml2-devel
BuildRequires: libxslt-devel
BuildRequires: libsqlite3x-devel
BuildRequires: libzip-devel
BuildRequires: desktop-file-utils
BuildRequires: asciidoc
# 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}
Requires: marble
%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 Subsurface-%{version}
%build
qmake-qt4
make %{?_smp_mflags}
%install
make install prefix=$RPM_BUILD_ROOT/%{_prefix}
desktop-file-install \
--delete-original \
--dir=$RPM_BUILD_ROOT%{_datadir}/applications \
$RPM_BUILD_ROOT/%{_datadir}/applications/%{name}.desktop
%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 ReleaseNotes.txt
%{_bindir}/subsurface
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/scalable/apps/%{name}-icon.svg
%{_datadir}/%{name}/
%{_mandir}/man1/%{name}.1.*
%changelog
* Thu Feb 06 2014 Pierre-Yves Chibon <pingou@pingoured.fr> - 4.0.2-1
- Rebuild for soname bump in libmarble
* Fri Jan 10 2014 Pierre-Yves Chibon <pingou@pingoured.fr> - 4.0.2-1
- Update to release 4.0.2
* Sun Dec 15 2013 Pierre-Yves Chibon <pingou@pingoured.fr> - 4.0-1
- Update to release 4.0
* Mon Dec 09 2013 Pierre-Yves Chibon <pingou@pingoured.fr> - 3.9.2-1
- Update to 3.9.2 which is the second beta release before 4.0
* Wed Aug 07 2013 Pierre-Yves Chibon <pingou@pingoured.fr> - 3.1.1-3
- Rebuild to fix broken dependency
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Mon Jul 01 2013 Pierre-Yves Chibon <pingou@pingoured.fr> - 3.1.1-1
- Update to 3.1.1
* Fri May 17 2013 Pierre-Yves Chibon <pingou@pingoured.fr> - 3.1-1
- Update to 3.1
- Add BR on sqlite-devel
* Mon Mar 04 2013 Pierre-Yves Chibon <pingou@pingoured.fr> - 3.0.2-1
- Update to 3.0.2
* Thu Feb 21 2013 Pierre-Yves Chibon <pingou@pingoured.fr> - 3.0-1
- Update to 3.0 which adds the dependency on osm-gps-map and a BR on
libzip-devel
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Tue Oct 23 2012 Pierre-Yves Chibon <pingou@pingoured.fr> - 2.1-1
- Update to 2.1 which brings among other language support
* Thu Oct 18 2012 Pierre-Yves Chibon <pingou@pingoured.fr> - 2.0.1-3
- Use $$RPM_BUILD_ROOT everywhere
- The license is GPLv2 only
* Wed Oct 17 2012 Pierre-Yves Chibon <pingou@pingoured.fr> - 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 <pingou@pingoured.fr> - 2.0.1-1
- Update to release 2.0.1
* Wed Jul 18 2012 Pierre-Yves Chibon <pingou@pingoured.fr> - 1.2-3.20120717.git7fe652a
- BR: libdivecomputer-static
* Tue Jul 17 2012 Pierre-Yves Chibon <pingou@pingoured.fr> - 1.2-2.20120717.git7fe652a
- Git snapshot
* Mon Jul 16 2012 Pierre-Yves Chibon <pingou@pingoured.fr> - 1.2-1
- Initial packaging work for Fedora