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
|
#!/usr/bin/make -f
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/architecture.mk
v = 2.5
tclv = 8.6
lib_so = libBLT.$(v).so.$(tclv)
tcl_only_lib_so = libBLTlite.$(v).so.$(tclv)
dtmp = $(shell pwd)/debian/tmp
%:
dh $@ --with autotools-dev,autoreconf
override_dh_auto_configure:
dh_auto_configure -- \
--host=$(DEB_HOST_GNU_TYPE) \
--with-tcl=/usr/lib/$(DEB_HOST_MULTIARCH)/tcl$(tclv) \
--with-tk=/usr/lib/$(DEB_HOST_MULTIARCH)/tk$(tclv)
override_dh_auto_build:
$(MAKE) lib_so=$(lib_so) \
tcl_only_lib_so=$(tcl_only_lib_so)
override_dh_auto_install:
$(MAKE) lib_so=$(lib_so) \
tcl_only_lib_so=$(tcl_only_lib_so) \
INSTALL_ROOT=$(dtmp) install
#
# Now fix up the man pages
mv $(dtmp)/usr/share/man/mann/BLT.n \
$(dtmp)/usr/share/man/mann/intro.n
(cd $(dtmp)/usr/share/man/mann ; for i in *.n ; do \
sed -e's/^\.TH \+\([^ ]*\) \+n/.TH blt::\1 3tcl/' $$i >../man3/blt::`basename $$i .n`.3tcl ; \
done)
rm -r $(dtmp)/usr/share/man/mann
#
# Remove some misplaced documentation
(cd $(dtmp)/usr/lib/blt$(v) ; rm README PROBLEMS NEWS)
#
# Now we need to move the demos and examples over to /usr/share
mkdir -p $(dtmp)/usr/share/blt$(v)
mv $(dtmp)/usr/lib/blt$(v)/demos $(dtmp)/usr/share/blt$(v)
chmod a-x $(dtmp)/usr/share/blt$(v)/demos/*.txt
#
mkdir -p $(dtmp)/usr/share/blt$(v)/examples
cp examples/* $(dtmp)/usr/share/blt$(v)/examples
#
# Patch the demos and examples to use wish8.6
(cd $(dtmp)/usr/share/blt$(v) ; \
for i in demos/*.tcl examples/*.tcl ; do \
sed -e '1c#!/usr/bin/wish$(tclv)' $$i >$$i.new ; \
mv $$i.new $$i ; \
chmod 755 $$i; \
done)
#
chmod 644 $(dtmp)/usr/share/blt$(v)/demos/images/*
chmod 644 $(dtmp)/usr/share/blt$(v)/demos/scripts/*.tcl
chmod 755 $(dtmp)/usr/share/blt$(v)/demos/scripts/page.tcl
override_dh_installdocs:
dh_installdocs
rm -f debian/blt-dev/usr/share/doc/blt-dev/html/*.vc
override_dh_makeshlibs:
dh_makeshlibs -V 'tk8.6-blt2.5 (>= 2.5.3)'
get-orig-source:
CURDIR=`pwd` && TMPDIR=`mktemp -d /tmp/blt.XXXXXX` && \
cd $$TMPDIR && \
wget -O tmp.zip \
http://prdownloads.sourceforge.net/wize/blt-src-$(v).3.zip && \
unzip tmp.zip && \
rm -rv blt$(v)/library/dd_protocols && \
(cd blt$(v) && patch -p1 <$$CURDIR/debian/patches/source.patch) && \
sed -i -e 's/\$$(ddFiles)//' blt$(v)/library/Makefile.in && \
tar -Jcf $$CURDIR/blt_$(v).3+dfsg.orig.tar.xz blt$(v) && \
rm -rf $$TMPDIR
.PHONY: override_dh_auto_configure override_dh_auto_build \
override_dh_auto_install override_dh_makeshlibs override_dh_installdocs \
get-orig-source
|