X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=debian%2Frules;h=f065f68d4fb414ce649dab7becf63a018650d15e;hb=073d42ed287d96c105bd2e79333c5021bd43e210;hp=53f77d075dac1ab5d42f28c43633a2fde72d77ad;hpb=ca8b96bf81245f21fe3906c71dc2994bfc5e516f;p=chiark-tcl.git diff --git a/debian/rules b/debian/rules index 53f77d0..f065f68 100755 --- a/debian/rules +++ b/debian/rules @@ -14,9 +14,7 @@ # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this library; if not, write to the Free Software -# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this library; if not, see . majversion=1 @@ -28,6 +26,20 @@ 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 @@ -50,7 +62,7 @@ binary-indep: binary-arch: checkroot build $(checkdir) -rm -rf debian/$(docpackage) debian/$(libpackage) - install -d debian/$(libpackage)/usr/lib + install -d debian/$(libpackage)/usr/lib$(libsubdir) install -d debian/$(docpackage)/usr/share/doc/$(docpackage) set -e; for f in lintian; do \ @@ -59,7 +71,7 @@ binary-arch: checkroot build debian/$(libpackage)/usr/share/$$f/overrides/$(libpackage); \ done - cp */*.so debian/$(libpackage)/usr/lib/. + cp */*.so debian/$(libpackage)/usr/lib$(libsubdir)/. set -e; for f in */*.[ch]; do \ perl debian/extractdoc <$$f \ @@ -94,4 +106,8 @@ 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