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
|
#!/usr/bin/make -f
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/architecture.mk
PDIR=$(CURDIR)/debian/tcl-thread
%:
dh $@
configure-stamp:
dh_testdir
./configure --host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr \
--mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info \
--with-tcl=/usr/lib \
--enable-threads
touch configure-stamp
clean-aol-stamp: install-stamp
$(MAKE) distclean
touch clean-aol-stamp
configure-aol-stamp: clean-aol-stamp
dh_testdir
./configure --host=$(DEB_HOST_GNU_TYPE) \
--build=$(DEB_BUILD_GNU_TYPE) \
--prefix=/usr \
--mandir=\$${prefix}/share/man \
--infodir=\$${prefix}/share/info \
--with-tcl=/usr/lib \
--with-naviserver=/usr/share/aolserver4 \
--enable-threads
touch configure-aol-stamp
build: build-indep build-arch
build-indep:
build-arch: install-aol-stamp
build-stamp: configure-stamp
dh_testdir
$(MAKE)
touch build-stamp
build-aol-stamp: configure-aol-stamp
dh_testdir
$(MAKE)
touch build-aol-stamp
install-stamp: build-stamp
dh_testdir
dh_prep
dh_installdirs
$(MAKE) install DESTDIR=$(PDIR)
install -m 755 -d $(PDIR)/usr/lib/tcltk/$(DEB_HOST_MULTIARCH)
mv $(PDIR)/usr/lib/thread* $(PDIR)/usr/lib/tcltk/$(DEB_HOST_MULTIARCH)
# fix up files permissions
chmod -R u+w $(PDIR)
# cleanup manpages
mv $(PDIR)/usr/share/man/mann $(PDIR)/usr/share/man/man3
cd $(PDIR)/usr/share/man/man3 && \
for f in *.n ; do \
sed -e's/^\.TH \([^ ]\+\) n/.TH \1 3tcl/' \
$$f > `basename $$f .n`.3tcl; \
rm $$f; \
done
# remove empty directories
find $(PDIR) -empty -prune -exec rmdir \{\} \;
touch install-stamp
install-aol-stamp: build-aol-stamp
dh_testdir
for f in libthread*.so ; do \
for d in $(PDIR)/usr/lib/tcltk/$(DEB_HOST_MULTIARCH)/thread* ; do \
cp $$f $$d/`basename $$f .so`-aolserver.so ; \
done ; \
done
touch install-aol-stamp
override_dh_auto_install:
override_dh_compress:
dh_compress -X.tcl
override_dh_gencontrol:
tcltk-depends
dh_gencontrol
get-orig-source:
wget -O tclthread_2.8.0.orig.tar.gz \
http://prdownloads.sourceforge.net/tcl/thread2.8.0.tar.gz
.PHONY: build build-indep build-arch override_dh_auto_install \
override_dh_compress override_dh_gencontrol get-orig-source
|