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
|
#!/usr/bin/make -f
#-*- makefile -*-
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# Include dpatch stuff.
include /usr/share/dpatch/dpatch.make
# export some vars
export mysqlversion=5.0.24
export mysqlclient=mysqlclient_r
export mysqloptlibs=ssl crypto
PYVERS=$(shell pyversions -r)
build: build-stamp
build-stamp: patch-stamp
dh_testdir
set -e; \
for PYTHON in $(PYVERS); do \
echo "--- Compiling for $$PYTHON"; \
$$PYTHON setup.py build; \
done
touch build-stamp
clean: unpatch
dh_testdir
dh_testroot
@echo "--- Cleaning"
rm -f build-stamp install-stamp
rm -rf build
find . -name "*.py[co]" -exec rm -f {} \;
dh_clean
install: install-stamp
install-stamp: build
dh_testdir
dh_testroot
set -e; \
for PYTHON in $(PYVERS); do \
echo "--- Installing for $$PYTHON"; \
$$PYTHON setup.py install --root `pwd`/debian/python-mysqldb; \
done
@echo " -- Cleaning build from *.py[co] files"
-find debian -name '*.py[co]' | xargs -n 50 rm -f
touch install-stamp
# Build architecture-independent files here.
binary-indep:
# Build architecture-dependent files here.
binary-arch: install
dh_installdocs -A README doc/MySQLdb.txt doc/FAQ.txt
dh_installchangelogs ChangeLog
dh_strip
dh_compress
dh_fixperms
dh_pycentral
dh_python
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary
|