File: rules

package info (click to toggle)
synopsis 0.8.0-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 10,112 kB
  • ctags: 12,996
  • sloc: cpp: 34,254; ansic: 33,620; python: 10,975; sh: 7,261; xml: 6,369; makefile: 773; asm: 445
file content (128 lines) | stat: -rwxr-xr-x 2,930 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.

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

include /usr/share/dpatch/dpatch.make

# This is the debhelper compatability version to use.
export DH_COMPAT=4

PKG_TMP=$(CURDIR)/debian/tmp

export ROOTSYNOPSIS=$(CURDIR)/debian/synopsis
export ROOTSYNOPSISDOC=$(CURDIR)/debian/synopsis-doc

PYDEF=$(shell pyversions -d)

configure: configure-stamp
configure-stamp: patch-stamp
	touch $@
	dh_testdir

	# configure the package
	$(PYDEF) setup.py config --prefix=/usr --with-gc-prefix=/usr

	touch $@

build: configure-stamp build-stamp
build-stamp:
	touch $@
	dh_testdir
	$(PYDEF) setup.py build
	touch $@

clean-patched:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp

	# Add here commands to clean up after the build process.
	-$(PYDEF) setup.py clean
	find Synopsis -name '*.py?' | xargs rm

	# The build directory is not completely cleaned by the python setup script
	rm -rf build

	dh_clean

clean: clean-patched unpatch

install: install-stamp
install-stamp: build-stamp
	dh_testdir
	dh_testroot

	# Install the package into the temporary directory
	$(PYDEF) setup.py install --prefix=$(PKG_TMP)/usr
	mkdir -p $(PKG_TMP)/usr/share/man/man1
	cp $(CURDIR)/debian/*.1 $(PKG_TMP)/usr/share/man/man1/
	find $(PKG_TMP) -name '*.py?' | xargs rm

	# Clean up include directory; the debian provided libgc is used,
	# therefore the gc include files must not be included; Writer.hh
	# is accidently executable in the upstream tarball
	rm -rf $(PKG_TMP)/usr/include/Synopsis/gc
	chmod 644 $(PKG_TMP)/usr/include/Synopsis/PTree/Writer.hh

	# Install documentation
	mkdir -p $(PKG_TMP)/usr/share/doc/synopsis-doc
	cp -a share/doc/Synopsis/examples $(PKG_TMP)/usr/share/doc/synopsis-doc
	cp -a share/doc/Synopsis/html $(PKG_TMP)/usr/share/doc/synopsis-doc

	# Create the separate packages
	dh_install --sourcedir=debian/tmp

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	dh_testroot

	dh_installdocs -i
	dh_installchangelogs -i
	dh_link -i

	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i

	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot

	dh_installdocs -a
	dh_installman -a
	dh_installinfo -a
	dh_installchangelogs -a
	dh_pycentral -a
	dh_python -a
	dh_link -a
	dh_strip -a

	dh_compress -a
	dh_fixperms -a
	dh_makeshlibs -a
	dh_installdeb -a
	dh_shlibdeps -a

	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

get-orig-source:
	wget http://synopsis.fresco.org/download/synopsis-0.8.tar.gz
	tar xzf synopsis-0.8.tar.gz
	rm synopsis-0.8.tar.gz
	rm -rf synopsis-0.8/doc/Manual
	tar czf synopsis_0.8.0.orig.tar.gz synopsis-0.8
	rm -rf synopsis-0.8

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure get-orig-source