[med-svn] [libquazip] 01/04: Change the buildsystem from qmake to cmake
Stefan Ahlers
justin-time-guest at moszumanska.debian.org
Sun Jan 3 22:36:42 UTC 2016
This is an automated email from the git hooks/post-receive script.
justin-time-guest pushed a commit to branch master
in repository libquazip.
commit 3944eaf5f2dad8e114d067acf5c808fb56bea119
Author: Stefan Ahlers <stef.ahlers at t-online.de>
Date: Sun Jan 3 22:36:16 2016 +0100
Change the buildsystem from qmake to cmake
This commit also changes the lib version suffix from -qt5 to 5
---
debian/control | 3 +--
debian/rules | 78 ++++++++++++++--------------------------------------------
2 files changed, 20 insertions(+), 61 deletions(-)
diff --git a/debian/control b/debian/control
index d6abdfe..28fed45 100644
--- a/debian/control
+++ b/debian/control
@@ -6,10 +6,9 @@ Section: libs
Priority: optional
Build-Depends: debhelper (>= 9),
libqt4-dev (>= 4:4.7.4),
- qt4-qmake (>= 4:4.7.4),
+ cmake,
qtbase5-dev,
qtchooser,
- qt5-qmake,
libxext-dev,
zlib1g-dev
Standards-Version: 3.9.6
diff --git a/debian/rules b/debian/rules
index 254306f..c244748 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,96 +2,56 @@
# -*- makefile -*-
# This code is released under the BSD-3 Clause
# Created by Eric Maeker, 2012 - 2014
+# Modified by Stefan Ahlers, 2016
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# Enable multiarch builds & prepare qmake vars
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
-QMAKE_GENERIC := -r LIBS+=-lz LIB_ARCH="$(DEB_HOST_MULTIARCH)"
-QMAKE_STATIC := CONFIG+=staticlib
-QT4_SO_PATH = build/qt4/so
-QT5_SO_PATH = build/qt5/so
-QT4_STATIC_PATH = build/qt4/static
-QT5_STATIC_PATH = build/qt5/static
-PATH_TO_SOURCE = ../../..
+QT4_PATH = build/qt4
+QT5_PATH = build/qt5
# This has to be exported to make some magic below work.
-export DH_OPTIONS
-export NO_DOCS := no
-export QMAKE_LIBDIR=/usr/lib
%:
- dh $@ --buildsystem=qmake --parallel #--with migrations
+ dh $@ --parallel #--with migrations
override_dh_auto_configure:
- mkdir -p $(QT4_SO_PATH) $(QT5_SO_PATH) $(QT4_STATIC_PATH) $(QT5_STATIC_PATH)
+ mkdir -p $(QT4_PATH) $(QT5_PATH)
- # Qt4 builds - qmake (dynamic and static)
+ # Qt4 builds - CMake (dynamic and static)
QT_SELECT=qt4 \
- dh_auto_configure -B$(QT4_SO_PATH) -- $(QMAKE_GENERIC) \
- BUILD_DIR=$(QT4_SO_PATH) \
- "QMAKE_CXXFLAGS=$(CFLAGS)" \
- $(extra_configure_opts) \
- $(PATH_TO_SOURCE)/quazip.pro
- QT_SELECT=qt4 \
- dh_auto_configure -B$(QT4_STATIC_PATH) -- $(QMAKE_GENERIC) $(QMAKE_STATIC) \
- BUILD_DIR=$(QT4_STATIC_PATH) \
- "QMAKE_CXXFLAGS=$(CFLAGS)" \
- $(extra_configure_opts) \
- $(PATH_TO_SOURCE)/quazip.pro
+ dh_auto_configure -B$(QT4_PATH) -- -DBUILD_WITH_QT4=ON \
+ -DLIB_SUFFIX=/$(DEB_HOST_MULTIARCH) \
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON
- # Qt5 builds - qmake (dynamic and static)
- QT_SELECT=qt5 \
- dh_auto_configure -B$(QT5_SO_PATH) -- $(QMAKE_GENERIC) \
- BUILD_DIR=$(QT5_SO_PATH) \
- QUAZIP_LIB_VERSION_SUFFIX=5 \
- "QMAKE_CXXFLAGS=$(CFLAGS)" \
- $(extra_configure_opts) \
- $(PATH_TO_SOURCE)/quazip.pro
+ # Qt5 builds - CMake (dynamic and static)
QT_SELECT=qt5 \
- dh_auto_configure -B$(QT5_STATIC_PATH) -- $(QMAKE_GENERIC) $(QMAKE_STATIC) \
- BUILD_DIR=$(QT5_STATIC_PATH) \
- QUAZIP_LIB_VERSION_SUFFIX=5 \
- "QMAKE_CXXFLAGS=$(CFLAGS)" \
- $(extra_configure_opts) \
- $(PATH_TO_SOURCE)/quazip.pro
+ dh_auto_configure -B$(QT5_PATH) -- -DBUILD_WITH_QT4=OFF \
+ -DLIB_SUFFIX=/$(DEB_HOST_MULTIARCH) \
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON
cp NEWS.txt NEWS
override_dh_auto_build:
# Qt4 builds - make (dynamic and static)
- QT_SELECT=qt4 dh_auto_build -B$(QT4_SO_PATH)
- QT_SELECT=qt4 dh_auto_build -B$(QT4_STATIC_PATH)
+ QT_SELECT=qt4 dh_auto_build -B$(QT4_PATH)
# Qt5 builds - make (dynamic and static)
- QT_SELECT=qt5 dh_auto_build -B$(QT5_SO_PATH)
- QT_SELECT=qt5 dh_auto_build -B$(QT5_STATIC_PATH)
-
-override_dh_auto_test:
- $(QT4_STATIC_PATH)/qztest/qztest
- $(QT5_STATIC_PATH)/qztest/qztest
+ QT_SELECT=qt5 dh_auto_build -B$(QT5_PATH)
override_dh_auto_clean:
- dh_auto_clean -B$(QT4_SO_PATH)
- dh_auto_clean -B$(QT4_STATIC_PATH)
- dh_auto_clean -B$(QT5_SO_PATH)
- dh_auto_clean -B$(QT5_STATIC_PATH)
+ dh_auto_clean -B$(QT4_PATH)
+ dh_auto_clean -B$(QT5_PATH)
rm -Rf NEWS
override_dh_auto_install:
- # Install static builds
- mkdir -p $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
- cp -a $(QT4_STATIC_PATH)/quazip/libquazip.a $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
- cp -a $(QT5_STATIC_PATH)/quazip/libquazip-qt5.a $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)
-
# Install Qt4 packages
- dh_auto_install -B$(QT4_SO_PATH) -plibquazip1
- dh_auto_install -B$(QT4_SO_PATH) -plibquazip-dev
+ dh_auto_install -B$(QT4_PATH)
# Install Qt5 packages
- dh_auto_install -B$(QT5_SO_PATH) -plibquazip-qt5-1
- dh_auto_install -B$(QT5_SO_PATH) -plibquazip-qt5-dev
+ dh_auto_install -B$(QT5_PATH)
override_dh_installchangelogs:
dh_installchangelogs -plibquazip1 NEWS upstream
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/libquazip.git
More information about the debian-med-commit
mailing list