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
|
#!/usr/bin/make -f
# chiark-tcl - various Tcl bindings and extensions
# Copyright 2006-2012 Ian Jackson
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this library; if not, see <http://www.gnu.org/licenses/>.
majversion=1
srcpackage=chiark-tcl
libpackage=libtcl-chiark-$(majversion)
docpackage=libtcl-chiark-$(majversion)
docdir=usr/share/doc/$(docpackage)
tclh:=$(firstword $(wildcard /usr/include/tcl8.*/tcl.h))
tclversion:=$(patsubst /usr/include/tcl%/tcl.h,%,$(tclh))
tcl_versions= 8.5 8.6 8.7
march := $(shell dpkg-architecture -q DEB_HOST_MULTIARCH)
libsubdir = /$(march)
garch := $(shell dpkg-architecture -q DEB_HOST_GNU_TYPE)
ifneq ($(garch),)
ifeq ($(origin CC),default)
export CC=$(garch)-gcc
endif
endif # $garch
define checkdir
test -f hbytes/hbytes.tct
endef
build: build-arch build-indep
build-arch:
$(checkdir)
$(MAKE) prefix=/usr VERSION=$(majversion) TCL_VERSION=$(tclversion)
build-indep:
clean:
$(checkdir)
$(MAKE) clean
rm -rf *~ debian/tmp debian/*~ debian/files* debian/substvars*
dh_clean
binary-indep:
binary-arch: checkroot build
$(checkdir)
-rm -rf debian/$(docpackage) debian/$(libpackage)
install -d debian/$(libpackage)/usr/lib$(libsubdir)
install -d debian/$(docpackage)/usr/share/doc/$(docpackage)
set -e; for f in lintian; do \
install -d debian/$(libpackage)/usr/share/$$f/overrides; \
cp debian/$$f-overrides \
debian/$(libpackage)/usr/share/$$f/overrides/$(libpackage); \
done
cp */*.so debian/$(libpackage)/usr/lib$(libsubdir)/.
set -e; for f in */*.[ch]; do \
perl debian/extractdoc <$$f \
debian/$(docpackage)/$(docdir)/ $$f .txt; \
done
cp */*.tct debian/README debian/copyright \
debian/$(docpackage)/$(docdir)
dh_installchangelogs
dh_strip
dh_makeshlibs
dh_shlibdeps -Xchiark_tcl_adns -Xchiark_tcl_crypto
# be consistent about what we compress:
dh_compress -X.c.txt -X.h.txt
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
# Below here is fairly generic really
binary: binary-indep binary-arch
source diff:
@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
checkroot:
$(checkdir)
dh_testroot
debian/tests/control: debian/regenerate-autopkgtests debian/rules
$(MAKE) debian-substvars
$< $(tcl_versions)
.PHONY: binary binary-arch binary-indep clean checkroot
|