File: Makefile

package info (click to toggle)
python-defaults 2.7.9-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,484 kB
  • ctags: 248
  • sloc: python: 2,342; makefile: 565; sh: 203; perl: 7
file content (28 lines) | stat: -rw-r--r-- 1,422 bytes parent folder | download | duplicates (4)
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
#!/usr/bin/make -f

include ../common.mk
clean: clean-common

check:
	# test dh_python2
	test -f debian/python-foo/usr/share/pyshared/keep_this_one/__init__.py
	test ! -f debian/python-foo/usr/share/pyshared/remove_this_one/__init__.py
	test ! -f debian/python-foo/usr/share/pyshared/foo/__init__.py
	grep -q remove_this_one debian/python-foo/usr/share/python/ns/python-foo
	grep -q foo debian/python-foo/usr/share/python/ns/python-foo
	grep -q bar.baz debian/python-foo/usr/share/python/ns/python-foo
	grep -q keep_this_one debian/python-foo/usr/share/python/ns/python-foo && false || true
	grep -q "pycompile -p python-foo" debian/python-foo/DEBIAN/postinst
	grep -q "pyclean -p python-foo" debian/python-foo/DEBIAN/prerm
	# test pycompile
	DESTDIR=debian/python-foo/ ../../pycompile -v debian/python-foo/usr/lib/
	set -e; for i in remove_this_one bar bar/baz;\
	do [ "`ls debian/python-foo/usr/lib/python2.*/*-packages/$$i/__init__.py | wc -l`" != '0' ];\
	[ "`ls debian/python-foo/usr/lib/python2.*/*-packages/$$i/__init__.pyc | wc -l`" != '0' ];\
	done
	# test pyclean
	DESTDIR=debian/python-foo/ ../../pyclean -v debian/python-foo/usr/lib/
	set -e; for i in remove_this_one bar bar/baz;\
	do [ "`ls debian/python-foo/usr/lib/python2.*/*-packages/$$i/__init__.py 2>/dev/null || true | wc -l`" = 0 ];\
	[ "`ls debian/python-foo/usr/lib/python2.*/*-packages/$$i/__init__.pyc 2>/dev/null || true | wc -l`" = 0 ];\
	done