File: rules

package info (click to toggle)
pegasus-wms 4.4.0+dfsg-8
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 73,848 kB
  • sloc: xml: 308,742; java: 101,268; python: 30,428; perl: 13,290; ansic: 7,830; sh: 6,843; cpp: 5,821; makefile: 781; sql: 431; php: 9
file content (166 lines) | stat: -rwxr-xr-x 3,816 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
#!/usr/bin/make -f
# -*- makefile -*-

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
export JAVA_HOME=/usr/lib/jvm/default-java

DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk

JARS := commons-logging.jar commons-pool.jar gnu-getopt.jar log4j-1.2.jar mariadb-java-client.jar xml-resolver.jar xercesImpl.jar xmlParserAPIs.jar xmlrpc-common.jar jglobus-ssl-proxies.jar jglobus-gss.jar jglobus-gridftp.jar jglobus-gram.jar gson.jar


build: build-arch build-indep


build-arch: build-arch-stamp


build-indep: build-indep-stamp


build-arch-stamp:
	dh_testdir

	# during build we need symlinks to system provided jars
	(cd share/pegasus/java && \
	 rm -f *.jar && \
	 for JAR in $(JARS); do \
	     ln -s /usr/share/java/$$JAR ; \
	 done \
	)

	ant dist doc-manpages

	rm -f dist/*.tar.gz
	mv dist/pegasus-* dist/pegasus

	touch build-arch-stamp


build-indep-stamp:
	dh_testdir

	# during build we need symlinks to system provided jars
	(cd share/pegasus/java && \
	 rm -f *.jar && \
	 for JAR in $(JARS); do \
	     ln -s /usr/share/java/$$JAR ; \
	 done \
	)

	# build documentation to get updated PDFs
	ant doc

	rm -f dist/*.tar.gz
	mv dist/pegasus-* dist/doc

	touch build-indep-stamp


# Build architecture-independent files here.
binary-indep: build-indep

	dh_testdir -i
	dh_testroot -i
	dh_prep -i
	dh_installdirs -i

	# move documentation to the -doc package
	mkdir -p debian/pegasus-wms-doc/usr/share/doc/pegasus-wms-doc
	cp -r dist/doc/share/doc/pegasus/* debian/pegasus-wms-doc/usr/share/doc/pegasus-wms-doc/
	rm -f debian/pegasus-wms-doc/usr/share/doc/pegasus-wms-doc/html/*.php

	dh_installchangelogs -i
	dh_installdocs -i
	dh_compress -i
	dh_fixperms -i
	dh_installdeb -i
	dh_gencontrol -i
	dh_md5sums -i
	dh_builddeb -i


# Build architecture-dependent files here.
binary-arch: build-arch
	dh_testdir -a
	dh_testroot -a
	dh_prep -a
	dh_installdirs -a

	# /etc/pegasus
	mkdir -p debian/pegasus-wms/etc/pegasus
	cp -a dist/pegasus/etc/* debian/pegasus-wms/etc/pegasus/

	# /usr/bin
	mkdir -p debian/pegasus-wms/usr
	cp -a dist/pegasus/bin debian/pegasus-wms/usr/
	strip debian/pegasus-wms/usr/bin/pegasus-cluster
	strip debian/pegasus-wms/usr/bin/pegasus-invoke
	strip debian/pegasus-wms/usr/bin/pegasus-keg
	strip debian/pegasus-wms/usr/bin/pegasus-kickstart

	# /usr/share/
	mkdir -p debian/pegasus-wms/usr
	cp -a dist/pegasus/share debian/pegasus-wms/usr/
	rm -rf debian/pegasus-wms/usr/share/pegasus/visualize
	rm -rf debian/pegasus-wms/usr/share/pegasus/examples/simple-examples
	rm -rf debian/pegasus-wms/usr/share/pegasus/examples/glite-montage-pmc
	rm -rf debian/pegasus-wms/usr/share/pegasus/examples/grid-pegasus-mpi-cluster

	# documentation is in the -doc package
	rm -rf debian/pegasus-wms/usr/share/doc/pegasus

	# /usr/lib
	mkdir -p debian/pegasus-wms/usr
	cp -a dist/pegasus/lib debian/pegasus-wms/usr/

	# remove stuff we don't need
	rm -f debian/pegasus-wms/etc/pegasus/stampede*
	rm -rf debian/pegasus-wms/usr/lib/pegasus/externals/python/boto/tests

	# replace jar symlinks with relative symlinks
	(cd debian/pegasus-wms/usr/share/pegasus/java/ && \
	 for JAR in $(JARS); do \
	     rm $$JAR && \
	     ln -s ../../java/$$JAR ; \
	 done \
	)

	dh_installchangelogs -a
	dh_installdocs -a
	dh_installman -a
	dh_compress -a
	dh_fixperms -a
	dh_installdeb -a
	dh_shlibdeps -a
	dh_gencontrol -a
	dh_md5sums -a
	dh_builddeb -a


binary: binary-indep binary-arch


clean:
	dh_testdir
	dh_testroot
	rm -f build-arch-stamp build-indep-stamp
	ant clean
	rm -f src/externals/._boto*
	rm -f src/tools/pegasus-keg/version.h
	rm -f lib/pegasus/python/Pegasus/DAX3.pyc
	rm -f lib/pegasus/perl/*.tmp
	rm -rf dist
	rm -rf debian/.pc
	dh_clean


%:
	echo "Unknown make target: $@"
	exit 1


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