File: rules

package info (click to toggle)
adduser 3.8
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 64 kB
  • ctags: 20
  • sloc: perl: 498; makefile: 42
file content (56 lines) | stat: -rwxr-xr-x 1,449 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
#!/usr/bin/make -f

package = adduser
version = $(shell dpkg-parsechangelog | awk '/^Version/{print $$2}')

build:
	$(checkdir)
	touch build

clean:
	$(checkdir)
	-rm -rf build *~ debian/tmp debian/{*~,files*,substvars}

binary-indep:	checkroot build
	$(checkdir)
	-rm -rf debian/tmp
	umask 000
	install -d debian/tmp/{DEBIAN,etc,usr/{sbin,doc/adduser,man/man{5,8}}}
	cp adduser.conf debian/tmp/etc
	sed -e s/VERSION/$(version)/g adduser > debian/tmp/usr/sbin/adduser
	chmod +x debian/tmp/usr/sbin/adduser
	ln -s adduser debian/tmp/usr/sbin/addgroup
	sed -e s/VERSION/$(version)/g adduser.conf.5 > \
	  debian/tmp/usr/man/man5/adduser.conf.5
	sed -e s/VERSION/$(version)/g adduser.8 > \
	  debian/tmp/usr/man/man8/adduser.8
	ln -s adduser.8.gz debian/tmp/usr/man/man8/addgroup.8.gz
	cp debian/changelog debian/tmp/usr/doc/adduser/
	find debian/tmp/usr/{doc,man} -type f | xargs gzip -9f
	cp debian/copyright debian/tmp/usr/doc/adduser/ 
	cp debian/conffiles debian/tmp/DEBIAN
	dpkg-gencontrol -isp
	chown -R root.root debian/tmp
	chmod -R g-ws debian/tmp
	dpkg --build debian/tmp ..

binary-arch:	checkroot build
	$(checkdir)

define checkdir
	test -f $(package) -a -f debian/rules
endef

binary:		binary-indep binary-arch

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

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

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

# Local Variables:
# mode:Makefile