File: rules

package info (click to toggle)
archway 0.2.1%2Bpatch-84-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 2,568 kB
  • ctags: 456
  • sloc: perl: 6,270; makefile: 179
file content (93 lines) | stat: -rwxr-xr-x 3,161 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
88
89
90
91
92
93
#!/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=arch-perl

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


build: build-stamp

build-stamp: configure-stamp 
	$(checkdir)

	touch build-stamp

clean:
	$(checkroot)
	rm -rf debian/archway
	rm -f build-stamp configure-stamp

install: build
# bypass install procedure

# Build architecture-independent files here.
binary-indep: build install
	$(checkroot)
	
	$(INSTALL_DIR) debian/archway/usr/bin \
		       debian/archway/usr/share/archway/images/logo \
		       debian/archway/usr/share/perl5/ArchWay/MainWindow \
		       debian/archway/usr/share/perl5/ArchWay/Util \
		       debian/archway/usr/share/perl5/ArchWay/Widget/ArchiveRegistry \
		       debian/archway/usr/share/perl5/ArchWay/Widget/Inventory \
		       debian/archway/usr/share/doc/archway \
		       debian/archway/DEBIAN

	$(INSTALL_PROGRAM) bin/archway debian/archway/usr/bin
	ln -s archway debian/archway/usr/bin/archang
	ln -s archway debian/archway/usr/bin/archelf
	ln -s archway debian/archway/usr/bin/archeye
	ln -s archway debian/archway/usr/bin/archmag
	ln -s archway debian/archway/usr/bin/archrog
	ln -s archway debian/archway/usr/bin/archaos
	ln -s archway debian/archway/usr/bin/archgen
	ln -s archway debian/archway/usr/bin/archero
	$(INSTALL_PROGRAM) bin/archway-ssh-askpass debian/archway/usr/bin

	$(INSTALL_FILE) images/logo/*.jpg debian/archway/usr/share/archway/images/logo
	$(INSTALL_FILE) perllib/ArchWay/*.pm debian/archway/usr/share/perl5/ArchWay
	$(INSTALL_FILE) perllib/ArchWay/MainWindow/*.pm debian/archway/usr/share/perl5/ArchWay/MainWindow
	$(INSTALL_FILE) perllib/ArchWay/Util/*.pm debian/archway/usr/share/perl5/ArchWay/Util
	$(INSTALL_FILE) perllib/ArchWay/Widget/*.pm debian/archway/usr/share/perl5/ArchWay/Widget
	$(INSTALL_FILE) perllib/ArchWay/Widget/ArchiveRegistry/*.pm debian/archway/usr/share/perl5/ArchWay/Widget/ArchiveRegistry
	$(INSTALL_FILE) perllib/ArchWay/Widget/Inventory/*.pm debian/archway/usr/share/perl5/ArchWay/Widget/Inventory

	chown -R root:root debian/archway/usr
	chmod -R a+rX debian/archway/usr
	$(INSTALL_FILE) debian/changelog \
			debian/archway/usr/share/doc/archway/changelog.Debian
	$(INSTALL_FILE) debian/copyright README TODO doc/archway-aliases \
			debian/archway/usr/share/doc/archway

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

	dpkg --build debian/archway ..

# 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