Add Debian packaging configuration

darcs-hash:20071113175844-86b55-930c81a3e37181559260cd4df978d5d4baa77a9a.gz
This commit is contained in:
David Rousselie
2007-11-13 18:58:44 +01:00
parent 882f61d812
commit b8002f17fc
9 changed files with 136 additions and 0 deletions

76
debian/rules vendored Executable file
View File

@@ -0,0 +1,76 @@
#!/usr/bin/make -f
# This file was automatically generated by stdeb 0.2.a1 at
# Mon, 12 Nov 2007 08:09:57 +0100
PACKAGE_NAME=python-jcl
MODULE_NAME=jcl
DEB_UPSTREAM_VERSION=0.1
PYVERS=$(shell pyversions -vr)
build: build-stamp
build-stamp: $(PYVERS:%=build-python%)
touch $@
build-python%:
# Force setuptools, but reset sys.argv[0] to 'setup.py' because setup.py files expect that.
python$* -c "import setuptools,sys;f='setup.py';sys.argv[0]=f;execfile(f,{'__file__':f,'__name__':'__main__'})" build
touch $@
clean:
dh_testdir
dh_testroot
rm -f *-stamp
rm -rf dist build
-find -name '*.py[co]' | xargs rm -f
# find . -name *.pyc -exec rm {} \;
dh_clean
install: build install-prereq $(PYVERS:%=install-python%)
install-prereq:
dh_testdir
dh_testroot
dh_clean -k
install-python%:
# Force setuptools, but reset sys.argv[0] to 'setup.py' because setup.py files expect that.
python$* -c "import setuptools,sys;f='setup.py';sys.argv[0]=f;execfile(f,{'__file__':f,'__name__':'__main__'})" install --no-compile --single-version-externally-managed --root $(CURDIR)/debian/${PACKAGE_NAME}
mv debian/${PACKAGE_NAME}/usr/lib/python$*/site-packages/${MODULE_NAME}-${DEB_UPSTREAM_VERSION}-py$*.egg-info debian/${PACKAGE_NAME}/usr/lib/python$*/site-packages/${MODULE_NAME}.egg-info
binary-arch:
binary-indep: build install
dh_testdir -i
dh_testroot -i
dh_pycentral -i
dh_installdocs -i
dh_installdirs -i
dh_installexamples -i
dh_strip -i
dh_compress -i -X.py
dh_fixperms -i
: # Replace all '#!' calls to python with $(PYTHON)
: # and make them executable
for i in \
`find debian/python-jcl/usr/bin -type f` \
`find debian/python-jcl/usr/lib -type f`; \
do \
case "$$i" in *-[0-9].[0-9]) continue; esac; \
sed '1s,#!.*python[^ ]*\(.*\),#! /usr/bin/python\1,' \
$$i > $$i.temp; \
if cmp --quiet $$i $$i.temp; then \
rm -f $$i.temp; \
else \
mv -f $$i.temp $$i; \
chmod 755 $$i; \
echo "fixed interpreter: $$i"; \
fi; \
done
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure