File: rules

package info (click to toggle)
termcap-compat 1.1.1.1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 1,064 kB
  • ctags: 66
  • sloc: ansic: 775; makefile: 132; sh: 19
file content (66 lines) | stat: -rwxr-xr-x 2,005 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
#!/usr/bin/make -f
#

# Must now be compiled with altgcc

build:
	$(checkdir)
	PATH=/usr/i486-linuxlibc1/bin:$$PATH \
		$(MAKE) CFLAGS="-O2 -D_REENTRANT -I."
	touch build

clean:
	$(checkdir)
	-rm -rf build debian/files debian/tmp debian/*~
	-rm -f .depend .emacs.desktop
	-$(MAKE) clean

binary: binary-indep binary-arch

binary-indep: checkroot build

binary-arch: checkroot build
	$(checkdir)
	-rm -rf debian/tmp debian/substvars
# Make the directory tree.
	install -d debian/tmp debian/tmp/DEBIAN
	install -d debian/tmp/lib
	install -d debian/tmp/etc
	install -d debian/tmp/usr/doc/termcap-compat
# Copy copyright file and executables to their proper places.
	install -m 644 debian/copyright debian/tmp/usr/doc/termcap-compat
	install -m 644 libtermcap.so.2.0.8 debian/tmp/lib
	strip --strip-unneeded debian/tmp/lib/libtermcap.so.2.0.8
	(cd debian/tmp/lib && ln -s libtermcap.so.2.0.8 libtermcap.so.2)
	install -m 644 termtypes.tc debian/tmp/etc/termcap
	install -m 644 ChangeLog debian/tmp/usr/doc/termcap-compat/changelog
	install -m 644 debian/changelog \
		debian/tmp/usr/doc/termcap-compat/changelog.Debian
# Compress documentation...
	test -f debian/tmp/usr/doc/termcap-compat/changelog.Debian.gz || \
		gzip -9 debian/tmp/usr/doc/termcap-compat/changelog.Debian
	test -f debian/tmp/usr/doc/termcap-compat/changelog.gz || \
		gzip -9 debian/tmp/usr/doc/termcap-compat/changelog
# Make the debian control area
	install -m 755 debian/{preinst,postrm} debian/tmp/DEBIAN
	install -m 644 debian/conffiles debian/tmp/DEBIAN
# Fix permissions...
	chmod -R u=rwX,go=rX debian/tmp
	chown -R root.root debian/tmp
# And finally, build the Debian package!
	dpkg-shlibdeps debian/tmp/lib/libtermcap.so.2.0.8
	dpkg-gencontrol -isp
	dpkg --build debian/tmp ..

define checkdir
	test -f tparam.c -a -f debian/rules
endef

source diff:
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

checkroot:
	$(checkdir)
	test "`whoami`" = root

.PHONY: binary binary-arch binary-indep clean checkroot