1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
|
#! /usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE = 1
# This is the debhelper compatibility version to use.
export DH_COMPAT = 4
# Load rules for dpatch.
include /usr/share/dpatch/dpatch.make
PYTHON2.1 = /usr/bin/python2.1
PYTHON2.2 = /usr/bin/python2.2
PYTHON2.3 = /usr/bin/python2.3
PYTHON2.4 = /usr/bin/python2.4
configure: configure-stamp
configure-stamp:
dh_testdir
touch configure-stamp
build: configure-stamp build-stamp
build-stamp: patch-stamp
dh_testdir
$(PYTHON2.1) setup.py build
$(PYTHON2.2) setup.py build
$(PYTHON2.3) setup.py build -g
$(PYTHON2.4) setup.py build -g
sh -e debian/installtemplates.sh 2.1 2.2 2.3 2.4
touch build-stamp
clean: clean1 unpatch
clean1:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
rm -f debian/*.prerm debian/*.postinst debian/*.doc-base
# Can't run setup.py clean because it removes *.pyd, which makes
# "unrepresentable changes to source files".
# $(PYTHON2.1) setup.py clean
# $(PYTHON2.2) setup.py clean
# $(PYTHON2.3) setup.py clean
# $(PYTHON2.4) setup.py clean
find -name "*~" -o -name "*.pyc" | xargs -r rm -f
rm -rf build debian/python*-tmp
dh_clean
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
dh_installdirs \
-ppython-egenix-mx-base-dev \
usr/include/python2.1/mx \
usr/include/python2.2/mx \
usr/include/python2.3/mx \
usr/include/python2.4/mx
# Build for all Python versions.
$(PYTHON2.1) setup.py install --root=debian/python2.1-tmp
$(PYTHON2.2) setup.py install --root=debian/python2.2-tmp
$(PYTHON2.3) setup.py install --root=debian/python2.3-tmp
$(PYTHON2.4) setup.py install --root=debian/python2.4-tmp
# Ugly fix for bug #242447: include missing ExitFunctions.py in mxTools.
cp debian/python2.1-tmp/usr/lib/python2.1/site-packages/mx/BeeBase/ExitFunctions.py \
debian/python2.1-tmp/usr/lib/python2.1/site-packages/mx/Misc
cp debian/python2.2-tmp/usr/lib/python2.2/site-packages/mx/BeeBase/ExitFunctions.py \
debian/python2.2-tmp/usr/lib/python2.2/site-packages/mx/Misc
cp debian/python2.3-tmp/usr/lib/python2.3/site-packages/mx/BeeBase/ExitFunctions.py \
debian/python2.3-tmp/usr/lib/python2.3/site-packages/mx/Misc
cp debian/python2.4-tmp/usr/lib/python2.4/site-packages/mx/BeeBase/ExitFunctions.py \
debian/python2.4-tmp/usr/lib/python2.4/site-packages/mx/Misc
# Change /usr/local/bin/python to /usr/bin/pythonX.Y
sh -e debian/pathmangle.sh /usr/bin/python2.1 debian/python2.1-tmp
sh -e debian/pathmangle.sh /usr/bin/python2.2 debian/python2.2-tmp
sh -e debian/pathmangle.sh /usr/bin/python2.3 debian/python2.3-tmp
sh -e debian/pathmangle.sh /usr/bin/python2.4 debian/python2.4-tmp
# Collect files.
dh_movefiles -ppython2.1-egenix-mxdatetime \
-ppython2.1-egenix-mxproxy \
-ppython2.1-egenix-mxqueue \
-ppython2.1-egenix-mxstack \
-ppython2.1-egenix-mxtexttools \
-ppython2.1-egenix-mxtools \
--sourcedir=debian/python2.1-tmp
dh_movefiles -ppython2.2-egenix-mxdatetime \
-ppython2.2-egenix-mxproxy \
-ppython2.2-egenix-mxqueue \
-ppython2.2-egenix-mxstack \
-ppython2.2-egenix-mxtexttools \
-ppython2.2-egenix-mxtools \
--sourcedir=debian/python2.2-tmp
dh_movefiles -ppython2.3-egenix-mxdatetime \
-ppython2.3-egenix-mxproxy \
-ppython2.3-egenix-mxqueue \
-ppython2.3-egenix-mxstack \
-ppython2.3-egenix-mxtexttools \
-ppython2.3-egenix-mxtools \
--sourcedir=debian/python2.3-tmp
dh_movefiles -ppython2.4-egenix-mxdatetime \
-ppython2.4-egenix-mxproxy \
-ppython2.4-egenix-mxqueue \
-ppython2.4-egenix-mxstack \
-ppython2.4-egenix-mxtexttools \
-ppython2.4-egenix-mxtools \
--sourcedir=debian/python2.4-tmp
# Move C header files and other stuff to the right location.
sh -e debian/movefiles.sh 2.1 2.2 2.3 2.4
# Populate -dev package with generic headers.
cp mx/stdlib/*.h debian/python-egenix-mx-base-dev/usr/include/python2.1/mx
cp mx/stdlib/*.h debian/python-egenix-mx-base-dev/usr/include/python2.2/mx
cp mx/stdlib/*.h debian/python-egenix-mx-base-dev/usr/include/python2.3/mx
cp mx/stdlib/*.h debian/python-egenix-mx-base-dev/usr/include/python2.4/mx
# Architecture-independent files are built here.
binary-indep: build install
dh_testdir -i
dh_testroot -i
dh_installdocs -i -A debian/README.Debian
dh_installchangelogs -i
dh_link -i
dh_compress -i
dh_fixperms -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
# Architecture-dependent files are built here.
binary-arch: build install
dh_testdir -a
dh_testroot -a
dh_installdocs -a -A debian/README.Debian
dh_installexamples -a
dh_installchangelogs -a
dh_strip -a
dh_link -a
dh_compress -a
dh_fixperms -a
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure patch unpatch clean1
|