# # spec file for package subsurface # # Copyright (c) 2014 Dirk Hohndel # %define latestVersion 4.8.5 %define gitVersion 0 Name: subsurface Version: %latestVersion Release: 1.1%{?dist} License: GPL v2 Summary: Open source dive log Url: http://subsurface-divelog.org Group: Productivity/Other Source: subsurface-%latestVersion.orig.tar.xz Conflicts: subsurfacedaily BuildRequires: desktop-file-utils BuildRequires: fdupes BuildRequires: gcc-c++ BuildRequires: make BuildRequires: asciidoc BuildRequires: autoconf BuildRequires: automake BuildRequires: libtool BuildRequires: cmake BuildRequires: libzip-devel BuildRequires: libxml2-devel BuildRequires: libxslt-devel BuildRequires: libssh2-devel BuildRequires: libcurl-devel BuildRequires: grantlee-qt5-devel BuildRequires: netpbm-devel BuildRequires: openssl-devel BuildRequires: libsqlite3x-devel BuildRequires: libusbx-devel BuildRequires: qt5-qtbase-devel BuildRequires: qt5-qttools-devel BuildRequires: qt5-qtwebkit-devel BuildRequires: qt5-qtsvg-devel BuildRequires: qt5-qtscript-devel BuildRequires: qt5-qtdeclarative-devel BuildRequires: qt5-qtbase-mysql BuildRequires: qt5-qtbase-postgresql BuildRequires: qt5-qtbase-ibase BuildRequires: qt5-qtbase-odbc BuildRequires: qt5-qtbase-tds BuildRequires: qt5-qtconnectivity-devel BuildRequires: qt5-qtlocation-devel BuildRequires: libappstream-glib Recommends: qt5-qttranslations BuildRoot: %{_tmppath}/subsurface%{version}-build %description This is the official Subsurface build, including our own custom libdivecomputer and libssrfmarblewidget %prep %setup -q %build mkdir -p install-root (cd libdivecomputer ; \ autoreconf --install ; \ ./configure --prefix=$RPM_BUILD_DIR/install-root --disable-shared --disable-examples ; \ make %{?_smp_mflags} ; \ make install) (cd libgit2; mkdir build; cd build; \ cmake -DCMAKE_INSTALL_PREFIX=$RPM_BUILD_DIR/install-root -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_CLAR=OFF \ -DCMAKE_C_FLAGS:STRING="%optflags" \ -DCMAKE_CXX_FLAGS:STRING="%optflags" \ .. ; \ make %{?_smp_mflags} ; \ make install) ( cd googlemaps ; mkdir -p build ; cd build ; \ qmake-qt5 "INCLUDEPATH=$INSTALL_ROOT/include" ../googlemaps.pro ; \ make -j4 ) (mkdir subsurface-build ; cd subsurface-build ; \ cmake -DCMAKE_BUILD_TYPE=Release \ -DLRELEASE=lrelease-qt5 \ -DCMAKE_INSTALL_PREFIX=%{buildroot}/usr \ -DLIBDIVECOMPUTER_INCLUDE_DIR=$RPM_BUILD_DIR/install-root/include \ -DLIBGIT2_INCLUDE_DIR=$RPM_BUILD_DIR/install-root/include \ -DLIBDIVECOMPUTER_LIBRARIES=$RPM_BUILD_DIR/install-root/lib/libdivecomputer.a \ -DLIBGIT2_LIBRARIES=$RPM_BUILD_DIR/install-root/lib/libgit2.a \ -DUSE_LIBGIT23_API=ON \ -DCMAKE_C_FLAGS:STRING="%optflags" \ -DCMAKE_CXX_FLAGS:STRING="%optflags" \ -DNO_PRINTING=OFF \ .. ; \ make VERBOSE=1 %{?_smp_mflags} subsurface) %install mkdir -p %{buildroot}/%{_libdir} (cd googlemaps/build ; make install_target INSTALL_ROOT=$RPM_BUILD_ROOT ) (cd subsurface-build ; make VERBOSE=1 install ) install subsurface.debug %{buildroot}%{_bindir} install appdata/subsurface.appdata.xml %{buildroot}%{_datadir}/metainfo desktop-file-install --dir=%{buildroot}/%{_datadir}/applications subsurface.desktop appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/subsurface.appdata.xml %fdupes %{buildroot} %post /sbin/ldconfig update-desktop-database &> /dev/null ||: touch --no-create %{_datadir}/icons/hicolor || : if [ -x %{_bindir}/gtk-update-icon-cache ] ; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : fi %postun /sbin/ldconfig update-desktop-database &> /dev/null ||: touch --no-create %{_datadir}/icons/hicolor || : if [ -x %{_bindir}/gtk-update-icon-cache ] ; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : fi %files %defattr(-,root,root) %doc gpl-2.0.txt README.md ReleaseNotes/ReleaseNotes.txt %{_bindir}/subsurface* %{_libdir}/qt5/plugins/geoservices/libqtgeoservices_googlemaps.so %{_datadir}/applications/subsurface.desktop %dir %{_datadir}/metainfo %{_datadir}/metainfo/subsurface.appdata.xml %{_datadir}/icons/hicolor/*/apps/subsurface-icon.* %{_datadir}/subsurface/ %changelog * Fri Feb 8 2019 benjamin@benkay.net - Repackaged for Fedora 29 * Sat Dec 30 2017 subsurface-owner@subsurface-divelog.org - trigger new build with patch for Qt 5.10 so Tumbleweed can work * Fri Nov 24 2017 subsurface-owner@subsurface-divelog.org - trigger new builds since Fedora 26 has switched from Qt 5.7->5.9 which appears to cause issues with the googlemaps plugin * Mon Oct 23 2017 guillaume@opensuse.org - Update to 4.7.1 - Remove all unused patches * Tue Jun 20 2017 guillaume@opensuse.org - Add fix_qt_version_in_cmake.patch to fix QT detection and get back bluetooth support - Remove no more needed grantlee.diff patch * Tue Feb 28 2017 adrian@suse.de - install raster icon as well to support older desktops (and AppImage) - adding an AppImage build recepie * Thu Jun 18 2015 guillaume@opensuse.org - Improves SPEC file and reformat it with 'osc service localrun format_spec_file' * Thu Jun 18 2015 guillaume@opensuse.org - Version 4.4.2