File: rules

package info (click to toggle)
aee 2.2.15b-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 804 kB
  • ctags: 1,658
  • sloc: ansic: 17,476; sh: 469; makefile: 89
file content (76 lines) | stat: -rwxr-xr-x 1,935 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
#!/usr/bin/make -f
#
# Based in the sample debian/rules file for GNU Hello.
# Copyright 1994,1995 by Ian Jackson

package = aee
docdir = debian/tmp/usr/share/doc/$(package)

ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
  CFLAGS += -O2
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
  INSTALL_PROGRAM += -s
endif


configure: configure-stamp
configure-stamp:
	$(checkdir)
	touch configure-stamp

build: configure-stamp build-stamp
build-stamp:
	$(checkdir)
	$(MAKE) both
	touch build-stamp

clean:
	$(checkdir)
	rm -f build-stamp configure-stamp
	-$(MAKE) clean
	rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars

install: checkroot build
	$(checkdir)
	rm -rf debian/tmp
	install -d debian/tmp/DEBIAN $(docdir)
	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp

binary-indep: build install
binary-arch: checkroot build install
	$(checkdir)
	strip debian/tmp/usr/bin/aee
	strip debian/tmp/usr/X11R6/bin/xae
	install -m 755 \
		debian/preinst debian/postinst \
		debian/prerm debian/postrm \
		debian/tmp/DEBIAN
	cp -a README.aee aee.i18n.guide aee.1.ps debian/copyright $(docdir)
	cp -a debian/README.Debian $(docdir)
	cp -a debian/changelog $(docdir)/changelog.Debian
	cp -a Changes $(docdir)/changelog
	cd $(docdir) && gzip -9 changelog changelog.Debian README.aee aee.1.ps
	gzip -r9 debian/tmp/usr/share/man
	chmod -x debian/tmp/usr/X11R6/man/man1/xae.1x.gz
	chmod -x debian/tmp/usr/share/man/man1/aee.1.gz
	install -d debian/tmp/usr/lib/menu/aee
	cp -a debian/menu debian/tmp/usr/lib/menu/aee/
	dpkg-shlibdeps debian/tmp/usr/bin/aee
	dpkg-shlibdeps debian/tmp/usr/X11R6/bin/xae
	dpkg-gencontrol -isp
	chown -R root:root debian/tmp
	chmod -R u+w,go=rX debian/tmp
	dpkg --build debian/tmp ..


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

checkroot:
	$(checkdir)
	test $$(id -u) = 0

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