| 1 |
sgolovan-guest |
76 |
#!/usr/bin/make -f |
| 2 |
|
|
|
| 3 |
|
|
# Uncomment this to turn on verbose mode. |
| 4 |
|
|
#export DH_VERBOSE=1 |
| 5 |
|
|
export DH_COMPAT=3 |
| 6 |
|
|
|
| 7 |
|
|
v = 8.3 |
| 8 |
|
|
|
| 9 |
|
|
build: build-stamp |
| 10 |
|
|
build-stamp: |
| 11 |
|
|
dh_testdir |
| 12 |
|
|
|
| 13 |
|
|
# so so ugly but it works... |
| 14 |
|
|
touch generic/tclStubInit.c |
| 15 |
|
|
cd unix && \ |
| 16 |
|
|
./configure --prefix=/usr --includedir=/usr/include/tcl$(v) \ |
| 17 |
|
|
--enable-shared --mandir=/usr/share/man && \ |
| 18 |
|
|
touch ../generic/tclStubInit.c && \ |
| 19 |
|
|
$(MAKE) CFLAGS="-g -O2 -D_REENTRANT" |
| 20 |
|
|
# Build the static library. |
| 21 |
|
|
cd unix && \ |
| 22 |
|
|
ar cr libtcl$(v).a *.o && \ |
| 23 |
|
|
ar d libtcl$(v).a tclAppInit.o && \ |
| 24 |
|
|
ranlib libtcl$(v).a |
| 25 |
|
|
|
| 26 |
|
|
touch build-stamp |
| 27 |
|
|
|
| 28 |
|
|
clean: |
| 29 |
|
|
dh_testdir |
| 30 |
|
|
dh_testroot |
| 31 |
|
|
rm -f build-stamp install-stamp |
| 32 |
|
|
|
| 33 |
|
|
-cd unix && $(MAKE) clean |
| 34 |
|
|
-cd unix && $(MAKE) distclean |
| 35 |
|
|
|
| 36 |
|
|
dh_clean tests/pkg/pkga.so unix/config.log unix/Tcltest.so |
| 37 |
|
|
|
| 38 |
|
|
install: install-stamp |
| 39 |
|
|
install-stamp: build-stamp |
| 40 |
|
|
dh_testdir |
| 41 |
|
|
dh_testroot |
| 42 |
|
|
dh_clean -k |
| 43 |
|
|
dh_installdirs |
| 44 |
|
|
|
| 45 |
|
|
cd unix && \ |
| 46 |
|
|
make INSTALL_ROOT=`pwd`/../debian/tmp \ |
| 47 |
|
|
MAN_INSTALL_DIR=`pwd`/../debian/tmp/usr/share/man \ |
| 48 |
|
|
MANN_INSTALL_DIR=`pwd`/../debian/tmp/usr/share/man/man3 install |
| 49 |
|
|
# Fix up the libraries. |
| 50 |
|
|
cp unix/libtcl$(v).a debian/tmp/usr/lib |
| 51 |
|
|
mv debian/tmp/usr/lib/libtcl$(v).so debian/tmp/usr/lib/libtcl$(v).so.1 |
| 52 |
|
|
ln -sf libtcl$(v).so.1 debian/tmp/usr/lib/libtcl$(v).so |
| 53 |
|
|
mv debian/tmp/usr/lib/*.sh debian/tmp/usr/lib/tcl$(v) |
| 54 |
|
|
cp unix/tcl.m4 debian/tmp/usr/lib/tcl$(v)/tcl.m4 |
| 55 |
|
|
chmod 755 debian/tmp/usr/lib/tcl$(v)/ldAix |
| 56 |
|
|
# Fix up the encoding files |
| 57 |
|
|
if [ ! -f debian/tmp/usr/lib/tcl$(v)/encoding/gb2312-raw.enc ]; then \ |
| 58 |
|
|
mv debian/tmp/usr/lib/tcl$(v)/encoding/gb2312.enc \ |
| 59 |
|
|
debian/tmp/usr/lib/tcl$(v)/encoding/gb2312-raw.enc; \ |
| 60 |
|
|
ln -s euc-cn.enc debian/tmp/usr/lib/tcl$(v)/encoding/gb2312.enc; \ |
| 61 |
|
|
fi |
| 62 |
|
|
# Fix up the include files. |
| 63 |
|
|
install -d debian/tmp/usr/include/tcl$(v)/tcl-private/generic |
| 64 |
|
|
cp generic/*.h debian/tmp/usr/include/tcl$(v)/tcl-private/generic |
| 65 |
|
|
install -d debian/tmp/usr/include/tcl$(v)/tcl-private/unix |
| 66 |
|
|
cp unix/*.h debian/tmp/usr/include/tcl$(v)/tcl-private/unix |
| 67 |
|
|
# Fix up the manpages. |
| 68 |
|
|
cd debian/tmp/usr/share/man/man1 && \ |
| 69 |
|
|
mv tclsh.1 tclsh$(v).1 |
| 70 |
|
|
cd debian/tmp/usr/share/man/man3 && \ |
| 71 |
|
|
for f in *.[3n] ; do \ |
| 72 |
|
|
mv $$f `echo $$f | sed -e 's/\.[3n]/.3tcl/'` ; \ |
| 73 |
|
|
done |
| 74 |
|
|
|
| 75 |
|
|
touch install-stamp |
| 76 |
|
|
|
| 77 |
|
|
# Build architecture-independent files here. |
| 78 |
|
|
binary-indep: build install |
| 79 |
|
|
dh_testdir -i |
| 80 |
|
|
dh_testroot -i |
| 81 |
|
|
dh_movefiles -i |
| 82 |
|
|
dh_installdocs -i |
| 83 |
|
|
dh_installchangelogs -i ChangeLog |
| 84 |
|
|
dh_compress -i |
| 85 |
|
|
dh_fixperms -i |
| 86 |
|
|
dh_installdeb -i |
| 87 |
|
|
dh_gencontrol -i |
| 88 |
|
|
dh_md5sums -i |
| 89 |
|
|
dh_builddeb -i |
| 90 |
|
|
|
| 91 |
|
|
# Build architecture-dependent files here. |
| 92 |
|
|
binary-arch: build install |
| 93 |
|
|
dh_testdir -a |
| 94 |
|
|
dh_testroot -a |
| 95 |
|
|
dh_movefiles -a |
| 96 |
|
|
# now, fix up file locations for .sh and .m4 |
| 97 |
|
|
mv debian/tcl$(v)/usr/lib/tcl$(v)/*.sh \ |
| 98 |
|
|
debian/tcl$(v)/usr/lib/tcl$(v)/*.m4 \ |
| 99 |
|
|
debian/tcl$(v)-dev/usr/lib/tcl$(v) |
| 100 |
|
|
|
| 101 |
|
|
dh_installdocs -a |
| 102 |
|
|
dh_installmenu -a |
| 103 |
|
|
dh_installchangelogs -a ChangeLog |
| 104 |
|
|
dh_fixperms -a |
| 105 |
|
|
dh_strip -a |
| 106 |
|
|
dh_compress -a |
| 107 |
|
|
dh_makeshlibs -a -V 'tcl$(v) (>= 8.3.5)' -XTcltest |
| 108 |
|
|
dh_installdeb -a |
| 109 |
|
|
dh_shlibdeps -a -ldebian/tcl$(v)/usr/lib |
| 110 |
|
|
dh_gencontrol -a |
| 111 |
|
|
dh_md5sums -a |
| 112 |
|
|
dh_builddeb -a |
| 113 |
|
|
|
| 114 |
|
|
source diff: |
| 115 |
|
|
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false |
| 116 |
|
|
|
| 117 |
|
|
binary: binary-indep binary-arch |
| 118 |
|
|
.PHONY: build clean binary-indep binary-arch binary install |