File: rules

package info (click to toggle)
yafc 1.1.1.dfsg.1-3
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 3,244 kB
  • ctags: 1,679
  • sloc: ansic: 19,338; sh: 10,365; makefile: 155; perl: 38; ruby: 33
file content (93 lines) | stat: -rwxr-xr-x 2,303 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
82
83
84
85
86
87
88
89
90
91
92
93
#!/usr/bin/make -f
# Sample debian/rules that uses debhelper.
# This file is public domain software, originally written by Joey Hess.

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

DEB_CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
DEB_CFLAGS += -O0
else
DEB_CFLAGS += -O2
endif

export DEB_HOST_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)

patch: patch-stamp
patch-stamp:
	QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2
	touch patch-stamp

unpatch:
	QUILT_PATCHES=debian/patches quilt pop -a -R || test $$? = 2
	rm -rf .pc patch-stamp

configure: configure-stamp
configure-stamp: patch-stamp
	dh_testdir

	# Add here commands to configure the package.
	CFLAGS='$(DEB_CFLAGS)' ./configure --build='$(DEB_BUILD_GNU_TYPE)' --host='$(DEB_HOST_GNU_TYPE)' --prefix='/usr' --sysconfdir='/etc' --mandir='$${prefix}/share/man' --infodir='$${prefix}/share/info' --without-krb4 --without-krb5

	touch configure-stamp

build: configure-stamp build-stamp
build-stamp:
	dh_testdir

	# Add here commands to compile the package.
	$(MAKE)

	touch build-stamp

clean: unpatch
	dh_testdir
	dh_testroot

	# Add here commands to clean up after the build process.
	-$(MAKE) distclean
	rm -f doc/yafc.info

	dh_clean patch-stamp configure-stamp build-stamp debian/yafc.copyright

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	# Add here commands to install the package into debian/<packagename>
	$(MAKE) prefix=$(CURDIR)/debian/yafc/usr install
	# NOTE: upstream Makefile doesn't install this currently.
	install -m 644 yafcrc.sample $(CURDIR)/debian/yafc/etc/yafcrc


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

# Build architecture-dependent files here.
binary-arch: build install
	cat debian/yafc.copyright.in COPYRIGHT > debian/yafc.copyright
	dh_testdir
	dh_testroot
	dh_installchangelogs NEWS
	dh_installdocs
	dh_installexamples
	dh_installmenu
	dh_installinfo
	dh_installman
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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