77 lines
2.1 KiB
Makefile
Executable File
77 lines
2.1 KiB
Makefile
Executable File
#!/usr/bin/make -f
|
|
|
|
# This file was automatically generated by stdeb 0.2.a1 at
|
|
# Tue, 13 Nov 2007 19:00:04 +0100
|
|
|
|
PACKAGE_NAME=python-jmc
|
|
MODULE_NAME=jmc
|
|
DEB_UPSTREAM_VERSION=0.3
|
|
|
|
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-jmc/usr/bin -type f` \
|
|
`find debian/python-jmc/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
|