File: rules

package info (click to toggle)
fgetty 0.6-4
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 144 kB
  • ctags: 45
  • sloc: ansic: 579; makefile: 84
file content (64 lines) | stat: -rwxr-xr-x 1,665 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
#!/usr/bin/make -f

STRIP =strip

ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
  STRIP =: nostrip
endif

DIR =$(shell pwd)/debian/fgetty

patch: deb-checkdir patch-stamp
patch-stamp:
	for i in `ls -1 debian/diff/*.diff || :`; do \
	  patch -p0 <$$i || exit 1; \
	done
	touch patch-stamp

build: deb-checkdir build-stamp
build-stamp: patch-stamp
	$(MAKE) DIET='diet -v -Os'
	touch build-stamp

clean: deb-checkdir deb-checkuid
	$(MAKE) clean
	test ! -e patch-stamp || \
	  for i in `ls -1r debian/diff/*.diff || :`; do \
	    patch -p0 -R <$$i; \
	  done
	rm -f build-stamp patch-stamp
	rm -rf '$(DIR)' '$(DIR)'-run
	rm -f debian/files changelog

install: deb-checkdir deb-checkuid build-stamp
	rm -rf '$(DIR)'
	install -d -m0755 '$(DIR)'/sbin
	install -d -m0755 '$(DIR)'/bin
	install -m0755 login '$(DIR)'/bin/fgetty-login
	install -m0755 login2 '$(DIR)'/bin/fgetty-login2
	install -m0755 checkpassword '$(DIR)'/bin/
	install -m0755 fgetty '$(DIR)'/sbin/
	$(STRIP) -R .comment -R .note '$(DIR)'/sbin/* '$(DIR)'/bin/*
	# man pages
	install -d -m0755 '$(DIR)'/usr/share/man/man8
	install -m0644 fgetty.8 debian/checkpassword.8 \
	  '$(DIR)'/usr/share/man/man8/
	gzip -9 '$(DIR)'/usr/share/man/man8/*.8
	# lintian overrides
	install -m0755 -d '$(DIR)'/usr/share/lintian/overrides
	install -m0644 debian/fgetty.lintian \
	  '$(DIR)'/usr/share/lintian/overrides/fgetty
	# changelog
	rm -f changelog && ln -s CHANGES changelog

binary-indep:

binary-arch: install fgetty.deb
	dpkg-gencontrol -isp -pfgetty -P'$(DIR)'
	dpkg -b '$(DIR)' ..

binary: binary-indep binary-arch

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

include debian/implicit