rules 2.09 KB
Newer Older
1
#!/usr/bin/make -f
2
3
# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
4

5
# Uncomment this to turn on verbose mode.
6
7
8
#export DH_VERBOSE=1

# This is the debhelper compatability version to use.
9
export DH_COMPAT=3
10

calc's avatar
calc committed
11
12
13
export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

14
15
16
configure: configure-stamp
configure-stamp:
	dh_testdir
17

calc's avatar
calc committed
18
19
20
	# If compiling cvs version change to ./autogen.sh --prefix=/usr
	./configure --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \
	--prefix=/usr
21
22

	touch configure-stamp
23

24
build: configure-stamp build-stamp
25
26
27
28
29
30
31
build-stamp:
	dh_testdir

	$(MAKE)

	touch build-stamp

calc's avatar
calc committed
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
autotools:
	OLDDATESUB=`./config.sub -t | tr -d -` ;\
	OLDDATEGUESS=`./config.guess -t | tr -d -` ;\
	NEWDATESUB=`/usr/share/misc/config.sub -t | tr -d -` ;\
	NEWDATEGUESS=`/usr/share/misc/config.guess -t | tr -d -` ;\
	if [ $$OLDDATESUB -lt $$NEWDATESUB -o \
	     $$OLDDATEGUESS -lt $$NEWDATEGUESS ]; then \
	   dch -a -p "GNU config automated update: config.sub\
	     ($$OLDDATESUB to $$NEWDATESUB), config.guess\
	     ($$OLDDATEGUESS to $$NEWDATEGUESS)" ;\
	   cp -f /usr/share/misc/config.sub config.sub ;\
	   cp -f /usr/share/misc/config.guess config.guess ;\
	   echo WARNING: GNU config scripts updated from master copies 1>&2 ;\
	fi

clean: autotools
48
49
	dh_testdir
	dh_testroot
50
	rm -f build-stamp configure-stamp
51

52
	-$(MAKE) distclean
53
54
55

	dh_clean

56
install: build
57
58
59
60
61
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

62
	$(MAKE) install DESTDIR=`pwd`/debian/tmp
63
64


65
66
67
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
68

69
70
# Build architecture-dependent files here.
binary-arch: build install
71
72
	dh_testdir
	dh_testroot
73
	dh_movefiles
74

calc's avatar
calc committed
75
	dh_installdocs
76
77
	dh_installexamples
	dh_installmanpages
78
79
	dh_installchangelogs 
	dh_link
80
	dh_strip
81
82
	dh_compress
	dh_fixperms
calc's avatar
calc committed
83
	dh_makeshlibs -V
84
85
	dh_installdeb
	dh_shlibdeps
86
	dh_gencontrol
87
88
89
90
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
calc's avatar
calc committed
91
.PHONY: autotools build clean binary-indep binary-arch binary install configure