File: rules

package info (click to toggle)
checkinstall 1.6.2%2Bgit20170426.d24a630-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 1,660 kB
  • sloc: ansic: 3,232; sh: 2,398; makefile: 125
file content (63 lines) | stat: -rwxr-xr-x 2,053 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/make -f

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

%:
	dh $@

override_dh_auto_build:
	dh_auto_build
	docbook-to-man debian/checkinstall.sgml > debian/checkinstall.8
	docbook-to-man debian/installwatch.sgml > debian/installwatch.1

override_dh_auto_clean:
	$(MAKE) clean
	rm -f debian/checkinstall.8
	rm -f debian/installwatch.1

ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
TESTDIR=$(CURDIR)/debian/testtmp
override_dh_auto_test:
		$(MAKE) -C installwatch test PREFIX=$(TESTDIR)
		rm -rf $(TESTDIR)
endif

TMPDIR=$(CURDIR)/debian/tmp
override_dh_auto_install:
	# We override all paths: we want the binary in bin instead of
	# sbin, the configuration file in etc, the locales in the
	# standard directory, and the installwatch library in a subdir
	# of usr/lib
	$(MAKE) install PREFIX=$(TMPDIR)/usr LCDIR=$(TMPDIR)/usr/share/locale \
		CONFDIR=$(TMPDIR)/etc BINDIR=$(TMPDIR)/usr/bin \
		LIBDIR=$(TMPDIR)/usr/lib/checkinstall
	# Delete the checkinstallrc-dist file from etc
	rm -f $(TMPDIR)/etc/checkinstallrc-dist

	# installwatch's documentation
	mkdir -p $(TMPDIR)/usr/share/doc/checkinstall
	gzip -9c installwatch/CHANGELOG \
		> $(TMPDIR)/usr/share/doc/checkinstall/installwatch.changelog.gz
	gzip -9c debian/changelog.installwatch.old \
		> $(TMPDIR)/usr/share/doc/checkinstall/installwatch.changelog.Debian.gz
	cp installwatch/BUGS \
		$(TMPDIR)/usr/share/doc/checkinstall/BUGS.installwatch
	cp installwatch/README \
		$(TMPDIR)/usr/share/doc/checkinstall/README.installwatch
	cp installwatch/TODO \
		$(TMPDIR)/usr/share/doc/checkinstall/TODO.installwatch

	# Enable installwatch to find the shared library
	sed -i -e 's|$(TMPDIR)||' $(TMPDIR)/usr/bin/installwatch
	sed -i -e 's|PREFIX/lib|PREFIX/lib/checkinstall|' \
		$(TMPDIR)/usr/bin/installwatch

	# Remove absolute buildpath
	sed -i -e 's|^INSTALLDIR=.*|INSTALLDIR=/usr|' $(TMPDIR)/usr/bin/checkinstall

	# Remove unwanted makepak binary
	rm -f $(TMPDIR)/usr/bin/makepak

override_dh_installman:
	dh_installman debian/installwatch.1 debian/checkinstall.8