2014-12-31 18:05:28 +00:00
|
|
|
#
|
|
|
|
# spec file for package subsurface
|
|
|
|
#
|
2022-01-17 21:17:28 +00:00
|
|
|
# Copyright (c) 2014-2022 Dirk Hohndel
|
2014-12-31 18:05:28 +00:00
|
|
|
#
|
|
|
|
|
2020-12-30 17:17:22 +00:00
|
|
|
%define latestVersion 4.9.10.166
|
2016-07-21 09:21:34 +00:00
|
|
|
|
2020-12-30 17:17:22 +00:00
|
|
|
%define gitVersion 166
|
2016-07-21 09:21:34 +00:00
|
|
|
|
2014-12-31 18:05:28 +00:00
|
|
|
|
|
|
|
Name: subsurfacedaily
|
2015-04-06 19:34:59 +00:00
|
|
|
Version: %latestVersion
|
2014-12-31 18:05:28 +00:00
|
|
|
Release: 0
|
|
|
|
License: GPL v2
|
|
|
|
Summary: Open source dive log
|
|
|
|
Url: http://subsurface-divelog.org
|
|
|
|
Group: Productivity/Other
|
2015-04-06 19:34:59 +00:00
|
|
|
Source: subsurface-%latestVersion.orig.tar.xz
|
2014-12-31 18:05:28 +00:00
|
|
|
Conflicts: subsurface
|
|
|
|
BuildRequires: desktop-file-utils
|
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: make
|
|
|
|
BuildRequires: asciidoc
|
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
|
|
|
BuildRequires: libtool
|
|
|
|
BuildRequires: cmake
|
|
|
|
%if 0%{?suse_version}
|
2020-04-19 03:18:41 +00:00
|
|
|
# kde4-filesystem needed for some folders not owned (% {_datadir}/icons/hicolor and others)
|
2020-09-28 18:18:00 +00:00
|
|
|
BuildRequires: kf5-filesystem
|
2014-12-31 18:05:28 +00:00
|
|
|
%endif
|
|
|
|
BuildRequires: libzip-devel
|
|
|
|
BuildRequires: libxml2-devel
|
|
|
|
BuildRequires: libxslt-devel
|
2016-07-21 09:21:34 +00:00
|
|
|
BuildRequires: libssh2-devel
|
|
|
|
BuildRequires: libcurl-devel
|
2020-04-19 03:18:41 +00:00
|
|
|
BuildRequires: libgit2-devel
|
2020-12-30 17:17:22 +00:00
|
|
|
BuildRequires: libmtp-devel
|
2014-12-31 18:05:28 +00:00
|
|
|
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
|
2015-04-06 19:34:59 +00:00
|
|
|
BuildRequires: netpbm-devel
|
2014-12-31 18:05:28 +00:00
|
|
|
BuildRequires: openssl-devel
|
|
|
|
BuildRequires: libsqlite3x-devel
|
|
|
|
BuildRequires: libusbx-devel
|
2020-09-19 22:12:58 +00:00
|
|
|
BuildRequires: bluez-libs-devel
|
2014-12-31 18:05:28 +00:00
|
|
|
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
|
2016-07-21 09:21:34 +00:00
|
|
|
BuildRequires: qt5-qtconnectivity-devel
|
|
|
|
BuildRequires: qt5-qtlocation-devel
|
2020-04-19 03:18:41 +00:00
|
|
|
BuildRequires: libappstream-glib
|
2014-12-31 18:05:28 +00:00
|
|
|
%else
|
|
|
|
BuildRequires: update-desktop-files
|
|
|
|
BuildRequires: libopenssl-devel
|
|
|
|
BuildRequires: sqlite3-devel
|
|
|
|
BuildRequires: libusb-1_0-devel
|
2020-09-19 22:12:58 +00:00
|
|
|
BuildRequires: bluez-devel
|
2014-12-31 18:05:28 +00:00
|
|
|
BuildRequires: libqt5-qtbase-devel
|
|
|
|
BuildRequires: libqt5-qtsvg-devel
|
2015-04-06 19:34:59 +00:00
|
|
|
BuildRequires: libqt5-linguist
|
2014-12-31 18:05:28 +00:00
|
|
|
BuildRequires: libqt5-linguist-devel
|
|
|
|
BuildRequires: libqt5-qttools-devel
|
|
|
|
BuildRequires: libQt5WebKit5-devel
|
|
|
|
BuildRequires: libQt5WebKitWidgets-devel
|
|
|
|
BuildRequires: libqt5-qtscript-devel
|
|
|
|
BuildRequires: libqt5-qtdeclarative-devel
|
2016-07-21 09:21:34 +00:00
|
|
|
BuildRequires: libqt5-qtconnectivity-devel
|
|
|
|
BuildRequires: libqt5-qtlocation-devel
|
2017-10-20 14:25:24 +00:00
|
|
|
BuildRequires: libqt5-qtlocation-private-headers-devel
|
2014-12-31 18:05:28 +00:00
|
|
|
%endif
|
2015-04-06 19:34:59 +00:00
|
|
|
# Recommends Qt5 translations package
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
Recommends: libqt5-qttranslations
|
|
|
|
%endif
|
|
|
|
%if 0%{?fedora_version} >= 21
|
|
|
|
Recommends: qt5-qttranslations
|
|
|
|
%endif
|
2017-10-20 14:43:03 +00:00
|
|
|
# Recommends debug info (and debug sources, for openSUSE) for daily build
|
2020-12-30 17:17:22 +00:00
|
|
|
%if "%{name}" == "subsurfacedaily"
|
2017-10-20 14:43:03 +00:00
|
|
|
Recommends: %{name}-debuginfo
|
|
|
|
%if 0%{?suse_version}
|
|
|
|
Recommends: %{name}-debugsource
|
|
|
|
%endif
|
|
|
|
%endif
|
2014-12-31 18:05:28 +00:00
|
|
|
BuildRoot: %{_tmppath}/subsurface%{version}-build
|
|
|
|
|
|
|
|
%description
|
2017-10-20 14:25:24 +00:00
|
|
|
This is the official Subsurface test build, including our own custom libdivecomputer
|
2014-12-31 18:05:28 +00:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
2016-07-21 09:21:34 +00:00
|
|
|
mkdir -p install-root
|
|
|
|
(cd libdivecomputer ; \
|
|
|
|
autoreconf --install ; \
|
|
|
|
./configure --prefix=$RPM_BUILD_DIR/install-root --disable-shared --disable-examples ; \
|
|
|
|
make %{?_smp_mflags} ; \
|
|
|
|
make install)
|
2017-10-20 14:25:24 +00:00
|
|
|
( cd googlemaps ; mkdir -p build ; cd build ; \
|
|
|
|
qmake-qt5 "INCLUDEPATH=$INSTALL_ROOT/include" ../googlemaps.pro ; \
|
|
|
|
make -j4 )
|
2015-04-06 19:34:59 +00:00
|
|
|
(mkdir subsurface-build ; cd subsurface-build ; \
|
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DLRELEASE=lrelease-qt5 \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=%{buildroot}/usr \
|
2016-07-21 09:21:34 +00:00
|
|
|
-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 \
|
|
|
|
-DCMAKE_C_FLAGS:STRING="%optflags" \
|
|
|
|
-DCMAKE_CXX_FLAGS:STRING="%optflags" \
|
|
|
|
-DNO_PRINTING=OFF \
|
|
|
|
.. ; \
|
2015-04-06 19:34:59 +00:00
|
|
|
make VERBOSE=1 %{?_smp_mflags} subsurface)
|
2014-12-31 18:05:28 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
mkdir -p %{buildroot}/%{_libdir}
|
2017-10-20 14:25:24 +00:00
|
|
|
(cd googlemaps/build ; make install_target INSTALL_ROOT=$RPM_BUILD_ROOT )
|
2015-04-06 19:34:59 +00:00
|
|
|
(cd subsurface-build ; make VERBOSE=1 install )
|
2017-10-20 14:43:03 +00:00
|
|
|
install subsurface.debug %{buildroot}%{_bindir}
|
2020-04-19 03:18:41 +00:00
|
|
|
install appdata/subsurface.appdata.xml %{buildroot}%{_datadir}/metainfo
|
2014-12-31 18:05:28 +00:00
|
|
|
%if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version}
|
|
|
|
desktop-file-install --dir=%{buildroot}/%{_datadir}/applications subsurface.desktop
|
2020-04-19 03:18:41 +00:00
|
|
|
cat %{buildroot}%{_datadir}/metainfo/subsurface.appdata.xml
|
|
|
|
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/metainfo/subsurface.appdata.xml
|
2014-12-31 18:05:28 +00:00
|
|
|
%else
|
|
|
|
%suse_update_desktop_file -r subsurface Utility DesktopUtility
|
|
|
|
%endif
|
|
|
|
%fdupes %{buildroot}
|
|
|
|
|
|
|
|
%post
|
|
|
|
%desktop_database_post
|
|
|
|
/sbin/ldconfig
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%desktop_database_post
|
|
|
|
/sbin/ldconfig
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2017-11-04 17:05:35 +00:00
|
|
|
%doc gpl-2.0.txt README.md ReleaseNotes/ReleaseNotes.txt
|
2016-07-21 09:21:34 +00:00
|
|
|
%{_bindir}/subsurface*
|
2017-10-20 14:25:24 +00:00
|
|
|
%{_libdir}/qt5/plugins/geoservices/libqtgeoservices_googlemaps.so
|
2014-12-31 18:05:28 +00:00
|
|
|
%{_datadir}/applications/subsurface.desktop
|
2020-04-19 03:18:41 +00:00
|
|
|
%dir %{_datadir}/metainfo
|
|
|
|
%{_datadir}/metainfo/subsurface.appdata.xml
|
2014-12-31 18:05:28 +00:00
|
|
|
%{_datadir}/icons/hicolor/*/apps/subsurface-icon.*
|
|
|
|
%{_datadir}/subsurface/
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|