blob: e410c4c9dddddff72a4aa3007294fd7cbc316d67 (
plain)
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
|
#!/usr/bin/make -f
#
# This file is more complex than it needs to be to just build binary packages,
# because it satisfies the relevant Debian policies. See ../README for more
# information.
#
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This is the debhelper compatability version to use.
# We expect this to be provided by the calling build script:
export DH_COMPAT
# Here's the previous/"normal" Debian value (?), but it breaks on a
# converted Red Hat debhelper installation:
#export DH_COMPAT=3
# This has to be exported to make some magic below work.
export DH_OPTIONS
ifeq ($(ENVOKED_BY_CONSTRUCT),1)
BUILDDEB_OPTIONS=--destdir=build/dist
endif
build: build-stamp
build-stamp:
ifneq ($(ENVOKED_BY_CONSTRUCT),1)
dh_testdir
cons
touch build-stamp
endif
clean:
dh_testdir
dh_testroot
rm -f build-stamp configure-stamp install-common-stamp
rm -rf build
find -name .construct -exec rm "{}" ";"
dh_clean
install-common: install-common-stamp
install-common-stamp: DH_OPTIONS=
install-common-stamp:
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
touch install-common-stamp
install-scons: build install-common
python build/scons/setup.py install \
--install-scripts=`pwd`/debian/scons/usr/bin \
--install-purelib=`pwd`/debian/scons/usr/lib/scons --no-compile
# Here's how we'd install the build engine in a version-specific directory.
#--install-purelib=`pwd`/debian/scons/usr/lib/scons-$VERSION --no-compile
install-python-scons: build install-common
python build/python-scons/setup.py install \
--install-purelib=`pwd`/debian/python-scons/usr/lib/python1.5/site-packages --no-compile
install-python2-scons: build install-common
python build/python2-scons/setup.py install \
--install-purelib=`pwd`/debian/python2-scons/usr/lib/python2.0/site-packages --no-compile
install-scons-script: build install-common
python build/scons-script/setup.py install \
--install-scripts=`pwd`/debian/scons/usr/bin --no-compile
# This single target is used to build all the packages, all at once, or
# one at a time. So keep in mind: any options passed to commands here will
# affect _all_ packages. Anything you want to only affect one package
# should be put in another target, such as the install target.
binary-common:
dh_testdir
dh_testroot
dh_installdocs
dh_installexamples
# uncomment the following line once there is a man page:
# dh_installman build/doc/MAN/scons.1]
dh_installchangelogs
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb $(BUILDDEB_OPTIONS)
# Build architecture independant packages using the common target.
binary-indep: build install
$(MAKE) ENVOKED_BY_CONSTRUCT=$(ENVOKED_BY_CONSTRUCT) -f debian/rules DH_OPTIONS=-i binary-common
# Build architecture dependant packages using the common target.
binary-arch: build install
# Any other binary targets build just one binary package at a time.
binary-scons: build install-scons
$(MAKE) ENVOKED_BY_CONSTRUCT=$(ENVOKED_BY_CONSTRUCT) -f debian/rules binary-common DH_OPTIONS=-pscons
binary-python-scons: build install-python-scons
$(MAKE) ENVOKED_BY_CONSTRUCT=$(ENVOKED_BY_CONSTRUCT) -f debian/rules binary-common DH_OPTIONS=-ppython-scons
binary-python2-scons: build install-python2-scons
$(MAKE) ENVOKED_BY_CONSTRUCT=$(ENVOKED_BY_CONSTRUCT) -f debian/rules binary-common DH_OPTIONS=-ppython2-scons
binary-scons-script: build install-scons-script
$(MAKE) ENVOKED_BY_CONSTRUCT=$(ENVOKED_BY_CONSTRUCT) -f debian/rules binary-common DH_OPTIONS=-pscons-script
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install binary-scons binary-python-scons binary-python2-scons binary-scons-script install-scons install-python-scons install-python2-scons install-scons-script
|