File: rules

package info (click to toggle)
python-authkit 0.4.3-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 892 kB
  • ctags: 880
  • sloc: python: 6,272; makefile: 40; sh: 34
file content (64 lines) | stat: -rwxr-xr-x 1,849 bytes parent folder | download
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
#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# Include dpatch stuff.
include /usr/share/dpatch/dpatch.make

PYVERS=$(shell pyversions -vr)
DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p')
REVISION = $(shell dpkg-parsechangelog | sed -rne 's,^Version: .*~r([^-]+).*,\1,p')

clean: unpatch
	dh_testdir
	dh_testroot
	rm -rf build
	find . -name *\.py[co] -exec rm {} \;
	dh_clean

build:

install: patch $(PYVERS:%=install-python%)
install-python%:
	python$* setup.py install \
		--single-version-externally-managed \
		--root $(CURDIR)/debian/python-authkit

	# remove the stupid executable flag from README.txt files
	find . -name README.txt | xargs chmod -x
	# remove the executable flag from example scripts
	chmod -x examples/docs/form2.py examples/docs/form_no_user_in_cookie.py

# Build architecture-dependent files here.
binary-arch:

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_install debian/lintian-overrides/python-authkit /usr/share/lintian/overrides/
	dh_installchangelogs
	dh_installdocs --exclude=pudge_template --exclude=scripts
	dh_python2
	dh_compress -X.py
	dh_fixperms
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

# Build architecture-dependent files here.
binary-arch: build install
# We have nothing to do by default.

binary: binary-indep binary-arch

get-orig-source:
	if [ "$(REVISION)" = "" ]; then uscan --force-download --rename --repack; else \
	svn -q export -r $(REVISION) http://authkit.org/svn/AuthKit/trunk/ python-authkit-$(DEB_UPSTREAM_VERSION) &&\
        tar -zcf ./python-authkit_$(DEB_UPSTREAM_VERSION).orig.tar.gz python-authkit-$(DEB_UPSTREAM_VERSION);\
	rm -rf python-authkit-$(DEB_UPSTREAM_VERSION) ; fi

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