File: rules

package info (click to toggle)
silo 0.9.8-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 988 kB
  • ctags: 2,245
  • sloc: ansic: 10,619; asm: 2,783; makefile: 405; perl: 77; sh: 3
file content (125 lines) | stat: -rwxr-xr-x 2,926 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#!/usr/bin/make -f

# (C) 1999 Davide Barbieri <paci@prosa.it>
#                          <paci@debian.org>
#                          <paci@pluto.linux.it>
#
# This software is under GPL (http://www.gnu.org/copyleft/gpl.html)

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

ARCH:=$(shell dpkg --print-architecture)

# Ugly hack: There are binaries present in the sources, so I must preserve
# them:
define  backup
        if ! test -d boot.orig ; then mv boot boot.orig ; mkdir boot ; fi
	if ! test -d sbin.orig ; then mv sbin sbin.orig ; mkdir sbin ; fi
	if ! test -d misc.orig ; then mv misc misc.orig ; mkdir misc ; fi
endef

define  unbackup
	if test -d boot.orig ; then rm -rf boot ; mv boot.orig boot ; fi
	if test -d sbin.orig ; then rm -rf sbin ; mv sbin.orig sbin ; fi
	if test -d misc.orig ; then rm -rf misc ; mv misc.orig misc ; fi
endef

build: build-stamp
build-stamp:
	dh_testdir

	# Add here commands to compile the package.
	$(backup)
	$(MAKE)

	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp install-stamp

	# Add here commands to clean up after the build process.
	$(backup)
	-$(MAKE) clean
	#-$(MAKE) distclean
	$(unbackup)

	#dh_clean 
ifeq ($(ARCH),i386)
	# compile under sparc, before make intelsilo
else
	dh_clean
endif

install: install-stamp
install-stamp: build-stamp
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	# Add here commands to install the package into debian/tmp.
	#$(MAKE) prefix=`pwd`/debian/tmp/usr install

ifeq ($(ARCH),i386)
	install -m 755  -d debian/tmp/usr/lib/silo debian/tmp/usr/bin
	cp boot/*.b debian/tmp/usr/lib/silo
	install -s misc/intelsilo debian/tmp/usr/bin
else
	cp boot/*.b debian/tmp/boot
	cp etc/silo.conf debian/tmp/etc/silo.conf
	install -s sbin/silo debian/tmp/sbin/silo
	install -s misc/silocheck debian/tmp/sbin/silocheck
	install debian/siloconfig debian/tmp/usr/sbin/siloconfig
	install debian/postinst debian/tmp/DEBIAN
	cp debian/conffiles debian/tmp/DEBIAN
endif

	touch install-stamp

# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build install
#	dh_testversion
	dh_testdir
	dh_testroot
	dh_installdocs
#	dh_installexamples
#	dh_installmenu
#	dh_installemacsen
#	dh_installinit
#	dh_installcron
	dh_installmanpages
	dh_undocumented
	dh_installchangelogs
	dh_strip
	dh_compress
	dh_fixperms
#	dh_suidregister
	dh_installdeb
	dh_shlibdeps
#	dh_gencontrol
ifeq ($(ARCH),i386)
	dh_gencontrol -pintelsilo
else 
	dh_gencontrol -psilo
endif
#	dh_makeshlibs
	dh_md5sums

ifeq ($(ARCH),i386)
	dh_builddeb -pintelsilo
else 
	dh_builddeb -psilo
endif

source diff:                                                                  
	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

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