Bug#860277: g2clib: invalid libdir in grib2c.pc

Chris Lamb lamby at debian.org
Thu Apr 13 21:31:16 UTC 2017


Source: g2clib
Version: 1.6.0-6
Severity: important
Tags: patch
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0], we noticed
that g2clib generated an invalid/broken pkgconfig file:

│ │ │ │ -libdir=/build/1st/g2clib-1.6.0/debian/tmp///usr/lib/x86_64-linux-gnu
│ │ │ │ +libdir=/build/g2clib-1.6.0/2nd/debian/tmp///usr/lib/x86_64-linux-gnu

Patch attached. There's probably a cleaner solution but I'll leave
that with you.

 [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/rules	2017-04-13 22:16:31.572376864 +0100
--- b/debian/rules	2017-04-13 22:24:48.294539792 +0100
@@ -6,7 +6,7 @@
 %:
 	dh $@ --no-parallel
 
-DESTDIR:=`pwd`/debian/tmp/
+DESTDIR:=$(CURDIR)/debian/tmp/
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
 LIBDIR:=/usr/lib/$(DEB_HOST_MULTIARCH)
 
@@ -19,5 +19,6 @@
 
 override_dh_auto_install:
 	$(MAKE) prefix=$(DESTDIR)/usr LIBDIR=$(DESTDIR)/$(LIBDIR)  install
+	sed -i -e 's at libdir=$(DESTDIR)/@libdir=@g' $(DESTDIR)/$(LIBDIR)/pkgconfig/grib2c.pc  # Strip build path
 	mv $(DESTDIR)/$(LIBDIR)/./libg2c_v1.6.0.a $(DESTDIR)/$(LIBDIR)/libgrib2c.a
 	dh_link -p libgrib2c-dev $(LIBDIR)/libgrib2c.so.0d        $(LIBDIR)/libgrib2c.so


More information about the Reproducible-bugs mailing list