X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=chiark-tcl.git;a=blobdiff_plain;f=debian%2Frules;h=f9ed503fb1637fdfe7b2cf0b3016607821366f5c;hp=ce0cdd84a5496870cc4915320813308c9f40c7cc;hb=1bb5d87c00dff7d3134ec9c7f0272ca0dd34b662;hpb=9876740991346f30f7dbb7bf36e22c35017e8788 diff --git a/debian/rules b/debian/rules index ce0cdd8..f9ed503 100755 --- a/debian/rules +++ b/debian/rules @@ -1,7 +1,7 @@ #!/usr/bin/make -f # chiark-tcl - various Tcl bindings and extensions -# Copyright 2006 Ian Jackson +# 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 @@ -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,17 @@ docdir=usr/share/doc/$(docpackage) tclh:=$(firstword $(wildcard /usr/include/tcl8.*/tcl.h)) tclversion:=$(patsubst /usr/include/tcl%/tcl.h,%,$(tclh)) +garch := $(shell dpkg-architecture -q DEB_HOST_GNU_TYPE) +ifneq ($(garch),) + +libsubdir = /$(garch) + +ifeq ($(origin CC),default) +export CC=$(garch)-gcc +endif + +endif # $garch + define checkdir test -f hbytes/hbytes.tct endef @@ -50,7 +59,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 +68,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 \