[Pkg-openldap-devel] r958 - openldap/trunk/debian

Russ Allbery rra at alioth.debian.org
Fri Dec 21 21:47:15 UTC 2007


Author: rra
Date: 2007-12-21 21:47:15 +0000 (Fri, 21 Dec 2007)
New Revision: 958

Removed:
   openldap/trunk/debian/upstream_strip_nondfsg.sh
Modified:
   openldap/trunk/debian/changelog
   openldap/trunk/debian/rules
Log:
  - Rewrite upstream_strip_nondfsg.sh as a get-orig-source target.

Modified: openldap/trunk/debian/changelog
===================================================================
--- openldap/trunk/debian/changelog	2007-12-21 21:30:31 UTC (rev 957)
+++ openldap/trunk/debian/changelog	2007-12-21 21:47:15 UTC (rev 958)
@@ -80,6 +80,7 @@
   * debian/rules cleanup:
     - Fix patch dependencies for parallel build (hopefully).
     - Tell configure the system type.
+    - Rewrite upstream_strip_nondfsg.sh as a get-orig-source target.
     - Remove stamp files as the first step of the clean target.
     - Add trivial build-arch and build-indep targets.
     - Remove dead code and unnecessary comments.
@@ -89,7 +90,7 @@
   * Remove versioned dependency on an ancient dpkg-dev.
   * Wrap and reorder Build-Depends for readability.
 
- -- Russ Allbery <rra at debian.org>  Fri, 21 Dec 2007 13:04:52 -0800
+ -- Russ Allbery <rra at debian.org>  Fri, 21 Dec 2007 13:47:01 -0800
 
 openldap2.3 (2.3.39-1) unstable; urgency=medium
 

Modified: openldap/trunk/debian/rules
===================================================================
--- openldap/trunk/debian/rules	2007-12-21 21:30:31 UTC (rev 957)
+++ openldap/trunk/debian/rules	2007-12-21 21:47:15 UTC (rev 958)
@@ -39,6 +39,32 @@
 # Include the quilt patch system.
 include /usr/share/quilt/quilt.make
 
+# These variable is used only by get-orig-source, which will normally only be
+# run by maintainers.
+VERSION = 2.4.7
+URL     = http://www.openldap.org/software/download/OpenLDAP/openldap-release/
+
+# Download the upstream source and make changes as required for DFSG reasons.
+# Assumes wget is available, as this is generally only used by the package
+# maintainers.
+get-orig-source:
+	@if [ ! -d "debian/schema" ] ; then \
+	    echo 'Run this from the top directory of the Debian source' >&2; \
+	    exit 1; \
+	fi
+	wget $(URL)/openldap-$(VERSION).tgz
+	tar xzf openldap-$(VERSION).tgz
+	rm -r openldap-$(VERSION)/doc/drafts
+	rm -r openldap-$(VERSION)/doc/rfc
+	set -e; for schema in debian/schema/*.schema debian/schema/*.ldif ; do \
+	    file=`basename "$$schema"`; \
+	    rm openldap-$(VERSION)/servers/slapd/schema/$$file; \
+	done
+	mv openldap-$(VERSION) openldap_$(VERSION).orig
+	tar cf openldap_$(VERSION).orig.tar openldap_$(VERSION).orig
+	rm -r openldap_$(VERSION).orig
+	gzip -9 openldap_$(VERSION).orig.tar
+
 $(builddir)/Makefile: patch
 	# Check if we include the RFCs and Internet-Drafts (which are non
 	# DFSG-free).  You can set DFSG_NONFREE to build the packages from the

Deleted: openldap/trunk/debian/upstream_strip_nondfsg.sh
===================================================================
--- openldap/trunk/debian/upstream_strip_nondfsg.sh	2007-12-21 21:30:31 UTC (rev 957)
+++ openldap/trunk/debian/upstream_strip_nondfsg.sh	2007-12-21 21:47:15 UTC (rev 958)
@@ -1,43 +0,0 @@
-#! /bin/sh
-#
-# Strips non-DFSG-free content from the OpenLDAP upstream tarball.  This
-# script must be run from the top directory of the Debian package source
-# since it needs debian/schema to know what schema to remove from upstream.
-
-set -e
-
-if [ "$#" -ne 1 ]; then
-	echo >&2 "Usage: $0 <upstream-archive.tar.gz>"
-	exit 1
-fi
-if [ ! -d "debian/schema" ] ; then
-	echo >&2 "$0 must be run from the top directory of the Debian source"
-	exit 1
-fi
-
-archive=$1
-
-
-# Unpack the upstream archive to a temporary directory
-tempdir=`mktemp -d`
-tar -C $tempdir -xzf $archive
-
-
-# Remove RFCs and drafts as they are not DFSG-free
-rm -R $tempdir/openldap-*/doc/drafts
-rm -R $tempdir/openldap-*/doc/rfc
-
-# Remove schema for which we have a local stripped version.
-for schema in debian/schema/*.schema debian/schema/*.ldif ; do
-        file=`basename "$schema"`
-        rm $tempdir/openldap-*/servers/slapd/schema/$file
-done
-
-
-# Recreate the archive from the data
-temparchive=`mktemp $archive.XXXXXX`
-tar -C $tempdir -cf - .|gzip -9 > "$temparchive"
-mv $temparchive $archive
-
-# Remove temporary files
-rm -R $tempdir




More information about the Pkg-openldap-devel mailing list