[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#939723: ratfor FTCBFS: doesn't use debhelper



Source: ratfor
Version: 1.0-16
Tags: patch
User: debian-cross@lists.debian.org
Usertags: ftcbfs

ratfor fails to cross build from source, because it does not use
debhelper. It manually invokes make and fails to pass cross tools.
dh_auto_build fixes that. It also runs the wrong strip manually.
dh_strip fixes that. Please consider applying the attached patch.  I
strongly recommend converting the package to using dh to avoid similar
problems in future.

Helmut
diff -u ratfor-1.0/debian/changelog ratfor-1.0/debian/changelog
--- ratfor-1.0/debian/changelog
+++ ratfor-1.0/debian/changelog
@@ -1,3 +1,11 @@
+ratfor (1.0-17) UNRELEASED; urgency=medium
+
+  * Fix FTCBFS: (Closes: #-1)
+    + Let dh_auto_build pass cross tools to make.
+    + Defer stripping to dh_strip.
+
+ -- Helmut Grohne <helmut@subdivi.de>  Sun, 08 Sep 2019 07:13:06 +0200
+
 ratfor (1.0-16) unstable; urgency=medium
 
   * QA upload.
diff -u ratfor-1.0/debian/control ratfor-1.0/debian/control
--- ratfor-1.0/debian/control
+++ ratfor-1.0/debian/control
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Debian QA Group <packages@qa.debian.org>
 Standards-Version: 3.8.2
-Build-Depends: debhelper(>=5.0)
+Build-Depends: debhelper (>= 7)
 
 Package: ratfor
 Architecture: any
diff -u ratfor-1.0/debian/rules ratfor-1.0/debian/rules
--- ratfor-1.0/debian/rules
+++ ratfor-1.0/debian/rules
@@ -19,16 +19,11 @@
    CFLAGS += -O2
 endif
 
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-   INSTALL_PROGRAM += -s
-endif
-
-
 
 build:  
 	$(checkdir)
 ## Builds the binary package.
-	make -f Makefile CFLAGS="$(CFLAGS)"
+	dh_auto_build -- -f Makefile CFLAGS="$(CFLAGS)"
 	touch stamp-build
 
 clean: $(checkdir)
@@ -49,9 +44,6 @@
 	chmod g-s debian/tmp
 	install -d -o root -g root -m 755 debian/tmp/usr/bin
 	$(INSTALL_PROGRAM) ratfor debian/tmp/usr/bin
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-	strip --remove-section=.comment --remove-section=.note debian/tmp/usr/bin/ratfor 
-endif
 
 	install -d -o root -g root -m 755 debian/tmp/usr/share/man/man1
 	install -o root -g root -m 644 ratfor.1 debian/tmp/usr/share/man/man1
@@ -72,6 +64,7 @@
 	install -c -m 0644 debian/changelog \
                               debian/tmp/usr/share/doc/$(package)/changelog.Debian 
 	gzip -9n debian/tmp/usr/share/doc/$(package)/changelog.Debian
+	dh_strip --tmpdir=debian/tmp
 	dpkg-shlibdeps ./ratfor                                                
 	dpkg-gencontrol -isp
 	dh_md5sums --tmpdir=debian/tmp

Reply to: