[SCM] libshout/master: Autogenerate autotools during build.

js at users.alioth.debian.org js at users.alioth.debian.org
Sun Mar 25 19:39:11 UTC 2012


The following commit has been merged in the master branch:
commit 4dd9fbec065c2cbdcd33ed615ec9e98101a46b68
Author: Jonas Smedegaard <dr at jones.dk>
Date:   Sun Mar 25 21:14:09 2012 +0200

    Autogenerate autotools during build.

diff --git a/debian/rules b/debian/rules
index ae79704..1db9c18 100755
--- a/debian/rules
+++ b/debian/rules
@@ -17,6 +17,11 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+DEB_AUTO_UPDATE_LIBTOOL = pre
+DEB_AUTO_UPDATE_ACLOCAL = 1.11
+DEB_AUTO_UPDATE_AUTOCONF = 2.68
+DEB_AUTO_UPDATE_AUTOHEADER = 2.68
+DEB_AUTO_UPDATE_AUTOMAKE = 1.11
 -include /usr/share/cdbs/1/rules/upstream-tarball.mk
 include /usr/share//cdbs/1/rules/utils.mk
 include /usr/share/cdbs/1/class/autotools.mk
@@ -74,3 +79,41 @@ debian/stamp-local-shlibs-$(libname): binary-install/$(libpkgname) debian/stamp-
 	touch $@
 clean::
 	rm -f debian/stamp-local-shlibs-$(libname)
+
+# put aside autogenerated files during build
+# TODO: use DEB_UPSTREAM_CRUFT_MOVE when cdbs 0.4.106 is in stable
+upstreamtmpstuff = Makefile.in $(patsubst %,%/Makefile.in,doc examples include include/shout src win32)
+upstreamtmpstuff += $(patsubst %,src/%/Makefile.in,avl httpp net thread timing)
+upstreamtmpstuff += configure aclocal.m4 depcomp install-sh missing
+upstreamtmpstuff += ltmain.sh m4/libtool.m4 m4/ltoptions.m4 m4/ltversion.m4
+pre-build:: debian/upstream-stuff
+debian/upstream-stuff: debian/stamp-copyright-check
+	mkdir -p debian/upstream-stuff
+	@for orig in $(upstreamtmpstuff); do \
+		backup="debian/upstream-stuff/$$orig"; \
+		[ ! -e "$$orig" ] || [ -e "$$backup" ] || { \
+			mkdir -p "$$(dirname "$$backup")"; \
+			echo mv "$$orig" "$$backup"; \
+			mv "$$orig" "$$backup"; \
+		}; \
+	done
+clean::
+	@for orig in $(upstreamtmpstuff); do \
+		backup="debian/upstream-stuff/$$orig"; \
+		if [ -e "$$backup" ]; then \
+			if [ -e "$$orig" ]; then \
+				echo "rm -rf" "$$orig"; \
+				rm -rf "$$orig"; \
+			fi; \
+			echo mv "$$backup" "$$orig"; \
+			mv "$$backup" "$$orig"; \
+		fi; \
+	done
+	rm -rf debian/upstream-stuff
+
+# (re)generate most possible autotools files
+DEB_ACLOCAL_ARGS = -Im4 --install --force
+DEB_AUTOMAKE_ARGS = --add-missing --copy --foreign --force
+DEB_MAKE_CLEAN_TARGET = distclean
+clean::
+	rm -f m4/pkg.m4

-- 
libshout packaging



More information about the pkg-multimedia-commits mailing list