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
|
#!/usr/bin/make -f
#
# Created 20 December 1997 by Enrique Zanardi <ezanardi@ull.es>
# Modified 2002-2011 by Alastair McKinstry, <mckinstry@debian.org>
#
# Copying and modification is unlimited, provided that the modified
# version is marked as being modified.
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
# Magic debhelper rule.
%:
dh $@ --with python2
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
LIBDIR:=/usr/lib/$(DEB_HOST_MULTIARCH)
DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
PYVERS:=$(shell pyversions --supported)
ifeq ($(DEB_HOST_ARCH_OS),hurd)
GPMSUPPORT=
else
GPMSUPPORT= --with-gpm-support
endif
ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
NOSTRIP=--with-nostrip=no
else
NOSTRIP=--with-nostrip=yes
endif
override_dh_auto_clean:
dh_auto_clean
# remove autogenerated files
rm -rf Makefile config.h* config.log config.status .depend libnewt.pc \
configure install-sh po/*.mo python* tutorial libnewt_pic.a
rm -f debian/shlibs.local
override_dh_auto_configure:
dh_autoreconf
# Nasty hack. why is it necessary?
cp /usr/share/automake-1.11/install-sh ./install-sh
dh_auto_configure -- $(GPMSUPPORT) $(NOSTRIP) CFLAGS="-I/usr/include/tcl8.5 $(CFLAGS)" \
CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" FFLAGS="$(FFLAGS)"
override_dh_auto_build:
dh_auto_build
sgmltools --backend html tutorial.sgml
ar cqv libnewt_pic.a shared/*.o
override_dh_auto_install:
dh_auto_install
for v in $(PYVERS); do \
pylib=usr/lib/$$v/dist-packages ; \
mkdir -p debian/python-newt/$$pylib ; \
mkdir -p debian/python-newt-dbg/$$pylib ;\
mv $$v/*snackmodule_d.* debian/python-newt-dbg/$$pylib; \
cp snack.py $$v/* debian/python-newt/$$pylib; \
done
dh_install -p libnewt-dev libnewt.a $(LIBDIR)
mkdir -p debian/libnewt-pic/$(LIBDIR)
cp newt*.ver debian/libnewt-pic/$(LIBDIR)/libnewt_pic.map
|