Use directly upstream tarball for "building" ocaml-source
authorStephane Glondu <steph@glondu.net>
Fri, 10 Feb 2012 16:47:43 +0000 (17:47 +0100)
committerStephane Glondu <steph@glondu.net>
Wed, 13 Jun 2012 13:53:34 +0000 (15:53 +0200)
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
debian/rules

index c561e6ef69259bb02d933ee7c99ab23eb1ad299e..3842d34efc5be6a34fcbd7fccbebe0659b326dca 100644 (file)
@@ -1 +1 @@
-debian/ocaml-source-@OCamlABI@.tar.bz2 /usr/src/
+debian/ocaml-source-@OCamlABI@.tar /usr/src/
index cf6fe27d227707f597e6d37f18056c8c5cce58a9..115be8e9de33e5d64ee645697b35fd15e1e34fb0 100755 (executable)
@@ -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