blob: bbda33e4ec04530c982f268b61622f40d8e6ed93 (
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
|
#!/usr/bin/make -f
include /usr/share/dpkg/architecture.mk
unpack: unpack-stamp
unpack-stamp:
dh_testdir
dh_illumos_gate
# i386_XARCH is set to -m32 by dh_illumos_gate,
# but we want native arch (64-bit):
sed -i -r "s/.*(export i386_XARCH=).*/\1/" illumos-gate/env.sh
# install into debian/tmp:
echo 'export TOOLS_PROTO="$$ROOT"' >> illumos-gate/env.sh
sed -i '/^TOOLS_PROTO=/d' illumos-gate/bldenv.sh
touch $@
patch: unpack
dh_testdir
[ ! -f debian/patches/series ] || QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2
unpatch:
dh_testdir
[ ! -f debian/patches/series ] || QUILT_PATCHES=debian/patches quilt pop -a -f || test $$? = 2
install build build-arch build-indep: build-stamp
build-stamp: patch
# ctfstabs needs libctf, libctf needs ctfconvert
# We've disabled ctfstabs via patch to build all tools
# not requiring lbctf, then build libctf, then - ctfstabs:
# libncurses.so is actually linker script
# and sunld does not understand it,
# but we do not need sunld here ;-)
sed -i -r 's/(export +LD_ALTEXEC.*)/#\1/' illumos-gate/env.sh
dh_illumos_make usr/src/tools
# Then we need sunld:
sed -i -r 's/#(export +LD_ALTEXEC.*)/\1/' illumos-gate/env.sh
mkdir -p debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) \
debian/tmp/usr/include
dh_illumos_make --without-ctf --without-mcs usr/src/lib/libctf/amd64
dh_illumos_make --without-ctf --without-mcs usr/src/lib/libctf -t install_h
# Then - don't:
sed -i -r 's/(export +LD_ALTEXEC.*)/#\1/' illumos-gate/env.sh
dh_illumos_make usr/src/tools/ctf/stabs
touch $@
binary binary-arch binary-indep: binary-stamp
binary-stamp: build-stamp
dh_testdir
dh_testroot
dh_install
dh_python2
dh_installman
dh_installdocs
dh_installexamples
dh_installchangelogs
dh_link
dh_compress
dh_fixperms
dh_makeshlibs
dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
touch $@
clean: unpatch
dh_testdir
dh_testroot
dh_clean
rm -rf illumos-gate
|