From patchwork Mon Aug 22 20:34:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 3607 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 0996023E52 for ; Mon, 22 Aug 2011 20:34:23 +0000 (UTC) Received: from mail-yi0-f52.google.com (mail-yi0-f52.google.com [209.85.218.52]) by fiordland.canonical.com (Postfix) with ESMTP id A93C3A18330 for ; Mon, 22 Aug 2011 20:34:22 +0000 (UTC) Received: by yie13 with SMTP id 13so5613613yie.11 for ; Mon, 22 Aug 2011 13:34:22 -0700 (PDT) Received: by 10.150.2.16 with SMTP id 16mr2987718ybb.333.1314045262072; Mon, 22 Aug 2011 13:34:22 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.150.157.17 with SMTP id f17cs210511ybe; Mon, 22 Aug 2011 13:34:20 -0700 (PDT) Received: by 10.229.2.99 with SMTP id 35mr1638019qci.280.1314045259394; Mon, 22 Aug 2011 13:34:19 -0700 (PDT) Received: from afflict.kos.to (afflict.kos.to [92.243.29.197]) by mx.google.com with ESMTPS id u3si1129543qct.49.2011.08.22.13.34.18 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 22 Aug 2011 13:34:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of nchip@afflict.kos.to designates 92.243.29.197 as permitted sender) client-ip=92.243.29.197; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of nchip@afflict.kos.to designates 92.243.29.197 as permitted sender) smtp.mail=nchip@afflict.kos.to Received: by afflict.kos.to (Postfix, from userid 1000) id E127F2669D; Mon, 22 Aug 2011 20:34:17 +0000 (UTC) Date: Mon, 22 Aug 2011 23:34:17 +0300 From: Riku Voipio To: submit@bugs.debian.org Subject: please add multi-arch support for slang2 Message-ID: <20110822203417.GA12500@afflict.kos.to> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Package: slang2 Version: 2.2.4-2 Severity: normal User: debian-dpkg@lists.debian.org Usertags: multiarch Tags: patch Hi, The attached patch converts libslang2 to multiarch paths and adds the relevant Multi-Arch: fields to debian/control. Since slang2 is bottom dependency installed by default, we need a early conversion of slang2 to be able to advantage of multiarch. I'm not entirely happy with moving some of the file moves from install and link files to debian/rules, but without variable expansion in install files there is no easy way around moving items.. Riku diff -urN old/slang2-2.2.4//debian/control slang2-2.2.4//debian/control --- old/slang2-2.2.4//debian/control 2011-04-02 01:09:15.000000000 +0300 +++ slang2-2.2.4//debian/control 2011-08-22 23:05:18.977757283 +0300 @@ -2,13 +2,14 @@ Section: devel Priority: optional Maintainer: Alastair McKinstry -Build-Depends: debhelper (>= 7.0.50~), docbook-to-man, libpcre3-dev, libpng12-dev, zlib1g-dev, libonig-dev, libncurses-dev, chrpath +Build-Depends: debhelper (>= 8.1.3), docbook-to-man, libpcre3-dev, libpng12-dev, zlib1g-dev, libonig-dev, libncurses-dev, chrpath Standards-Version: 3.9.1 Package: libslang2-dev Section: libdevel Architecture: any Depends: libslang2 (= ${binary:Version}), libc6-dev | libc-dev, libpng-dev, ${misc:Depends} +Multi-Arch: same Conflicts: slang1-utf8-dev, slang-dev6, slang0.99.34-dev (<< 0.99.38-2.3) Description: S-Lang programming library, development version S-Lang is a C programmer's library that includes routines for the rapid @@ -35,6 +36,8 @@ Priority: required Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} +Pre-Depends: ${misc:Pre-Depends} +Multi-Arch: same Recommends: libpng12-0 Description: S-Lang programming library - runtime version S-Lang is a C programmer's library that includes routines for the rapid @@ -73,6 +76,7 @@ Priority: optional Architecture: any Depends: ${shlibs:Depends}, libslang2-modules (= ${binary:Version}) , ${misc:Depends} +Multi-Arch: foreign Description: Interpreter for S-Lang language S-Lang is a C programmer's library that includes routines for the rapid development of sophisticated, user friendly, multi-platform applications. diff -urN old/slang2-2.2.4//debian/libslang2-dev.dirs slang2-2.2.4//debian/libslang2-dev.dirs --- old/slang2-2.2.4//debian/libslang2-dev.dirs 2010-03-18 20:37:01.000000000 +0200 +++ slang2-2.2.4//debian/libslang2-dev.dirs 2011-08-22 21:34:44.027754777 +0300 @@ -1,5 +1,3 @@ -usr/lib usr/include usr/share/doc/libslang2-dev usr/share/lintian/overrides -usr/lib/pkgconfig diff -urN old/slang2-2.2.4//debian/libslang2-dev.install slang2-2.2.4//debian/libslang2-dev.install --- old/slang2-2.2.4//debian/libslang2-dev.install 2011-04-01 17:03:38.000000000 +0300 +++ slang2-2.2.4//debian/libslang2-dev.install 2011-08-22 23:14:59.177757551 +0300 @@ -14,6 +14,7 @@ doc/text/cslang.txt usr/share/doc/libslang2-dev src/slang.h usr/include src/slcurses.h usr/include -src/objs/libslang.a usr/lib -slang.pc usr/lib/pkgconfig debian/lintian/libslang2-dev usr/share/lintian/overrides +debian/tmp/usr/lib/*/libslang.a +debian/tmp/usr/lib/*/libslang.so +debian/tmp/usr/lib/*/pkgconfig/slang.pc diff -urN old/slang2-2.2.4//debian/libslang2-dev.links slang2-2.2.4//debian/libslang2-dev.links --- old/slang2-2.2.4//debian/libslang2-dev.links 2011-04-12 12:47:28.000000000 +0300 +++ slang2-2.2.4//debian/libslang2-dev.links 1970-01-01 02:00:00.000000000 +0200 @@ -1 +0,0 @@ -lib/libslang.so.2.2.4 usr/lib/libslang.so diff -urN old/slang2-2.2.4//debian/libslang2.install slang2-2.2.4//debian/libslang2.install --- old/slang2-2.2.4//debian/libslang2.install 2011-04-01 17:03:52.000000000 +0300 +++ slang2-2.2.4//debian/libslang2.install 2011-08-22 23:04:54.337757271 +0300 @@ -1,7 +1,7 @@ -src/elfobjs/libslang.so.2* lib NEWS usr/share/doc/libslang2 README usr/share/doc/libslang2 UPGRADE.txt usr/share/doc/libslang2 doc/text/slang.txt usr/share/doc/libslang2 doc/text/slangfun.txt usr/share/doc/libslang2 debian/lintian/libslang2 usr/share/lintian/overrides +debian/tmp/lib/*/libslang.so.* diff -urN old/slang2-2.2.4//debian/libslang2.links slang2-2.2.4//debian/libslang2.links --- old/slang2-2.2.4//debian/libslang2.links 2011-04-12 12:47:13.000000000 +0300 +++ slang2-2.2.4//debian/libslang2.links 1970-01-01 02:00:00.000000000 +0200 @@ -1 +0,0 @@ -lib/libslang.so.2.2.4 lib/libslang.so.2 diff -urN old/slang2-2.2.4//debian/libslang2-modules.install slang2-2.2.4//debian/libslang2-modules.install --- old/slang2-2.2.4//debian/libslang2-modules.install 2011-04-01 17:57:26.000000000 +0300 +++ slang2-2.2.4//debian/libslang2-modules.install 2011-08-22 23:04:06.867757249 +0300 @@ -1 +1 @@ -debian/tmp/usr/lib/slang/v2/modules/* /usr/lib/slang/v2/modules +debian/tmp/usr/lib/*/slang/v2/modules/* /usr/lib/slang/v2/modules diff -urN old/slang2-2.2.4//debian/rules slang2-2.2.4//debian/rules --- old/slang2-2.2.4//debian/rules 2011-04-25 04:19:53.000000000 +0300 +++ slang2-2.2.4//debian/rules 2011-08-22 23:21:07.327757721 +0300 @@ -14,6 +14,9 @@ CFLAGS += -O2 endif +override_dh_auto_configure: + dh_auto_configure -- --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) + override_dh_auto_build: dh_auto_build $(MAKE) -C src static @@ -27,7 +30,11 @@ override_dh_auto_install: dh_auto_install cp src/slang.ver debian/libslang2-pic/usr/lib/libslang_pic.map - chrpath -d debian/tmp/usr/lib/slang/v2/modules/*.so + mkdir -p debian/tmp/lib/$(DEB_HOST_MULTIARCH) + cp -a src/objs/libslang.a debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH) + mv debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libslang.so.* debian/tmp/lib/$(DEB_HOST_MULTIARCH) + ln -sf /lib/$(DEB_HOST_MULTIARCH)/libslang.so.2 debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libslang.so + chrpath -d debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/slang/v2/modules/*.so chrpath -d debian/tmp/usr/bin/slsh override_dh_installchangelogs: