chiark / gitweb /
Add a few assertions about *_LLEN in adns.c.
[chiark-tcl.git] / debian / rules
index 333dfb6..013cf52 100755 (executable)
@@ -25,13 +25,16 @@ 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))
+
 define checkdir
        test -f hbytes/hbytes.tct
 endef
 
 build:
        $(checkdir)
-       $(MAKE) prefix=/usr VERSION=$(majversion)
+       $(MAKE) prefix=/usr VERSION=$(majversion) TCL_VERSION=$(tclversion)
 
 clean:
        $(checkdir)
@@ -47,6 +50,12 @@ binary-arch: checkroot build
        install -d debian/$(libpackage)/usr/lib
        install -d debian/$(docpackage)/usr/share/doc/$(docpackage)
 
+       set -e; for f in lintian linda; 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/.
 
        set -e; for f in */*.[ch]; do                                   \
@@ -59,8 +68,11 @@ binary-arch: checkroot build
        dh_installchangelogs
        dh_strip
 
-       dh_shlibdeps
-       dh_compress
+       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_gencontrol
        dh_md5sums