File: rules

package info (click to toggle)
pygments 2.0.1%2Bdfsg-1.1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 3,828 kB
  • sloc: python: 56,343; makefile: 211; sh: 95
file content (70 lines) | stat: -rwxr-xr-x 1,828 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

#export DH_VERBOSE=1

PYVERS ?= $(shell pyversions -vr) $(shell py3versions -vr)
pkgdir = $(CURDIR)/debian/python$(if $(patsubst 3.%,,$(1)),,3)-pygments

clean:
	dh_testdir
	dh_testroot
	rm -rf build Pygments.egg-info doc/_build
	find . -name "*\.py[co]" -delete
	dh_clean build-indep install-stamp $(PYVERS:%=install-python%-stamp)

build: build-indep

build-arch:

build-indep:
	dh_testdir
	dh_installdirs
	PYTHONPATH=$(CURDIR):$(CURDIR)/doc make -C doc html
	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 $(call pkgdir,$*) --install-layout=deb
	touch $@

binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs -i CHANGES
	dh_installexamples -i
	dh_installdocs -i
	dh_link -i
	dh_installman -i
	dh_install -i -p python-pygments pygmentize /usr/bin/
	rm -rf debian/python3-pygments/usr/bin/
	dh_sphinxdoc -i -p python-pygments-doc
	dh_python2 -i
	dh_python3 -i
	dh_compress -i -X.py -X.inv
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

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=doc/_build --exclude=tests/examplefiles --exclude=test/test_examplefiles.py -f pygments_$$VER.orig.tar.gz;\
	find . -name '*.pyc' -delete;\
	tar -zcf ./pygments_$$VER+dfsg.orig.tar.gz Pygments-*;\
	rm -f ./pygments_$$VER.orig.tar.gz;\
	rm -rf Pygments-*

.PHONY: build clean binary-indep binary-arch binary install