summaryrefslogtreecommitdiff
path: root/debian/rules
diff options
context:
space:
mode:
authorModestas Vainius <modax@debian.org>2010-02-12 00:29:24 +0000
committerModestas Vainius <modax@debian.org>2010-02-12 00:29:24 +0000
commitf0a30e14c428dd98c2851c3d174b8db09f442a93 (patch)
tree6775418670cc7523b38f62bf74b71dd98e55e865 /debian/rules
parent7a468279ceed4cc233fb4e37a40cf6a510a4809d (diff)
downloadkde4libs-f0a30e14c428dd98c2851c3d174b8db09f442a93.tar.gz
Finish split (tested), fixes there and there.
* TODO: Move kdelibs5 templates to another package that previously existed (kdelibs5-data?). - bind kdebase-runtime to libkdecore5 for now; - generate strict local library interdependencies by stealing debian/shlibs.local generation code from qt4-x11; * Add control substs ${allLibraryPackages} and ${kde43LibraryPackages} for use in kdelibs5-{dev,dbg} and kdelibs5 metapackage despectively. * Add ${perl:Depends} to Depends of kdelibs5-plugins, kdelibs5-data and kdoctools.
Diffstat (limited to 'debian/rules')
-rwxr-xr-xdebian/rules42
1 files changed, 33 insertions, 9 deletions
diff --git a/debian/rules b/debian/rules
index a7cd295..d4e4aca 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,20 +1,18 @@
#!/usr/bin/make -f
-UPSTREAMVERSION ?= $(shell dpkg-parsechangelog | grep '^Version: ' | sed 's/^Version: \(.*\)-.*/\1/')
+BINARYVERSION ?= $(shell dpkg-parsechangelog | grep '^Version: ' | sed 's/^Version: //')
+UPSTREAMVERSION ?= $(shell echo '$(BINARYVERSION)' | sed 's/^\(.*\)-.*/\1/')
+BINARYVERSION := $(BINARYVERSION)
+UPSTREAMVERSION := $(UPSTREAMVERSION)
#UPSTREAMVERSION ?= 4:4.2.0
#PLASMA_ABI=$(shell grep 'plasma-abi-' debian/libplasma3.symbols.in | head -n1 | sed 's/^.*\(plasma-abi-\S\+\).*/\1/')
RUNTIME_DEPS := kdebase-runtime (>= 4:4.4.0)
-DEB_DBG_PACKAGE_kdelibs5 := kdelibs5-dbg
-DEB_DBG_PACKAGE_kdelibs-bin := kdelibs5-dbg
-DEB_DBG_PACKAGE_libplasma3 := kdelibs5-dbg
-DEB_DBG_PACKAGE_libkdewebkit5 := kdelibs5-dbg
-DEB_DBG_PACKAGE_libknewstuff3-4 := kdelibs5-dbg
-DEB_DBG_PACKAGE_libkunitconversion4 := kdelibs5-dbg
-DEB_DBG_PACKAGE_libnepomukquery4 := kdelibs5-dbg
+DEB_DBG_PACKAGE_ALL := kdelibs5-dbg
#bump version for every new upstream version!
-DEB_DH_MAKESHLIBS_ARGS_kdelibs5 := -V'kdelibs5 (>= $(UPSTREAMVERSION)), $(RUNTIME_DEPS)'
+DEB_DH_MAKESHLIBS_ARGS_libkdecore5 := -V'libkdecore5 (>= $(UPSTREAMVERSION)), $(RUNTIME_DEPS)'
+DEB_DH_MAKESHLIBS_ARGS_ALL := -V
#DEB_DH_MAKESHLIBS_ARGS_libplasma3 := -V'libplasma3 (>= $(UPSTREAMVERSION)), $(PLASMA_ABI)'
# remove dependencies on kdebase-runtime and phonon (the metapackage)
@@ -22,5 +20,31 @@ DEB_DH_SHLIBDEPS_ARGS_ALL := -- -xkdebase-runtime -xphonon
include /usr/share/pkg-kde-tools/qt-kde-team/1/debian-qt-kde.mk
+# Generate dpkg-gencontrol substs
+DEB_LIBRARY_PACKAGES := $(filter-out %-dev,$(filter lib%,$(DEB_ARCH_PACKAGES)))
+DEB_KDE43_LIBRARY_PACKAGES := libkde3support4 libkdecore5 libkdesu5 libkdeui5 libkdnssd4 \
+ libkfile4 libkhtml5 libkimproxy4 libkio5 libkjsapi4 libkjsembed4 libkmediaplayer4 \
+ libknewstuff2-4 libknotifyconfig4 libkntlm4 libkparts4 libkpty4 libkrosscore4 libkrossui4 \
+ libktexteditor4 libkutils4 libnepomuk4 libsolid4 libthreadweaver4
+DEB_LIBRARY_PACKAGES_SUBST := $(foreach pkg,$(DEB_LIBRARY_PACKAGES),$(patsubst %,% (= $(BINARYVERSION)),,$(pkg)))
+DEB_KDE43_LIBRARY_PACKAGES_SUBST := $(foreach pkg,$(DEB_KDE43_LIBRARY_PACKAGES),$(patsubst %,% (= $(BINARYVERSION)),,$(pkg)))
+
+$(patsubst %,binary-predeb/%,kdelibs5-dev kdelibs5-dbg):: binary-predeb/%:
+ test -f debian/$(cdbs_curpkg).substvars || touch debian/$(cdbs_curpkg).substvars
+ echo 'allLibraryPackages=$(DEB_LIBRARY_PACKAGES_SUBST)' >> debian/$(cdbs_curpkg).substvars
+
+$(patsubst %,binary-predeb/%,kdelibs5):: binary-predeb/%:
+ test -f debian/$(cdbs_curpkg).substvars || touch debian/$(cdbs_curpkg).substvars
+ echo 'kde43LibraryPackages=$(DEB_KDE43_LIBRARY_PACKAGES_SUBST)' >> debian/$(cdbs_curpkg).substvars
+
+# Generate shlibs local files
+$(patsubst %,binary-fixup/%,$(DEB_ARCH_PACKAGES)) :: binary-fixup/%: binary-strip/%
+ if test -e debian/$(cdbs_curpkg)/DEBIAN/shlibs ; then \
+ sed 's/>=[^)]*/= $(BINARYVERSION)/' debian/$(cdbs_curpkg)/DEBIAN/shlibs >> debian/shlibs.local ;\
+ fi
+
+clean::
+ rm -f debian/shlibs.local
+
#binary-predeb/libplasma3::
# echo plasma:abi-provides=$(PLASMA_ABI) >> debian/libplasma3.substvars