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
|
#!/usr/bin/make -f
#export DH_VERBOSE=1
PYVERS ?= $(shell pyversions -vr)
include /usr/share/quilt/quilt.make
clean: unpatch
dh_testdir
dh_testroot
rm -rf build Pygments.egg-info
find . -name "*\.py[co]" -delete
dh_clean build-indep install-stamp $(PYVERS:%=install-python%-stamp)
build: patch build-indep
build-indep:
dh_testdir
dh_installdirs
PYTHONPATH='.' python docs/generate.py html debian/python-pygments/usr/share/doc/python-pygments/
touch $@
install: build install-stamp $(PYVERS:%=install-python%-stamp)
install-stamp:
dh_installdirs
install -m 644 external/pygments.bashcomp debian/python-pygments/etc/bash_completion.d/pygmentize
touch $@
install-python%-stamp:
python$* setup.py install --single-version-externally-managed \
--root debian/python-pygments --prefix=/usr
touch $@
binary-indep: build install
dh_testdir
dh_testroot
dh_installchangelogs -i CHANGES
dh_installexamples -i
dh_installdocs -i
dh_installman -i
dh_install -i debian/pygmentize /usr/bin/
# add jwilk's hack for one PKG-INFO file (until I will figure out why it changes)
find debian/ -name PKG-INFO | tail -n +2 | xargs -r -n1 cp -vf $(shell find debian/ -name PKG-INFO | head -n 1)
dh_pysupport -i
dh_compress -i -X.py
dh_fixperms -i
dh_installdeb -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i -- -Z bzip2
binary-arch:
binary: binary-indep binary-arch
get-orig-source:
VER=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^+]+).*,\1,p');\
uscan --force-download --rename --download-version=$$VER --destdir=.;\
tar -zx --exclude=tests/examplefiles --exclude=test/test_examplefiles.py -f pygments_$$VER.orig.tar.gz;\
tar -zcf ./pygments_$$VER+dfsg.orig.tar.gz Pygments-$$VER;\
rm -f ./pygments_$$VER.orig.tar.gz;\
rm -rf Pygments-$$VER
.PHONY: build clean binary-indep binary-arch binary install
|