File: rules

package info (click to toggle)
hesiod 3.0.2-15.1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 384 kB
  • ctags: 112
  • sloc: ansic: 1,269; sh: 232; makefile: 145
file content (81 lines) | stat: -rwxr-xr-x 1,815 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.

#export DH_VERBOSE=1
DH_COMPAT=3

export DH_COMPAT

CFLAGS = -O2 -Wall
INSTALL = install
     
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
  CFLAGS += -g
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
  INSTALL += -s
endif

package=hesiod

version=$(shell expr `pwd` : '.*-\([0-9.]*\)')
version_major=$(shell expr `pwd` : '.*-\([0-9]*\).[0-9.]*')

build: build-stamp
build-stamp:
	dh_testdir
	CPPFLAGS=-D_REENTRANT ./configure --prefix=/usr --sysconfdir=/etc

	$(MAKE) CFLAGS=${CFLAGS}
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	-rm -f build-stamp
	-$(MAKE) distclean
	dh_clean

binary-indep:
	@echo Nothing to do

binary-arch: build install
	dh_testdir -a
	dh_testroot -a
	dh_installdocs -plibhesiod0
	dh_installdebconf -a
	dh_undocumented
	dh_installexamples -plibhesiod0
	dh_installchangelogs -plibhesiod0
	dh_strip -a
	dh_link -a
	dh_compress -a
	dh_fixperms -a
	dh_makeshlibs -a
	dh_shlibdeps -a -l./debian/libhesiod0/usr/lib
	dh_installdeb -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	$(MAKE) prefix=`pwd`/debian/hesiod/usr sysconfdir=`pwd`/debian/tmp/etc \
		mandir=`pwd`/debian/hesiod/usr/share/man install
	install -m 644 hesiod.conf.sample debian/hesiod/etc/hesiod.conf	
	dh_movefiles --sourcedir=debian/hesiod
	rm -rf debian/hesiod/usr/include debian/hesiod/usr/lib \
	       debian/hesiod/usr/share/man/man3 debian/hesiod/etc \
	       debian/hesiod/usr/share/man/man5

#get-orig-source:
#	wget ftp://athena-dist.mit.edu/pub/ATHENA/hesiod/hesiod-3.0.2.tar.gz

binary: binary-indep binary-arch

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