File: rules

package info (click to toggle)
libapache-mod-auth-sys 1.10-4.1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 40 kB
  • ctags: 19
  • sloc: ansic: 181; sh: 76; makefile: 41
file content (56 lines) | stat: -rwxr-xr-x 1,578 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
#!/usr/bin/make -f

arch=$(shell dpkg --print-architecture)

package=libapache-mod-auth-sys
tempdir=$(shell pwd)/debian/tmp
insdirs=$(tempdir)/$(package)/DEBIAN \
	$(tempdir)/$(package)/usr/doc/$(package) \
	$(tempdir)/$(package)/usr/lib/apache/1.3

binary: binary-indep binary-arch

binary-arch: debian/control checkroot build $(insdirs)
	install -m 755 debian/postinst $(tempdir)/$(package)/DEBIAN
	install -m 755 debian/postrm $(tempdir)/$(package)/DEBIAN
	install -s -m 644 mod_auth_sys.so $(tempdir)/$(package)/usr/lib/apache/1.3
	install -m 644 debian/330mod_auth_sys.info $(tempdir)/$(package)/usr/lib/apache/1.3
	install -m 644 debian/changelog $(tempdir)/$(package)/usr/doc/$(package)/changelog.Debian
	find $(tempdir)/$(package)/usr/doc -type f | xargs -r gzip -v9	
	install -m 644 debian/copyright $(tempdir)/$(package)/usr/doc/$(package)
	dpkg-gencontrol -P$(tempdir)/$(package) -p$(package)
	dpkg --build $(tempdir)/$(package) ..

binary-indep: debian/control checkroot build $(insdirs)

build: debian/control
	/usr/sbin/apxs -c mod_auth_sys.c
	touch build

checkroot: debian/control
	test "root" = "$(shell whoami)"

clean: debian/control
	for i in build debian/files debian/substvars mod_auth_sys.o mod_auth_sys.so `find -name "*~"`; do \
		if [ -e $$i ]; then \
			rm -f $$i; \
		fi; \
	done
	for i in $(tempdir); do \
		if [ -d $$i ]; then \
			rm -rf $$i; \
		fi; \
	done

$(insdirs):
	if [ -d $@ ]; then \
		rm -rf $@; \
	fi
	install -d -m 755 $@
	chmod g-s $@

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

#Local variables:
#mode: makefile
#End: