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
|
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export DH_COMPAT=2
v = 8.3
build: build-stamp
build-stamp:
dh_testdir
cd unix && \
./configure --prefix=/usr --includedir=/usr/include/tcl$(v) \
--with-tcl=/usr/lib/tcl$(v) --enable-shared && \
$(MAKE) CFLAGS="-g -O2 -D_REENTRANT"
# Build the static library.
cd unix && \
ar cr libtk$(v).a *.o && \
ar d libtk$(v).a tkAppInit.o && \
ranlib libtk$(v).a
touch build-stamp
clean:
dh_testdir
dh_testroot
rm -f build-stamp install-stamp
-cd unix && $(MAKE) clean
-cd unix && $(MAKE) distclean
dh_clean
install: install-stamp
install-stamp: build-stamp
dh_testdir
dh_testroot
dh_installdirs
mkdir -p debian/tmp/usr
cd unix && \
make INSTALL_ROOT=`pwd`/../debian/tmp \
MAN_INSTALL_DIR=`pwd`/../debian/tmp/usr/share/man \
MANN_INSTALL_DIR=`pwd`/../debian/tmp/usr/share/man/man3 install
# Fix up the libraries.
cp unix/libtk$(v).a debian/tmp/usr/lib
mv debian/tmp/usr/lib/libtk$(v).so debian/tmp/usr/lib/libtk$(v).so.1
ln -sf libtk$(v).so.1 debian/tmp/usr/lib/libtk$(v).so
mv debian/tmp/usr/lib/*.sh debian/tmp/usr/lib/tk$(v)
# Fix up the include files.
install -d debian/tmp/usr/include/tcl$(v)/tk-private/generic
cp generic/*.h debian/tmp/usr/include/tcl$(v)/tk-private/generic
install -d debian/tmp/usr/include/tcl$(v)/tk-private/unix
cp unix/*.h debian/tmp/usr/include/tcl$(v)/tk-private/unix
# Fix up the manpages.
cd debian/tmp/usr/share/man/man1 && \
mv wish.1 wish$(v).1
cd debian/tmp/usr/share/man/man3 && \
for f in *.[3n] ; do \
mv $$f `echo $$f | sed -e 's/\.[3n]/.3tk/'`; \
done
rm -rf `pwd`/debian/tmp/usr/lib/tk$(v)/demos
ln -sf ../../share/doc/tk$(v)/examples `pwd`/debian/tmp/usr/lib/tk$(v)/demos
# Install pkgIndex.tcl
cp unix/pkgIndex.tcl `pwd`/debian/tmp/usr/lib/tk$(v)/
touch install-stamp
# Build architecture-independent files here.
binary-indep: build install
dh_testdir -i
dh_testroot -i
dh_movefiles -i
dh_installdocs -i
dh_installchangelogs -i
dh_compress -i
cd debian/tk$(v)-doc/usr/share/man/man3 && \
for f in `find . -type l ! -name "*.gz"`; do \
linkname=`readlink $$f`; \
rm $$f; \
ln -s `echo $$linkname | sed -e 's/\.[3n]/.3tk/'`.gz $${f}.gz; \
done
dh_fixperms -i
dh_installdeb -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_movefiles -a
dh_installdocs -a
install -d `pwd`/debian/tk$(v)/usr/share/doc/tk$(v)/examples/
cp -a library/demos/* `pwd`/debian/tk$(v)/usr/share/doc/tk$(v)/examples/
rm -f `pwd`/debian/tk$(v)/usr/share/doc/tk$(v)/examples/license.terms
rm -rf debian/tk$(v)-dev/usr/share/doc/tk$(v)-dev
ln -sf tk$(v) debian/tk$(v)-dev/usr/share/doc/tk$(v)-dev
dh_installmenu -a
dh_installchangelogs -ptk$(v) -k changes
dh_strip -a
dh_compress -a -Xusr/share/doc/tk$(v)/examples/
dh_fixperms -a
dh_installdeb -a
dh_makeshlibs -a -V 'tk$(v) (>= 8.3.0)'
dh_shlibdeps -a -ldebian/tk$(v)/usr/lib
dh_gencontrol -a
dh_md5sums -a
dh_builddeb -a
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install
|