2005-01-20 08:49:40 +03:00
|
|
|
#!/usr/bin/make -f
|
2006-09-19 07:53:10 +04:00
|
|
|
# Sample debian/rules that uses debhelper.
|
|
|
|
# GNU copyright 1997 to 1999 by Joey Hess.
|
2005-01-20 08:49:40 +03:00
|
|
|
|
2006-09-19 07:53:10 +04:00
|
|
|
PYVERS=$(shell pyversions -r debian/control)
|
|
|
|
|
|
|
|
configure: configure-stamp
|
|
|
|
configure-stamp:
|
|
|
|
dh_testdir
|
|
|
|
rm -f configure
|
|
|
|
touch configure-stamp
|
|
|
|
|
|
|
|
build: configure build-stamp
|
|
|
|
build-stamp:
|
|
|
|
dh_testdir
|
|
|
|
for python in $(PYVERS); do \
|
|
|
|
$$python setup.py build ; \
|
|
|
|
done
|
2008-01-18 02:59:42 +03:00
|
|
|
for python in $(PYVERS); do \
|
|
|
|
$$python-dbg setup.py build ; \
|
|
|
|
done
|
2006-09-19 07:53:10 +04:00
|
|
|
touch build-stamp
|
|
|
|
|
|
|
|
clean: configure
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
rm -fr *-stamp build
|
|
|
|
for python in $(PYVERS); do \
|
|
|
|
$$python setup.py clean ; \
|
|
|
|
done
|
|
|
|
dh_clean
|
|
|
|
|
|
|
|
install-arch: build
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
dh_clean -k
|
|
|
|
dh_installdirs
|
|
|
|
# psycopg2
|
2008-01-18 02:59:42 +03:00
|
|
|
for python in $(PYVERS); do \
|
|
|
|
$$python setup.py install \
|
|
|
|
--root=$(CURDIR)/debian/python-psycopg2 --no-compile; \
|
|
|
|
done
|
|
|
|
for python in $(PYVERS); do \
|
|
|
|
$$python-dbg setup.py install \
|
|
|
|
--root=$(CURDIR)/debian/python-psycopg2-dbg --no-compile; \
|
|
|
|
done
|
|
|
|
find debian/python-*-dbg ! -type d ! -name '*.so' | xargs rm -f
|
|
|
|
find debian/python-*-dbg -depth -empty -exec rmdir {} \;
|
2006-09-19 07:53:10 +04:00
|
|
|
|
|
|
|
install-indep: build
|
|
|
|
# Zope package
|
|
|
|
dh_installzope -p zope-psycopgda2 ZPsycopgDA
|
2008-01-18 02:59:42 +03:00
|
|
|
# Zope3 package
|
|
|
|
dh_installzope -p python-psycopg2da psycopg2da
|
2006-09-19 07:53:10 +04:00
|
|
|
|
|
|
|
# Build architecture-independent files here.
|
|
|
|
binary-indep: build install-indep
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2008-01-18 02:59:42 +03:00
|
|
|
dh_installdocs -i AUTHORS
|
2006-09-19 07:53:10 +04:00
|
|
|
dh_installchangelogs -i
|
|
|
|
dh_link -i
|
|
|
|
dh_compress -i
|
|
|
|
dh_fixperms -i
|
2008-01-18 02:59:42 +03:00
|
|
|
dh_pycentral -p python-psycopg2da
|
2006-09-19 07:53:10 +04:00
|
|
|
dh_installdeb -i
|
|
|
|
dh_gencontrol -i
|
|
|
|
dh_md5sums -i
|
|
|
|
dh_builddeb -i
|
|
|
|
|
|
|
|
# Build architecture-dependent files here.
|
|
|
|
binary-arch: build install-arch
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
dh_installdocs -a README AUTHORS doc tests
|
|
|
|
dh_installchangelogs -a ChangeLog
|
|
|
|
dh_link -a
|
2008-01-18 02:59:42 +03:00
|
|
|
dh_strip -ppython-psycopg2 --dbg-package=python-psycopg2-dbg
|
|
|
|
rm -rf debian/python-psycopg2-dbg/usr/share/doc/python-psycopg2-dbg
|
|
|
|
ln -s python-psycopg2 debian/python-psycopg2-dbg/usr/share/doc/python-psycopg2-dbg
|
2006-09-19 07:53:10 +04:00
|
|
|
dh_compress -a
|
|
|
|
dh_fixperms -a
|
|
|
|
dh_makeshlibs -a
|
|
|
|
dh_pycentral -a
|
|
|
|
dh_python -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
|