diff options
author | Guillaume GARDET <guillaume.gardet@free.fr> | 2016-07-21 11:21:34 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-07-23 10:54:20 +0900 |
commit | 493fefef712241f208fa1f3f939579dfe3d66dcf (patch) | |
tree | b12f7d8f67ce1019c23f28e78a063f32508ac08b /packaging/OBS/subsurfacedaily.spec | |
parent | 0b5ef8b73f88e17c5721c4e5dae381922cbe45c9 (diff) | |
download | subsurface-493fefef712241f208fa1f3f939579dfe3d66dcf.tar.gz |
Update OBS spec file to fix build
Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'packaging/OBS/subsurfacedaily.spec')
-rw-r--r-- | packaging/OBS/subsurfacedaily.spec | 60 |
1 files changed, 46 insertions, 14 deletions
diff --git a/packaging/OBS/subsurfacedaily.spec b/packaging/OBS/subsurfacedaily.spec index b39149c65..7eaa2f963 100644 --- a/packaging/OBS/subsurfacedaily.spec +++ b/packaging/OBS/subsurfacedaily.spec @@ -4,7 +4,12 @@ # Copyright (c) 2014 Dirk Hohndel # -%define latestVersion 4.4.1.363 +%define latestVersion 4.5.2.1475 + + +%define gitVersion 1475 + + Name: subsurfacedaily Version: %latestVersion @@ -31,6 +36,9 @@ BuildRequires: kde4-filesystem BuildRequires: libzip-devel BuildRequires: libxml2-devel BuildRequires: libxslt-devel +BuildRequires: libssh2-devel +BuildRequires: libcurl-devel +BuildRequires: grantlee5-devel %if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version} BuildRequires: netpbm-devel BuildRequires: openssl-devel @@ -47,6 +55,8 @@ BuildRequires: qt5-qtbase-postgresql BuildRequires: qt5-qtbase-ibase BuildRequires: qt5-qtbase-odbc BuildRequires: qt5-qtbase-tds +BuildRequires: qt5-qtconnectivity-devel +BuildRequires: qt5-qtlocation-devel %else BuildRequires: update-desktop-files BuildRequires: libopenssl-devel @@ -61,6 +71,8 @@ BuildRequires: libQt5WebKit5-devel BuildRequires: libQt5WebKitWidgets-devel BuildRequires: libqt5-qtscript-devel BuildRequires: libqt5-qtdeclarative-devel +BuildRequires: libqt5-qtconnectivity-devel +BuildRequires: libqt5-qtlocation-devel %endif # Recommends Qt5 translations package %if 0%{?suse_version} @@ -78,31 +90,51 @@ This is the official Subsurface build, including our own custom libdivecomputer %setup -q %build -(cd libdivecomputer ; autoreconf --install ; ./configure --disable-shared ; make %{?_smp_mflags} ) -(cd libgit2; mkdir build; cd build; cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release -DBUILD_CLAR=OFF .. ; make ) +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) (mkdir marble-build ; cd marble-build ; \ - cmake -DQTONLY=ON -DQT5BUILD=ON \ + cmake -DCMAKE_INSTALL_PREFIX=$RPM_BUILD_DIR/install-root \ + -DQTONLY=ON -DQT5BUILD=ON \ -DBUILD_MARBLE_APPS=OFF -DBUILD_MARBLE_EXAMPLES=OFF \ -DBUILD_MARBLE_TESTS=OFF -DBUILD_MARBLE_TOOLS=OFF \ -DBUILD_TESTING=OFF -DWITH_DESIGNER_PLUGIN=OFF \ - -DBUILD_WITH_DBUS=OFF ../marble-source ; \ + -DBUILD_WITH_DBUS=OFF ../marble-source \ + -DCMAKE_C_FLAGS:STRING="%optflags" \ + -DCMAKE_CXX_FLAGS:STRING="%optflags" ; \ make %{?_smp_mflags} ; \ - ln -s src/lib/marble lib ; \ - mkdir include ; cd include ; for i in `find ../../marble-source -name \*.h` ; do ln -s -f $i . ; done ; \ - ln -s -f . marble ) + cd src/lib/marble ; make install ; ) (mkdir subsurface-build ; cd subsurface-build ; \ cmake -DCMAKE_BUILD_TYPE=Release \ - -DLIBDCDEVEL=$(pwd)/../libdivecomputer -DLIBDCSTATIC=1 \ - -DLIBGIT2DEVEL=$(pwd)/../libgit2 -DLIBGIT2STATIC=1 \ - -DLIBMARBLEDEVEL=$(pwd)/../marble-build \ -DLRELEASE=lrelease-qt5 \ -DCMAKE_INSTALL_PREFIX=%{buildroot}/usr \ - $(pwd)/.. ; \ + -DLIBDIVECOMPUTER_INCLUDE_DIR=$RPM_BUILD_DIR/install-root/include \ + -DLIBGIT2_INCLUDE_DIR=$RPM_BUILD_DIR/install-root/include \ + -DMARBLE_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 \ + -DMARBLE_LIBRARIES=$RPM_BUILD_DIR/install-root/lib/libssrfmarblewidget.so \ + -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 subsurface-build ; make VERBOSE=1 install ) +install $RPM_BUILD_DIR/install-root/lib/libssrf* %{buildroot}/%{_libdir} %if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version} desktop-file-install --dir=%{buildroot}/%{_datadir}/applications subsurface.desktop %else @@ -121,11 +153,11 @@ desktop-file-install --dir=%{buildroot}/%{_datadir}/applications subsurface.desk %files %defattr(-,root,root) %doc gpl-2.0.txt README ReleaseNotes/ReleaseNotes.txt -%{_bindir}/subsurface +%{_bindir}/subsurface* %{_datadir}/applications/subsurface.desktop %{_datadir}/icons/hicolor/*/apps/subsurface-icon.* %{_datadir}/subsurface/ -/usr/lib*/libssrfmarblewidget.so* +%{_libdir}/libssrfmarblewidget.so* %changelog |