From 35c8c0a215b32ff4edccc726128a79a5bbe500de Mon Sep 17 00:00:00 2001 From: Stephane Glondu Date: Fri, 10 Feb 2012 17:47:43 +0100 Subject: [PATCH] Use directly upstream tarball for "building" ocaml-source This commit changes the "interface" of the ocaml-source package: it now installs /usr/src/ocaml-source-$(OCAML_ABI).tar, which contains the .orig.tar.bz2 along with debian patches in a debian-patches/ directory. --- debian/ocaml-source.install.in | 2 +- debian/rules | 21 ++++++--------------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/debian/ocaml-source.install.in b/debian/ocaml-source.install.in index c561e6ef..3842d34e 100644 --- a/debian/ocaml-source.install.in +++ b/debian/ocaml-source.install.in @@ -1 +1 @@ -debian/ocaml-source-@OCamlABI@.tar.bz2 /usr/src/ +debian/ocaml-source-@OCamlABI@.tar /usr/src/ diff --git a/debian/rules b/debian/rules index cf6fe27d..115be8e9 100755 --- a/debian/rules +++ b/debian/rules @@ -32,7 +32,7 @@ INSTDIR = $(CURDIR)/debian/tmp/usr DISTDIR = $(PACKAGE)-$(OCAML_ABI) UPSTREAM_VERSION = $(shell dpkg-parsechangelog | awk '/^Version:/{print $$2}' | { read u; echo $${u%-*}; }) UPSTREAM_TARBALL = ../$(PACKAGE)_$(UPSTREAM_VERSION).orig.tar.bz2 -SRCTARBALL = $(PACKAGE)-source-$(OCAML_ABI).tar.bz2 +SRCTARBALL = $(PACKAGE)-source-$(OCAML_ABI).tar TESTDIR := debian/test-build TESTRULES := debian/rules DEB_TEST_BUILD_PREFIX=$(CURDIR)/$(TESTDIR) @@ -103,23 +103,14 @@ pre-config-stamp: $(TARBALL_TARGET) touch $@ ifneq (,$(TARBALL_TARGET)) -$(TARBALL_TARGET): -# Make a copy of the current (patched) sources in debian/$(DISTDIR) - ln -fs . $(DISTDIR) # beware of the symlink recursion! +$(TARBALL_TARGET): $(UPSTREAM_TARBALL) mkdir debian/$(DISTDIR) - tar --anchored -ch \ - --exclude=$(DISTDIR)/$(DISTDIR) \ - --exclude-from=debian/ocaml-source.exclude \ - $(DISTDIR)/ | tar -C debian -x - rm -f $(DISTDIR) -# Copy patches and unapply them +# Copy upstream tarball + cp $< debian/$(DISTDIR) +# Copy debian/patches cp -a debian/patches debian/$(DISTDIR)/debian-patches - cd debian/$(DISTDIR) && sort -r debian-patches/series | \ - while read u; do \ - patch -R -V never -p1 < debian-patches/$$u; \ - done # Create the tarball and cleanup - tar -C debian -cjf $@ $(DISTDIR) + tar -C debian -cf $@ $(DISTDIR) rm -Rf debian/$(DISTDIR) endif -- 2.30.2