File: rules

package info (click to toggle)
thuban 1.2.2-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 7,596 kB
  • ctags: 5,301
  • sloc: python: 30,411; ansic: 6,181; xml: 4,127; cpp: 1,595; makefile: 166; sh: 101
file content (69 lines) | stat: -rwxr-xr-x 1,477 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
65
66
67
68
69
#!/usr/bin/make -f

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

PYDEF=$(shell pyversions -d)
PYDEFVER=$(shell pyversions -d -v)
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -O0
else
        CFLAGS += -O2
endif

include /usr/share/dpatch/dpatch.make

build: patch build-stamp
build-stamp: 
	dh_testdir
	CFLAGS="$(CFLAGS)" python setup.py build_ext --use-wx-python-swig-hack
	make -C po mo
	make -C Doc/manual man-html man-html-de
	# Needs external data, many failures
	# cd test ; python runtests.py
	touch build-stamp

clean: clean-patched unpatch
clean-patched: 
	dh_testdir
	dh_testroot
	python setup.py clean
	find $(CURDIR) -name "*.mo" -exec rm -f {} \;
	rm -f build-stamp 
	rm -rf build Doc/manual/thuban-manual Doc/manual/thuban-manual-de
	dh_clean
	rm -f debian/pyversions

install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs
	
	python setup.py install --prefix=/usr --no-compile --root=$(CURDIR)/debian/thuban
	rm -f $(CURDIR)/debian/thuban/usr/bin/create_epsg
	echo $(PYDEFVER) >$(CURDIR)/debian/pyversions

binary-arch: build install
	dh_testdir
	dh_testroot
	dh_install
	dh_installdocs
	dh_installexamples
	dh_installmenu
	dh_installman
	dh_installchangelogs 
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_pysupport 
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-arch
.PHONY: build clean binary-arch binary install clean-patched clean patch unpatch