summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules36
1 files changed, 21 insertions, 15 deletions
diff --git a/debian/rules b/debian/rules
index bbf9f98..7e30d9a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,9 +4,11 @@ export QTDIR := $(shell pwd)
export PATH := $(QTDIR)/bin:$(PATH)
# workaround to use lrelease.
export LD_LIBRARY_PATH := $(QTDIR)/lib:$(LD_LIBRARY_PATH)
+# workaround to use qhelpgenerator
+export QT_PLUGIN_PATH := $(QTDIR)/plugins
QTVERSION := $(shell ls changes-* | cut -f2 -d '-')
-CURRENTVERSION := $(shell head -1 debian/changelog | sed 's/[^(]*(\([^)]*\)).*/\1/')
+CURRENTVERSION := $(shell dpkg-parsechangelog | sed -n 's/^Version: //p')
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/makefile.mk
@@ -26,21 +28,18 @@ DEB_MAKE_CLEAN_TARGET := confclean distclean
# Shlibs of the current upstream version
#DEB_DH_MAKESHLIBS_ARGS_ALL := -V
# Specific shlibs version
-SHLIBSVERSION := 4.4.3
+SHLIBSVERSION := 4.5.0
$(foreach libpkg,$(filter-out %-dev %-dbg,$(filter lib%,$(DEB_ARCH_PACKAGES))),$(eval DEB_DH_MAKESHLIBS_ARGS_$(libpkg) := -V'$(libpkg) (>= $(SHLIBSVERSION))'))
DEB_DH_STRIP_ARGS_libqt4-dbg := --exclude=.debug
DEB_DH_SHLIBDEPS_ARGS_ALL := --exclude=.debug
-DEB_INSTALL_CHANGELOGS_ALL := changes-$(QTVERSION)
+# Disable for rc
+#DEB_INSTALL_CHANGELOGS_ALL := changes-$(QTVERSION)
DEB_INSTALL_DOCS_ALL := GPL_EXCEPTION_ADDENDUM.TXT
-# Disable Qt Eclipse Integration for C++.
-# TODO: Fix it as it breaks current code.
-#EXTRA_CONFIGURE_OPTS += -qtnamespace QtCppIntegration -qtlibinfix CppIntegration
-
ibase_architectures := i386 kfreebsd-i386 kfreebsd-amd64 knetbsd-i386 netbsd-i386 amd64 sparc powerpc
ifeq ($(DEB_HOST_ARCH),$(findstring $(DEB_HOST_ARCH), $(ibase_architectures)))
EXTRA_CONFIGURE_OPTS += -plugin-sql-ibase
@@ -62,6 +61,14 @@ common-build-arch:: debian/stamp-makefile-build-tools
debian/stamp-makefile-build-tools: debian/stamp-makefile-build
$(MAKE) sub-tools
+ # Test current version is a snapshot
+ifeq (snapshot, $(findstring snapshot, $(CURRENTVERSION)))
+ # Build documentations
+ $(MAKE) docs
+ # Workaround: It's a known qmake limitation.
+ # It can't generate install rules for files that don't exist yet like docs.
+ ./config.status
+endif
touch $@
common-configure-arch:: config.status
@@ -129,7 +136,7 @@ endif
clean::
# Extra stuff missed by confclean/distclean
-
+
# Misc. files
rm -f \
config.status \
@@ -138,16 +145,17 @@ clean::
mkspecs/qconfig.pri \
src/corelib/global/qconfig.* \
;
-
+
# Misc. directories
rm -rf \
+ doc-build/ \
examples/tools/plugandpaint/plugins/ \
examples/tools/styleplugin/styles/ \
lib/ \
mkspecs/glibc-g++/ \
plugins/ \
;
-
+
# hppa test directory
rm -rf debian/hppa-tmp
@@ -165,7 +173,7 @@ clean::
-o -name release-static \
-o -name .uic \
\) -print0 | xargs -0 rm -rf
-
+
# Leftover files and all symlinks
find \( -false \
-o -name \*.a \
@@ -177,14 +185,14 @@ clean::
-o -name \*.so.debug \
-o -type l \
\) -delete
-
+
# Delete all Makefiles, excluding some from src/3rdparty
find $(CURDIR) -name Makefile \
! -path $(CURDIR)/src/3rdparty/Makefile \
! -path $(CURDIR)/src/3rdparty/freetype/\* \
! -path $(CURDIR)/src/3rdparty/zlib/\* \
-delete
-
+
# Any remaining executables
find $(CURDIR) -type f -exec file -i '{}' \; | grep \
-e application/x-executable \
@@ -200,8 +208,6 @@ common-install-arch::
-exec perl -pi -e "s, -L$(CURDIR)/?\S+,,g" {} \;
# Fix wrong path in prl files
find $(DEB_DESTDIR)/usr/lib -type f -name '*.prl' \
- -exec perl -pi -e "s, -L$(CURDIR)/\S+,,g" {} \;
- find $(DEB_DESTDIR)/usr/lib -type f -name '*.prl' \
-exec sed -i -e "/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/" {} \;
install/libqtcore4::