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

Bug#798613: package cleanup: use autoreconf, parallel builds, multiarchify, use dpkg-buildflags



Package: src:mythes
Version: 2:1.2.4-1
Severity: important
Tags: patch

  * Multiarchify the library packages.
  * Enable parallel builds.
  * Use dpkg-buildflags.
  * Build using dh-autoreconf. Closes: #757009, #757122.

  * Multiarchify the library packages.
  * Enable parallel builds.
  * Use dpkg-buildflags.
  * Build using dh-autoreconf.

diff -Nru mythes-1.2.4/debian/control mythes-1.2.4/debian/control
--- mythes-1.2.4/debian/control	2014-06-27 10:18:40.000000000 +0000
+++ mythes-1.2.4/debian/control	2015-09-11 00:47:59.000000000 +0000
@@ -2,13 +2,14 @@
 Priority: optional
 Maintainer: Debian OpenOffice Team <debian-openoffice@lists.debian.org>
 Uploaders: Rene Engelhard <rene@debian.org>
-Build-Depends: debhelper (>= 6.0.7~), pkg-config (>= 0.9.0), libhunspell-dev, autotools-dev
-Standards-Version: 3.6.1
+Build-Depends: debhelper (>= 6.0.7~), pkg-config (>= 0.9.0), libhunspell-dev, dh-autoreconf
+Standards-Version: 3.9.6
 Section: libs
 
 Package: libmythes-dev
 Section: libdevel
 Architecture: any
+Multi-Arch: same
 Depends: libmythes-1.2-0  (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}
 Suggests: ${perl:Depends}
 Description: simple thesaurus library (development files)
@@ -22,6 +23,8 @@
 
 Package: libmythes-1.2-0
 Architecture: any
+Multi-Arch: same
+Pre-Depends: ${misc:Pre-Depends}
 Depends: ${shlibs:Depends}, ${misc:Depends}
 Description: simple thesaurus library
  MyThes is a simple thesaurus that uses a structured
diff -Nru mythes-1.2.4/debian/libmythes-1.2-0.install mythes-1.2.4/debian/libmythes-1.2-0.install
--- mythes-1.2.4/debian/libmythes-1.2-0.install	2010-04-25 21:16:22.000000000 +0000
+++ mythes-1.2.4/debian/libmythes-1.2-0.install	2015-09-11 00:32:19.000000000 +0000
@@ -1 +1 @@
-usr/lib/libmythes*.so.*
+usr/lib/*/libmythes*.so.*
diff -Nru mythes-1.2.4/debian/libmythes-dev.install mythes-1.2.4/debian/libmythes-dev.install
--- mythes-1.2.4/debian/libmythes-dev.install	2010-04-25 21:21:57.000000000 +0000
+++ mythes-1.2.4/debian/libmythes-dev.install	2015-09-11 00:32:27.000000000 +0000
@@ -1,5 +1,5 @@
-usr/lib/libmythes*.a
-usr/lib/libmythes*.so
-usr/lib/pkgconfig
+usr/lib/*/libmythes*.a
+usr/lib/*/libmythes*.so
+usr/lib/*/pkgconfig
 usr/include
 usr/bin/th_gen_idx.pl	usr/share/mythes
diff -Nru mythes-1.2.4/debian/patches/autotools-update.diff mythes-1.2.4/debian/patches/autotools-update.diff
--- mythes-1.2.4/debian/patches/autotools-update.diff	1970-01-01 00:00:00.000000000 +0000
+++ mythes-1.2.4/debian/patches/autotools-update.diff	2014-08-05 13:52:18.000000000 +0000
@@ -0,0 +1,6 @@
+Index: b/NEWS
+===================================================================
+--- /dev/null
++++ b/NEWS
+@@ -0,0 +1 @@
++# empty file
diff -Nru mythes-1.2.4/debian/patches/series mythes-1.2.4/debian/patches/series
--- mythes-1.2.4/debian/patches/series	2010-07-06 17:36:18.000000000 +0000
+++ mythes-1.2.4/debian/patches/series	2014-08-05 13:51:14.000000000 +0000
@@ -1 +1,2 @@
 th-gen-idx-pl-from-OOo.diff
+autotools-update.diff
diff -Nru mythes-1.2.4/debian/rules mythes-1.2.4/debian/rules
--- mythes-1.2.4/debian/rules	2014-06-27 10:19:16.000000000 +0000
+++ mythes-1.2.4/debian/rules	2015-09-11 00:33:30.000000000 +0000
@@ -3,12 +3,13 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-CFLAGS = -Wall -g
-
-ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
-	CFLAGS += -O0
-else
-	CFLAGS += -O2
+CFLAGS = -Wall $(shell dpkg-buildflags --get CFLAGS)
+CPPFLAGS = $(shell dpkg-buildflags --get CPPFLAGS)
+LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS)
+
+COMMA = ,
+ifneq (,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
+  NJOBS := -j $(subst parallel=,,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
 endif
 
 # shared library versions, option 1
@@ -20,11 +21,10 @@
 #major=`ls src/.libs/lib*.so.* | \
 # awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
 
-configure: configure-stamp
 configure-stamp:
 	dh_testdir
-	dh_autotools-dev_updateconfig
-	./configure --prefix=/usr --enable-static
+	dh_autoreconf
+	./configure --prefix=/usr --libdir=/usr/lib/$(DEB_HOST_MULTIARCH) --enable-static
 	touch configure-stamp
 
 
@@ -32,7 +32,7 @@
 build-stamp: configure-stamp 
 	dh_testdir
 
-	$(MAKE)
+	$(MAKE) $(NJOBS)
 
 	touch build-stamp
 
@@ -43,7 +43,7 @@
 
 	[ ! -f Makefile ] || $(MAKE) distclean
 
-	dh_autotools-dev_restoreconfig
+	dh_autoreconf_clean
 	dh_clean 
 
 install: build

Reply to: