File: rules

package info (click to toggle)
fstrcmp 0.7.D001-1.1
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 1,440 kB
  • ctags: 203
  • sloc: sh: 3,493; ansic: 1,505; makefile: 500; awk: 110
file content (78 lines) | stat: -rwxr-xr-x 1,795 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
#!/usr/bin/make -f

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

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

config.status: configure
	dh_testdir
	dh_autotools-dev_updateconfig
	dh_autoreconf
	sh configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc \
		--mandir=/usr/share/man CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"

build: build-arch build-indep

build-arch: build-stamp

build-indep: build-stamp

# Build and test the tarball.
build-stamp: config.status
	dh_testdir
	$(MAKE)
	$(MAKE) check
	touch $@

# dpkg-buildpackage (step 3) invokes 'fakeroot debian/rules clean', and after
# that (step 5) does the actual build.
clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	test ! -f Makefile || $(MAKE) distclean
	dh_autoreconf_clean
	dh_autotools-dev_restoreconfig
	dh_clean

# Install the built tarball into the temporary install tree. It depends on the
# 'build' target, so the tarball is also built by this rule.
install: build
	dh_testdir
	dh_testroot
	dh_prep
	dh_installdirs -A
	mkdir -p $(CURDIR)/debian/tmp/usr/lib
	mkdir -p $(CURDIR)/debian/tmp/usr/share
	$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
	-rm $(CURDIR)/debian/tmp/usr/lib/*.la
	-rm -f $(CURDIR)/debian/tmp/usr/share/man/man1/fstrcmp_license.1

# Build the binary package files here.
binary binary-arch binary-indep: install
	dh_testdir
	dh_testroot
	dh_installchangelogs
	dh_installdocs -A
	dh_install --fail-missing --sourcedir=debian/tmp
	dh_installman -A
	dh_strip --dbg-package=libfstrcmp0-dbg
	dh_compress -A
	dh_fixperms
	dh_makeshlibs
	dh_shlibdeps
	dh_installdeb
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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

# vim: set ts=8 sw=8 noet :