File: rules

package info (click to toggle)
raidtools2 0.90.20010914-15
  • links: PTS
  • area: main
  • in suites: woody
  • size: 692 kB
  • ctags: 467
  • sloc: ansic: 2,861; sh: 187; makefile: 144
file content (86 lines) | stat: -rwxr-xr-x 2,511 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
77
78
79
80
81
82
83
84
85
86
#!/usr/bin/make -f
# Made with the aid of debmake, by Christoph Lameter,
# based on the sample debian/rules file for GNU hello by Ian Jackson.

package=raidtools2
installbin = install -o root -g root -m 755
installdoc = install -o root -g root -m 644
raidstartlinks = raidstop raidhotadd raidhotremove raidhotgenerateerror raidsetfaulty
mkraidlinks = raid0run

build:
	$(checkdir)
	./configure --prefix=/usr --sysconf=/etc
	$(MAKE) 
	touch build

clean:
	$(checkdir)
	-rm -f build
	-$(MAKE) clean
	-rm -f `find . -name "*~"`
	-rm -rf debian/tmp debian/files debian/substvars debian/*debhelper

binary-indep: checkroot build
	$(checkdir)
# There are no architecture-independent files to be uploaded
# generated by this package.  If there were any they would be
# made here.

binary-arch: checkroot build
	$(checkdir)
	-rm -rf debian/tmp
	$(installbin) -d debian/tmp
	cd debian/tmp && $(installbin) -d `cat ../dirs`
	$(installbin) raidstart mkraid mkpv debian/tmp/sbin
	for i in $(raidstartlinks); do \
	  ln -sf raidstart debian/tmp/sbin/$$i ;\
	done
	for i in $(mkraidlinks); do \
	  ln -sf mkraid debian/tmp/sbin/$$i ;\
	done
	$(installbin) debian/raid2 debian/tmp/etc/init.d	
	$(installdoc) debian/raidtools2.mod debian/tmp/etc/modutils/raidtools2
	$(installdoc) debian/logcheck.normal debian/tmp/etc/logcheck/ignore.d.server/raidtools2
	ln -s ../ignore.d.server/raidtools2 debian/tmp/etc/logcheck/ignore.d.workstation/raidtools2
	$(installdoc) debian/logcheck.paranoid debian/tmp/etc/logcheck/ignore.d.paranoid/raidtools2

#	dh_installdirs
	dh_installdebconf
	dh_installdocs Software-RAID.HOWTO README
	dh_installexamples raid0.conf.sample raid1.conf.sample \
raid4.conf.sample raid5.conf.sample raidtab.sample multipath.conf.sample
	dh_installchangelogs
#	dh_installmenu
#	dh_installcron
	dh_installmanpages ckraid.8
	dh_installcron
	ln -sf mdrun.8.gz debian/tmp/usr/share/man/man8/ckraid.8.gz
	ln -sf raidhotadd.8.gz debian/tmp/usr/share/man/man8/raidhotremove.8.gz
	ln -sf raidhotgenerateerror.8.gz debian/tmp/usr/share/man/man8/raidsetfaulty.8.gz
#	dh_undocumented raidhotadd.8 raidhotremove.8
#	dh_movefiles
	dh_strip
	dh_compress
	dh_fixperms
	dh_shlibdeps
	dh_gencontrol
	dh_makeshlibs
	dh_installdeb
	dh_md5sums
	dpkg-gencontrol
	chown -R root.root debian/tmp
	cd debian/tmp && chmod 755 `cat ../dirs`
	dh_builddeb

define checkdir
	test -f debian/rules
endef

binary: binary-indep binary-arch

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

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