File: rules

package info (click to toggle)
archzoom 0.5.1-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,668 kB
  • ctags: 839
  • sloc: perl: 6,606; sh: 528; makefile: 168
file content (87 lines) | stat: -rwxr-xr-x 2,437 bytes parent folder | download | duplicates (3)
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
86
87
#!/usr/bin/make -f

INSTALL = install
INSTALL_FILE    = $(INSTALL) -p    -o root -g root  -m  644
INSTALL_PROGRAM = $(INSTALL) -p    -o root -g root  -m  755
INSTALL_SCRIPT  = $(INSTALL) -p    -o root -g root  -m  755
INSTALL_DIR     = $(INSTALL) -p -d -o root -g root  -m  755

package=archzoom

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


build: build-stamp

build-stamp: configure-stamp 
	$(checkdir)

# since configure isn't in the upstream tarball yet
	chmod +x ./configure
	./configure --bindir=/usr/lib/cgi-bin --datadir=/usr/share \
	            --sysconfdir=/etc/archzoom --localstatedir=/var/run \
		    --with-statedir=/var/run \
		    --with-cachedir=/var/cache/archzoom \
		    --with-homedir=/etc/archzoom
		   
	$(MAKE)

	touch build-stamp

clean:
	$(checkroot)
	rm -f config.log config.status
	rm -rf debian/archzoom
	rm -f build-stamp configure-stamp

install: build
	$(INSTALL_DIR) debian/archzoom
	$(MAKE) install DESTDIR=$(CURDIR)/debian/archzoom

# Build architecture-independent files here.
binary-indep: build install
	$(checkroot)
	
	$(INSTALL_DIR) debian/archzoom/usr/share/doc/archzoom \
		       debian/archzoom/etc/archzoom/.arch-params/=locations \
		       debian/archzoom/DEBIAN

	chown -R root:root debian/archzoom/usr debian/archzoom/etc
	chmod 644 debian/archzoom/etc/archzoom/archzoom.conf
	chmod -R a+rX debian/archzoom/usr debian/archzoom/etc
	$(INSTALL_FILE) debian/changelog \
			debian/archzoom/usr/share/doc/archzoom/changelog.Debian
	$(INSTALL_FILE) NEWS \
			debian/archzoom/usr/share/doc/archzoom/changelog
	$(INSTALL_FILE) debian/copyright debian/README.Debian TODO \
			debian/archzoom/usr/share/doc/archzoom

	gzip -9fq debian/archzoom/usr/share/doc/archzoom/changelog*
	cd debian/archzoom && find * -type f ! -regex '^DEBIAN/.*' -print0 | xargs -r0 md5sum >DEBIAN/md5sums
	$(INSTALL_FILE) debian/conffiles debian/archzoom/DEBIAN
	dpkg-gencontrol -isp -parchzoom -Pdebian/archzoom
	chown -R root:root debian/archzoom
	chmod -R go=rX debian/archzoom

	chown www-data:www-data debian/archzoom/var/cache/archzoom

	dpkg --build debian/archzoom ..

# Build architecture-dependent files here.
binary-arch: build install
# nothing arch-dependent yet

binary: binary-indep binary-arch

define checkdir
test -f debian/rules
endef

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

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