File: rules

package info (click to toggle)
nordugrid-arc 5.4.4-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 31,924 kB
  • sloc: cpp: 161,093; sh: 18,956; php: 15,485; perl: 15,265; python: 4,117; makefile: 3,953; ansic: 1,065; xml: 352; java: 238; sed: 30
file content (194 lines) | stat: -rwxr-xr-x 5,917 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
#!/usr/bin/make -f

-include /usr/share/dpkg/buildflags.mk

# Filter out -Wl,-Bsymbolic-functions from default Ubuntu LDFLAGS
COMMA = ,
LDFLAGS := $(filter-out -Wl$(COMMA)-Bsymbolic-functions,$(LDFLAGS))

CANL_SUPPORT = no

ifeq ($(CANL_SUPPORT),yes)
CANL_CONFIGURE_OPTION = --enable-canlxx
else
CANL_CONFIGURE_OPTION =
endif

ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NJOBS := -j $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
endif

configure: configure-stamp

configure-stamp:
	dh_testdir

	if [ ! -f po/POTFILES.in.save ] ; then \
	    cp -p po/POTFILES.in po/POTFILES.in.save ; \
	fi

	dh_autoreconf

	CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" \
	CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS) -Wl,-z,defs" \
	./configure --host=$(DEB_HOST_GNU_TYPE) \
		    --build=$(DEB_BUILD_GNU_TYPE) \
		    --prefix=/usr \
		    --libexecdir='$${prefix}/lib' \
		    --sysconfdir=/etc \
		    --localstatedir=/var \
		    --mandir='$${datadir}/man' \
		    --infodir='$${datadir}/info' \
		    --disable-doc \
		    --with-docdir='$${datadir}/doc/nordugrid-arc' \
		    --disable-java --disable-swig-java \
		    --enable-sqlite \
		    $(CANL_CONFIGURE_OPTION)
	touch $@

build: build-arch build-indep

build-arch: build-stamp

build-indep: build-stamp

build-stamp: configure-stamp
	dh_testdir

	$(MAKE) $(NJOBS)
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
	$(MAKE) $(NJOBS) check
endif

	touch $@

clean:
	dh_testdir
	dh_testroot

	if [ -r Makefile ] ; then $(MAKE) distclean ; fi

	rm -f debian/nordugrid-arc-arex.a-rex.init
	rm -f debian/nordugrid-arc-hed.arched.init
	rm -f debian/nordugrid-arc-cache-service.arc-cache-service.init
	rm -f debian/nordugrid-arc-datadelivery-service.arc-datadelivery-service.init
	rm -f debian/nordugrid-arc-gridftpd.gridftpd.init
	rm -f debian/nordugrid-arc-aris.nordugrid-arc-bdii.init
	rm -f debian/nordugrid-arc-ldap-infosys.nordugrid-arc-ldap-infosys.init
	rm -f debian/nordugrid-arc-ldap-infosys.nordugrid-arc-slapd.init
	rm -f debian/nordugrid-arc-ldap-infosys.nordugrid-arc-inforeg.init
	rm -f debian/nordugrid-arc-egiis.nordugrid-arc-egiis.init
	rm -f debian/nordugrid-arc-acix-cache.acix-cache.init
	rm -f debian/nordugrid-arc-acix-index.acix-index.init

	if [ -f po/POTFILES.in.save ] ; then \
	    mv po/POTFILES.in.save po/POTFILES.in ; \
	fi

	find python src -name *.pyc -exec rm {} ';'
	rm -rf src/services/acix/*/test/_trial_temp

	dh_autoreconf_clean

	dh_clean configure-stamp build-stamp

install: build-stamp
	dh_testdir
	dh_testroot
	dh_prep

	$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install

	find $(CURDIR)/debian/tmp -name \*.la -exec rm -fv '{}' ';'

	rm -f $(CURDIR)/debian/tmp/usr/lib/arc/lib*.a

	rm -f $(CURDIR)/debian/tmp/usr/lib/libarcglobusutils.so

	mv debian/tmp/etc/init.d/a-rex \
	   debian/nordugrid-arc-arex.a-rex.init
	mv debian/tmp/etc/init.d/arched \
	   debian/nordugrid-arc-hed.arched.init
	mv debian/tmp/etc/init.d/arc-cache-service \
	   debian/nordugrid-arc-cache-service.arc-cache-service.init
	mv debian/tmp/etc/init.d/arc-datadelivery-service \
	   debian/nordugrid-arc-datadelivery-service.arc-datadelivery-service.init
	mv debian/tmp/etc/init.d/gridftpd \
	   debian/nordugrid-arc-gridftpd.gridftpd.init
	mv debian/tmp/etc/init.d/nordugrid-arc-bdii \
	   debian/nordugrid-arc-aris.nordugrid-arc-bdii.init
	mv debian/tmp/etc/init.d/nordugrid-arc-ldap-infosys \
	   debian/nordugrid-arc-ldap-infosys.nordugrid-arc-ldap-infosys.init
	mv debian/tmp/etc/init.d/nordugrid-arc-slapd \
	   debian/nordugrid-arc-ldap-infosys.nordugrid-arc-slapd.init
	mv debian/tmp/etc/init.d/nordugrid-arc-inforeg \
	   debian/nordugrid-arc-ldap-infosys.nordugrid-arc-inforeg.init
	mv debian/tmp/etc/init.d/nordugrid-arc-egiis \
	   debian/nordugrid-arc-egiis.nordugrid-arc-egiis.init
	mv debian/tmp/etc/init.d/acix-cache \
	   debian/nordugrid-arc-acix-cache.acix-cache.init
	mv debian/tmp/etc/init.d/acix-index \
	   debian/nordugrid-arc-acix-index.acix-index.init

binary: binary-arch binary-indep

binary-arch: install
	dh_testdir
	dh_testroot
	dh_installdirs -a
	dh_installdocs -a
	dh_installexamples -a
	dh_installman -a
	dh_installlogrotate -a
	dh_install -a
	dh_missing -a --fail-missing
	dh_installchangelogs -a
	dh_installinit -p nordugrid-arc-hed --name arched --no-enable
	dh_installinit -p nordugrid-arc-arex --name a-rex --no-enable
	dh_installinit -p nordugrid-arc-cache-service --name arc-cache-service --no-enable
	dh_installinit -p nordugrid-arc-datadelivery-service --name arc-datadelivery-service --no-enable
	dh_installinit -p nordugrid-arc-egiis --name nordugrid-arc-egiis --no-enable
	dh_installinit -p nordugrid-arc-gridftpd --name gridftpd --no-enable
	dh_perl -a
	dh_python2 -a
	dh_lintian -a
	dh_link -a
	dh_strip -a --dbgsym-migration='nordugrid-arc-dbg (<< 5.3.2)'
	dh_compress -a -X .pdf
	dh_fixperms -a
	dh_makeshlibs -a -X arc-infoindex-slapd-wrapper.so
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a

binary-indep: install
	dh_testdir
	dh_testroot
	dh_installdirs -i
	dh_installdocs -i
	dh_installexamples -i
	dh_installman -i
	dh_installlogrotate -i
	dh_install -i
	dh_missing -i --fail-missing
	dh_installchangelogs -i
	dh_installinit -p nordugrid-arc-aris --name nordugrid-arc-bdii --no-enable
	dh_installinit -p nordugrid-arc-ldap-infosys --name nordugrid-arc-ldap-infosys --no-enable
	dh_installinit -p nordugrid-arc-ldap-infosys --name nordugrid-arc-slapd --no-enable
	dh_installinit -p nordugrid-arc-ldap-infosys --name nordugrid-arc-inforeg --no-enable
	dh_installinit -p nordugrid-arc-acix-cache --name acix-cache --no-enable
	dh_installinit -p nordugrid-arc-acix-index --name acix-index --no-enable
	dh_perl -i
	dh_python2 -i
	dh_lintian -i
	dh_link -i
	dh_compress -i -X .pdf
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i

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