File: rules

package info (click to toggle)
workman 1.3.4-9
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,164 kB
  • ctags: 1,170
  • sloc: ansic: 14,491; makefile: 142; sh: 44
file content (85 lines) | stat: -rwxr-xr-x 2,864 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/usr/bin/make -f
# debian.rules file for workman
# Derived from the 'hello' sample files provided by Ian Jackson.

package=workman

# Destination for Debian program
DESTDIR = debian/tmp/usr
# Enable debug information by Debian policy
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
PASS='-g'
else
PASS=''
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
STRIP='-s'
else
STRIP=''
endif

# The simple rules

build:
	$(checkdir)
	$(MAKE) -f Makefile.linux PASS=$(PASS)
	touch build

clean:
	$(checkdir)
	-rm -f build workman
	-$(MAKE) -f Makefile.linux -i clean
	-rm -rf debian/tmp *~ debian/*~ debian/files*

# The binary package

binary-indep: 	checkroot build                                                 
	$(checkdir)                                                             
                                                                               
binary-arch:  	checkroot build                                                 
	$(checkdir)               
	-rm -rf debian/tmp
	install -d debian/tmp debian/tmp/DEBIAN 
	install -d $(DESTDIR)/share/doc/$(package) 
	install -d $(DESTDIR)/bin 
	install -d $(DESTDIR)/share/man/man1 $(DESTDIR)/share/man/man5
	install -d $(DESTDIR)/lib/menu
	install -d $(DESTDIR)/X11R6/include/X11/pixmaps
	install -d $(DESTDIR)/X11R6/lib/help
	install -m '0755' debian/postinst debian/tmp/DEBIAN/postinst
	install -m '0755' debian/postrm debian/tmp/DEBIAN/postrm
	install -m '0755' debian/prerm debian/tmp/DEBIAN/prerm
	install $(STRIP) -g cdrom -m '2755' workman $(DESTDIR)/bin/workman
	install -m '0644' workman.info $(DESTDIR)/X11R6/lib/help/workman.info
	install -m '0644' workman.man $(DESTDIR)/share/man/man1/workman.1
	install -m '0644' workmandb.man $(DESTDIR)/share/man/man5/workmandb.5
	gzip -9v $(DESTDIR)/share/man/man1/workman.1 $(DESTDIR)/share/man/man5/workmandb.5
	ln -s workmandb.5.gz $(DESTDIR)/share/man/man5/workmanrc.5.gz
	install -m '0644' debian/copyright $(DESTDIR)/share/doc/$(package)
	install -m '0644' debian/changelog $(DESTDIR)/share/doc/$(package)/changelog.Debian
	gzip -9v $(DESTDIR)/share/doc/$(package)/changelog.Debian
	install -m '0644' README $(DESTDIR)/share/doc/$(package)
	gzip -9v $(DESTDIR)/share/doc/$(package)/README
	install -d $(DESTDIR)/share/doc/$(package)/HTML
	install -m '0644' HTML/* $(DESTDIR)/share/doc/$(package)/HTML
	install -m '0644' debian/menu $(DESTDIR)/lib/menu/$(package)
	install -m '0644' debian/workman.xpm $(DESTDIR)/X11R6/include/X11/pixmaps
	dpkg-shlibdeps workman
	dpkg-gencontrol -isp
	chown -R root.root debian/tmp
	chmod -R g-ws debian/tmp
	chown root.cdrom $(DESTDIR)/bin/workman
	chmod '2755' $(DESTDIR)/bin/workman
	dpkg --build debian/tmp ..

binary:		binary-indep binary-arch

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

define checkdir
	test -f plat_linux.c
endef

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