File: rules

package info (click to toggle)
openslp-dfsg 1.2.1-7.5
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 4,556 kB
  • ctags: 2,620
  • sloc: ansic: 21,723; sh: 9,326; yacc: 597; lex: 335; makefile: 286
file content (120 lines) | stat: -rwxr-xr-x 3,049 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
#!/usr/bin/make -f

# Comment this to turn off verbose mode.
export DH_VERBOSE=1

# This has to be exported to make some magic below work.
export DH_OPTIONS

# shared library versions, option 1
version=1.0.1
major=1

DEB_BUILD_GNU_CPU ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU)
DEB_BUILD_GNU_SYSTEM ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

ifeq ($(DEB_BUILD_GNU_SYSTEM),kfreebsd-gnu)
DEB_BUILD_GNU_TYPE := $(DEB_BUILD_GNU_CPU)-gnu
endif
ifeq ($(DEB_BUILD_GNU_SYSTEM),knetbsd-gnu)
DEB_BUILD_GNU_TYPE := $(DEB_BUILD_GNU_CPU)-gnu
endif

build: build-stamp
build-stamp:
	dh_testdir

	cp -f /usr/share/misc/config.guess /usr/share/misc/config.sub .
	touch Makefile.in # work around patch timestamp problems
	./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
		    --prefix=/usr --mandir=\$${prefix}/share/man        \
	            --infodir=\$${prefix}/share/info --enable-slpv1     \
		    --enable-async-api $(DEB_BUILD_GNU_TYPE) --disable-static
	# Compile the package.
	$(MAKE)

	touch build-stamp

clean:
	dh_testdir
	dh_testroot

	# Clean up after the build process.
	[ ! -f Makefile ] || $(MAKE) clean
	rm -f build-stamp config.status debian/substvars debian/conffiles

	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	# Install the package into debian/tmp.
	$(MAKE) install DESTDIR=`pwd`/debian/tmp


# Build architecture-independent files here.
binary-indep: 
	dh_testdir -i
	dh_testroot -i
	dh_installdocs -i -XCVS
	dh_installchangelogs -i ChangeLog
	dh_compress -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir -a
	dh_testroot -a
	dh_installinit -a
	dh_installdocs -a -XCVS

        # build libslp${major} package by moving files from debian/tmp
	dh_movefiles -plibslp$(major)        \
               usr/lib/libslp.so.$(major)    \
               usr/lib/libslp.so.$(version)


        # build libslp-dev package by moving files from debian/tmp
	dh_movefiles -plibslp-dev usr/include usr/lib

        # build slptool package by moving files from debian/tmp
	dh_movefiles -pslptool usr/bin/slptool

        # build slpd package by moving files from debian/tmp
	dh_movefiles -pslpd /etc /usr/sbin

	# Remove the installed html documentation (we'll pull it in by 
        # install-docs) into openslp-doc package
	rm -rf debian/tmp/usr/doc

        # remove empty directories in slpd package
	rmdir debian/tmp/usr/include
	rmdir debian/tmp/usr/lib

	dh_installexamples -a
#	dh_installmenu
#	dh_installcron
	dh_installdebconf -a
	dh_installman -pslpd debian/slpd.8 
	dh_installman -pslptool debian/slptool.1
	dh_installchangelogs -a ChangeLog
	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

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