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
|
#!/usr/bin/make -f
DESTDIR = $(shell pwd)/debian/tcl-tclreadline
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/architecture.mk
LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)
export LDFLAGS
CFLAGS += -DUSE_TCL_STUBS
export CFLAGS
LIBS += -ltclstub
export LIBS
v = 2.3.1
%:
dh $@
override_dh_auto_configure:
dh_auto_configure -- \
--with-tcl=/usr/lib \
--with-tk=/usr/lib \
--with-tcl-includes=/usr/include/tcl
override_dh_clean:
dh_clean tclreadline.h tclreadline.n
override_dh_auto_install:
dh_auto_install
#
# Fix up the architecture dependent include
install -m 755 -d $(DESTDIR)/usr/include/$(DEB_HOST_MULTIARCH)
mv $(DESTDIR)/usr/include/*.h $(DESTDIR)/usr/include/$(DEB_HOST_MULTIARCH)
#
# Fix up the manpage
mv $(DESTDIR)/usr/share/man/mann/tclreadline.n \
$(DESTDIR)/usr/share/man/man3/tclreadline.3tcl
sed -i -e 's/^\.TH tclreadline n/.TH tclreadline 3tcl/' \
-e 's/string ".*$(DEB_HOST_MULTIARCH).*"/directory string/g' \
$(DESTDIR)/usr/share/man/man3/tclreadline.3tcl
#
# Remove .la file
rm $(DESTDIR)/usr/lib/*/*.la
#
# Remove empty directories
find $(DESTDIR) -empty -prune -exec rmdir \{\} \;
override_dh_gencontrol:
tcltk-depends
dh_gencontrol
get-orig-source:
wget -O tclreadline_$(v).orig.tar.gz \
https://github.com/flightaware/tclreadline/archive/v$(v).tar.gz
.PHONY: override_dh_auto_configure override_dh_clean override_dh_auto_install \
override_dh_gencontrol get-orig-source
|