File: rules

package info (click to toggle)
fortunes-bg 1.4%2Bnmu2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 296 kB
  • sloc: makefile: 48
file content (67 lines) | stat: -rwxr-xr-x 1,385 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
#!/usr/bin/make -f

SHELL = /bin/bash

package = fortunes-bg

source = bgauthors intauthors bgproverb intproverb history others
compiled = $(source:%=%.dat)
u8 = $(source:%=%.u8)

FORTUNEROOT=/usr/share/games/fortunes

BUILD_DATE := $(shell dpkg-parsechangelog --show-field Date)

build-indep: $(compiled) $(u8)
	$(checkdir)
	rm -r bg/
	mkdir bg
	cp -d $(source) $(compiled) $(u8) bg/

build-arch:
	$(checkdir)

build: build-indep build-arch

install: build
	cp -r bg/ $(FORTUNEROOT)/

%.dat: %
	strfile $<

%.u8: %
	ln -s $< $@

clean:
	$(checkdir)
	-rm -rf *~ tmp files* substvars
	-rm -f *.dat *.u8

binary-indep:	build-indep
	$(checkdir)
	-rm -rf tmp
	install -d tmp/DEBIAN
	install -d tmp/usr/share/doc/$(package)
	cp copyright tmp/usr/share/doc/$(package)
	cp changelog tmp/usr/share/doc/$(package)/changelog
	gzip -9nv tmp/usr/share/doc/$(package)/changelog
	install -d tmp/usr/share/games/fortunes/bg/
	cp -d $(source) $(compiled) $(u8) tmp/usr/share/games/fortunes/bg/
	dpkg-gencontrol -isp
	chmod -R go=rX,u=rwX tmp
	find debian/tmp -newermt '$(BUILD_DATE)' -print0 | \
		xargs -0r touch --no-dereference --date='$(BUILD_DATE)'
	dpkg-deb --root-owner-group --build tmp ..

binary-arch:	build-arch

define checkdir
	test -f bgauthors -a -f debian/rules
endef

binary: binary-indep binary-arch


.PHONY: build-arch build-indep build \
	binary binary-arch binary-indep \
	clean