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
|
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
PRECMD=sh $(CURDIR)/debian/linux32-wrapper
build: build-stamp
build-stamp:
dh_testdir
cd source && ${PRECMD} ./aimk -only-depend -no-dump
cd source && ${PRECMD} scripts/zerodepend
cd source && ${PRECMD} ./aimk -only-core -no-dump depend
cd source && ${PRECMD} ./aimk -only-core -no-dump
cd source && ${PRECMD} ./aimk -only-qmon -no-dump
cd source && ${PRECMD} ./aimk -man -no-dump -sunman
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp
for k in source/ source/3rdparty/qmon source/3rdparty/sge_depend; do \
find $$k -maxdepth 1 -type d -name "MANSBUILD*" -print0 | xargs --null rm -rf; \
find $$k -maxdepth 1 -type d -name "LINUX*" -print0 | xargs --null rm -rf; \
done
find . -name "*_dependencies" | xargs rm -f
rm -f source/dist/qmon/Qmon
dh_clean
cp debian/gridengine.templates debian/gridengine-common.templates
cp debian/gridengine.templates debian/gridengine-exec.templates
cp debian/gridengine.templates debian/gridengine-master.templates
cp debian/gridengine.templates debian/gridengine-client.templates
cp debian/gridengine.templates debian/gridengine-qmon.templates
debconf-updatepo
install: build
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
install -d debian/tmp/usr
install -d debian/tmp/usr/share
cd source && /usr/bin/yes | ${PRECMD} scripts/distinst -basedir ${CURDIR}/debian -mansrc sge -vdir tmp/usr -onlybin -- man examples
rm -rf debian/tmp/usr/catman
-rmdir debian/tmp/usr/utilbin/lx*
# Make manpage names sane
for k in hostnameutils submit; do \
mv debian/tmp/usr/share/man/man1/$$k.1 debian/tmp/usr/share/man/man1/sge_$$k.1; \
done
for k in access_list accounting bootstrap calendar_conf checkpoint \
complex host_aliases host_conf hostgroup project qtask queue_conf \
reporting sched_conf share_tree user usermapping; do \
mv debian/tmp/usr/share/man/man5/$$k.5 debian/tmp/usr/share/man/man5/sge_$$k.5; \
done
# Remove manpages which we'll replace with symlinks
# hostnameutils links
for k in gethostbyaddr gethostbyname gethostname getservbyname; do \
rm -f debian/tmp/usr/share/man/man1/$$k.1; \
done
# sge_submit links
for manpage in qresub qrsh qsh qalter qlogin qsub; do \
rm -f debian/tmp/usr/share/man/man1/$$manpage.1; \
done
# libdrmaa-dev manpages
cut -d" " -f2 debian/libdrmaa-dev.links | while read f; do \
rm -f debian/tmp/$$f; \
done
rm -f debian/tmp/usr/share/man/man8/SGE_Helper_Service.exe.8
# Build architecture-independent files here.
binary-indep: build install
dh_testdir -i
dh_testroot -i
dh_installchangelogs -i Changelog
dh_installdocs -i
dh_installexamples -i
dh_install -i -XCVS --list-missing
install -m 644 $(CURDIR)/debian/configuration $(CURDIR)/debian/gridengine-common/usr/share/gridengine/default-configuration
install -m 644 $(CURDIR)/debian/bootstrap $(CURDIR)/debian/gridengine-common/usr/share/gridengine/default-bootstrap
install -m 755 $(CURDIR)/debian/scripts/init_cluster $(CURDIR)/debian/gridengine-common/usr/share/gridengine/scripts/init_cluster
# Install wrapper script
install -m 775 $(CURDIR)/debian/gridengine-client.wrapper $(CURDIR)/debian/gridengine-common/usr/share/gridengine/gridengine-wrapper
dh_installman -i
dh_installdebconf -i
dh_link -i
dh_compress -i -Xexamples
dh_fixperms -i
dh_installdeb -i
dh_shlibdeps -i
dh_gencontrol -i
dh_md5sums -i
dh_builddeb -i
# Build architecture-dependent files here.
binary-arch: build install
dh_testdir -a
dh_testroot -a
dh_installchangelogs -a
dh_installdocs -a
dh_installexamples -a
dh_install -a -XCVS --list-missing
dh_installinit -p gridengine-master
# Start the execd after the master
dh_installinit -p gridengine-exec -- defaults 21
dh_installman -a
dh_installdebconf -a
dh_link -a
dh_strip -a
dh_compress -a -Xexamples
dh_fixperms -a
dh_makeshlibs -V -a
dh_installdeb -a
dh_shlibdeps -a
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure
|