File: rules

package info (click to toggle)
uutraf 1.1-10
  • links: PTS
  • area: main
  • in suites: woody
  • size: 104 kB
  • ctags: 110
  • sloc: ansic: 805; makefile: 88; sh: 17
file content (50 lines) | stat: -rwxr-xr-x 1,444 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
#!/usr/bin/make -f
#                                                            -*- Makefile -*-
# The name of the package (for example, `emacs').
package	:= $(shell sed -n -e 's/Package: *\([a-z]\)/\1/p' debian/control)
tmp	:= debian/tmp
doc	:= usr/share/doc/$(package)
manroot := usr/share/man
man1	:= $(manroot)/man1
man5	:= $(manroot)/man5

build:
	make $(package) LIBDIR="/etc/uucp" && touch build

clean:
	-rm -f build
	-$(MAKE) -i distclean
	-rm -rf $(tmp)/* *~ *.orig ./\#*\# tmp.* debian/files*
	find -name '*~' -print0 | xargs -r0 rm --

binary-indep:

binary-arch: build
	-rm -rf $(tmp)
	install -d $(tmp)
	cd $(tmp) && install -d etc/uucp $(doc)
	cp debian/copyright $(tmp)/$(doc)/copyright
	cp debian/changelog $(tmp)/$(doc)/changelog.Debian
	gzip -9f $(tmp)/$(doc)/changelog.Debian
	make install prefix=$(tmp)
	gzip -9f $(tmp)/$(man1)/* $(tmp)/$(man5)/*
	dpkg-shlibdeps $(package)
	install -d $(tmp)/DEBIAN
	cd $(tmp) &&\
	  md5sum `find * -name DEBIAN -prune -o -type f -print`\
	   > DEBIAN/md5sums
	install -d $(tmp)/DEBIAN
	cd debian && install -m 755 postinst prerm tmp/DEBIAN
	cd debian && install -m 644 conffiles tmp/DEBIAN
	dpkg-gencontrol -isp
	chown -R root.root $(tmp)
	chmod -R g-ws,a+r,u+w $(tmp)
	dpkg-deb --build $(tmp) ..

# Below here is fairly generic really
binary:		binary-indep binary-arch

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

.PHONY: binary source diff clean