retake alone (by request of mikap); modernise while here
authormirabilos <m@mirbsd.org>
Thu, 22 Dec 2016 16:47:10 +0000 (17:47 +0100)
committermirabilos <m@mirbsd.org>
Thu, 22 Dec 2016 16:47:10 +0000 (17:47 +0100)
debian/changelog
debian/compat
debian/control
debian/rules

index b50e4ef..f532dcd 100644 (file)
@@ -1,3 +1,15 @@
+rs (20140609-4) unstable; urgency=low
+
+  * Retake and remove Mika as Maintainer, by request of Mika
+  * Bump Policy (no relevant changes)
+  * Switch to debhelper 10, grudgingly
+  * Use the latest lintian-prescribed VCS-* URIs
+  * Reuse code from pax package for $CC selection (cross-build),
+    escaping of flags for dpkg/buildflags.mk; drop attempt to
+    build with LTO
+
+ -- Thorsten Glaser <tg@mirbsd.de>  Thu, 22 Dec 2016 17:44:10 +0100
+
 rs (20140609-3) unstable; urgency=low
 
   * Team upload.
index 7ed6ff8..f599e28 100644 (file)
@@ -1 +1 @@
-5
+10
index 3dd7a23..aeea568 100644 (file)
@@ -1,12 +1,12 @@
 Source: rs
 Section: utils
 Priority: optional
-Maintainer: Michael Prokop <mika@debian.org>
+Maintainer: Thorsten Glaser <tg@mirbsd.de>
 # possibly works with older libbsd-dev, but haven’t tested how old
-Build-Depends: debhelper (>= 5), libbsd-dev (>= 0.2.0-1~)
-Standards-Version: 3.9.5
-VCS-git: git://anonscm.debian.org/collab-maint/rs.git
-VCS-Browser: http://anonscm.debian.org/gitweb/?p=collab-maint/rs.git
+Build-Depends: debhelper (>= 10), libbsd-dev (>= 0.2.0-1~)
+Standards-Version: 3.9.8
+VCS-git: https://anonscm.debian.org/git/collab-maint/rs.git -b master
+VCS-Browser: https://anonscm.debian.org/cgit/collab-maint/rs.git/?h=master
 
 Package: rs
 Architecture: any
index b511daf..7478b4a 100755 (executable)
@@ -1,15 +1,31 @@
 #!/usr/bin/make -f
 
-CC?=                   gcc
+DEB_BUILD_ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
+DEB_HOST_ARCH=$(shell dpkg-architecture -qDEB_HOST_ARCH)
+ifneq (${DEB_BUILD_ARCH},${DEB_HOST_ARCH})
+DEB_HOST_GNU_TYPE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+endif
+
+# is ${CC} defined anywhere (other than implicit rules?)
+ifneq (,$(findstring $(origin CC),default undefined))
+# no - then default to gcc (or cross-gcc)
+ifneq (${DEB_BUILD_ARCH},${DEB_HOST_ARCH})
+CC=                    ${DEB_HOST_GNU_TYPE}-gcc
+else
+CC=                    gcc
+endif
+endif
+
 EXTRA_CFLAGS=          -Wall -Wextra -Wformat
 EXTRA_CPPFLAGS=                -DUSE_LIBBSD
 EXTRA_LDFLAGS=         -Wl,--as-needed
 
 ifneq (,$(wildcard /usr/share/dpkg/buildflags.mk))
 # dpkg-dev (>= 1.16.1~)
-DEB_CFLAGS_MAINT_APPEND=${EXTRA_CFLAGS}
-DEB_CPPFLAGS_MAINT_APPEND=${EXTRA_CPPFLAGS}
-DEB_LDFLAGS_MAINT_APPEND=${EXTRA_LDFLAGS}
+dpkgbuildflagsmkescape=$(subst \,\\\,$(1))
+DEB_CFLAGS_MAINT_APPEND=$(call dpkgbuildflagsmkescape,${EXTRA_CFLAGS})
+DEB_CPPFLAGS_MAINT_APPEND=$(call dpkgbuildflagsmkescape,${EXTRA_CPPFLAGS})
+DEB_LDFLAGS_MAINT_APPEND=$(call dpkgbuildflagsmkescape,${EXTRA_LDFLAGS})
 DEB_BUILD_MAINT_OPTIONS=hardening=+all
 include /usr/share/dpkg/buildflags.mk
 else
@@ -28,12 +44,8 @@ build-indep:
 rs:
        dh_testdir
        -rm -f rs
-       +for opts in '-flto=jobserver' '-fwhole-program --combine' ''; do \
-               set -x; \
-               ${CC} ${CPPFLAGS} ${CFLAGS} $$opts ${LDFLAGS} -o rs \
-                   rs.c ${LDADD}; \
-               test -x rs && exit 0; \
-       done; echo >&2 Compiling failed.; exit 1
+       ${CC} ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -o rs rs.c ${LDADD}
+       test -x rs
 ifeq (,$(filter nocheck,${DEB_BUILD_OPTIONS}))
        case $$(for i in 1 2 3 4 5 6 7 8 9; do echo $$i; done | \
            ./rs 3 3 | md5sum) in \