diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-07-10 16:17:43 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-07-10 16:17:43 -0500 |
commit | 9b2075d9b89fc628c447fbb98f43ef72e4a9c81d (patch) | |
tree | 2de9e866f064b1c7d36df24de1df305474f949fe /ubuntu/maverick_automake/libraries/python-kde3/debian/rules | |
download | tde-packaging-9b2075d9b89fc628c447fbb98f43ef72e4a9c81d.tar.gz tde-packaging-9b2075d9b89fc628c447fbb98f43ef72e4a9c81d.zip |
Initial import from old SVN repository
Note that only the Debian and Ubuntu folders were preserved
Diffstat (limited to 'ubuntu/maverick_automake/libraries/python-kde3/debian/rules')
-rwxr-xr-x | ubuntu/maverick_automake/libraries/python-kde3/debian/rules | 165 |
1 files changed, 165 insertions, 0 deletions
diff --git a/ubuntu/maverick_automake/libraries/python-kde3/debian/rules b/ubuntu/maverick_automake/libraries/python-kde3/debian/rules new file mode 100755 index 000000000..bc3dd4991 --- /dev/null +++ b/ubuntu/maverick_automake/libraries/python-kde3/debian/rules @@ -0,0 +1,165 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +DEB_CONFIGURE_INCLUDEDIR := /opt/kde3/include/kde +DEB_CONFIGURE_MANDIR := /opt/kde3/share/man +DEB_CONFIGURE_PREFIX := /opt/kde3 +DEB_CONFIGURE_INFODIR := /opt/kde3/share/info + +cdbs_configure_flags := --with-qt-dir=/usr/share/qt3 --disable-rpath --with-xinerama $(cdbs_kde_enable_final) $(cdbs_kde_enable_debug) + +include /usr/share/dpatch/dpatch.make +# This has to be exported to make some magic below work. +export DH_OPTIONS +export QTDIR=/usr/share/qt3 +export QMAKESPEC=$(QTDIR)/mkspecs/linux-g++ + +CXXFLAGS = -Wall -g + +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CXXFLAGS += -O0 +else + CXXFLAGS += -O2 +endif + +PYTHONS := $(shell pyversions -vr debian/control) +DBG_PYTHONS := $(shell pyversions -vd) + +GCCVER := $(shell gcc --version | sed -n '/^gcc (GCC)/s/.*(GCC) \(...\).*/\1/p') +ifneq (,$(filter $(GCCVER),4.2 4.3)) + SPLIT=20 +else + SPLIT=4 +endif + +.PRECIOUS: build-%/configure-stamp dbg-build-%/configure-stamp + +configure: $(PYTHONS:%=build-%/configure-stamp) $(DBG_PYTHONS:%=dbg-build-%/configure-stamp) + +build-%/configure-stamp: patch-stamp + dh_testdir + mkdir -p build-$* + cd build-$* && python$* ../configure.py \ + -c -u -k /opt/kde3 -o /opt/kde3/include/kde -n /opt/kde3/lib \ + -v /opt/kde3/share/sip/kde3 -j $(SPLIT) + touch $@ + +dbg-build-%/configure-stamp: patch-stamp + dh_testdir + mkdir -p dbg-build-$* + cd dbg-build-$* && python$*-dbg ../configure.py \ + -c -u -k /opt/kde3 -o /opt/kde3/include/kde -n /opt/kde3/lib \ + -v /opt/kde3/share/sip/kde3 -j $(SPLIT) + touch $@ + +build: $(PYTHONS:%=build-%/build-stamp) $(DBG_PYTHONS:%=dbg-build-%/build-stamp) + +build-%/build-stamp: build-%/configure-stamp + dh_testdir + $(MAKE) -C build-$* + touch $@ + +dbg-build-%/build-stamp: dbg-build-%/configure-stamp + dh_testdir + $(MAKE) -C dbg-build-$* + touch $@ + +clean: unpatch + dh_testdir + dh_testroot + rm -f *-stamp + rm -rf $(PYTHONS:%=build-%) $(DBG_PYTHONS:%=dbg-build-%) + +# remove autogenerated *mod.sip files and clean up sources + for moddir in sip/*;\ + do\ + if [ -d $$moddir ]; then\ + rm -f $$moddir/` basename $${moddir}`mod.sip;\ + fi;\ + done + dh_clean + +install: install-indep install-arch + +install-indep: + dh_testdir + dh_testroot + dh_clean -k -i + dh_installdirs -i + dh_install -i -X'\.diff$$' -X'\.in$$' -X'\.html$$' + for version in ${PYTHONS};\ + do\ + mkdir -p debian/python-kde3-kde3-dev/opt/kde3/lib/python-$$version/site-packages;\ + cp debian/pykdeconfig.py debian/python-kde3-kde3-dev/opt/kde3/lib/python-$$version/site-packages/;\ + cp build-$$version/pykdeconfig.py debian/python-kde3-kde3-dev/opt/kde3/lib/python-$$version/site-packages/pykdeconfig_nd.py;\ + done + for version in ${DBG_PYTHONS};\ + do\ + cp dbg-build-$$version/pykdeconfig.py debian/python-kde3-kde3-dev/opt/kde3/lib/python-$$version/site-packages/pykdeconfig_d.py;\ + done + +install-arch: + dh_testdir + dh_testroot + dh_clean -k -a + dh_installdirs -a + set -e; \ + for version in ${PYTHONS};\ + do\ + $(MAKE) -C build-$$version install DESTDIR=$(CURDIR)/debian/tmp;\ + done + + set -e; \ + for version in ${DBG_PYTHONS}; do \ + $(MAKE) -C dbg-build-$$version install DESTDIR=$(CURDIR)/debian/python-kde3-kde3-dbg;\ + done + + dh_install -a --sourcedir=$(CURDIR)/debian/tmp + + mkdir -p $(CURDIR)/debian/python-kde3-kde3/opt/kde3/lib/ + ln -s /opt/kde3/lib/kde3/libkonsolepart.so $(CURDIR)/debian/python-kde3-kde3/opt/kde3/lib/ + for i in $$(find debian/python-*-dbg -name '*.so'); do \ + b=$$(basename $$i .so); \ + mv $$i $$(dirname $$i)/$${b}_d.so; \ + done + find debian/python-*-dbg ! -type d \ + ! \( -name '*.so' -o -name '*config_d.py' \) | xargs rm -f + + find debian/python-*-dbg -depth -type d -empty -exec rmdir {} \; + + +# Must not depend on anything. This is to be called by +# binary-arch/binary-indep +# in another 'make' thread. +binary-common: + dh_testdir + dh_testroot + dh_installchangelogs ChangeLog + dh_installdocs -A THANKS + dh_installexamples + dh_link +ifeq (,$(findstring -i, $(DH_OPTIONS))) + DH_OPTIONS= dh_strip -ppython-kde3-kde3 #--dbg-package=python-kde3-kde3-dbg +endif + dh_compress -X.py -X.ui -X.dtd + dh_fixperms + DH_PYCENTRAL=nomove dh_pycentral + dh_installdeb + dh_shlibdeps -l /opt/kde3/lib + dh_gencontrol + dh_md5sums + dh_builddeb + +# Build architecture independant packages using the common target. +binary-indep: install-indep + $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common + +# Build architecture dependant packages using the common target. +binary-arch: build install-arch + $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common + +binary: binary-arch binary-indep +.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure |