[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

X Strike Force X.Org X11 SVN commit: r256 - trunk/debian



Author: branden
Date: 2005-06-23 00:39:26 -0500 (Thu, 23 Jun 2005)
New Revision: 256

Modified:
   trunk/debian/rules
Log:
Improve make-orig-tar-gz target.
+ Throw an actual error message if a properly-named source directory cannot
  be found.
+ Tell tar to exclude .svn directories and their contents, so that a
  reasonable .orig.tar.gz can be constructed from an SVN checkout as well as
  an export.
+ Add more comments.
+ Wrap lines at 80 columns.


Modified: trunk/debian/rules
===================================================================
--- trunk/debian/rules	2005-06-23 05:01:52 UTC (rev 255)
+++ trunk/debian/rules	2005-06-23 05:39:26 UTC (rev 256)
@@ -771,14 +771,27 @@
 	rm -f xc/programs/Xserver/hw/xfree86/drivers/rendition/v20002d.uc
 
 # Change to what should be the correct directory, ensure it is, and if
-# so, create the .orig.tar.gz file.
+# so, create the .orig.tar.gz file.  Exclude the debian directory and its
+# contents, and any .svn directories and their contents (so that we can safely
+# build an .orig.tar.gz from SVN checkout, not just an export).
 #
 # Note: This rule is for Debian package maintainers' convenience, and is not
 # needed for conventional build scenarios.
+#
+# This rule *IS* the recommended method for creating a new .orig.tar.gz file,
+# for the rare situations when one is needed.
 make-orig-tar-gz: prune-upstream-tree
 	( cd .. \
-	  && test -d $(SOURCE_NAME)-$(UPSTREAM_VERSION) \
-	  && tar --exclude=debian --exclude=debian/* -cf - $(SOURCE_NAME)-$(UPSTREAM_VERSION) | gzip -9 >$(SOURCE_NAME)_$(UPSTREAM_VERSION).orig.tar.gz )
+	  && if ! [ -d $(SOURCE_NAME)-$(UPSTREAM_VERSION) ]; then \
+	    echo "../$(SOURCE_NAME)-$(UPSTREAM_VERSION) does not exist or is" \
+	         "not a directory." >&2; \
+	    exit 1; \
+	  else \
+	    tar --exclude=debian --exclude=debian/* \
+	        --exclude=.svn --exclude=.svn/* \
+	        -cf - $(SOURCE_NAME)-$(UPSTREAM_VERSION) \
+	    | gzip -9 >$(SOURCE_NAME)_$(UPSTREAM_VERSION).orig.tar.gz; \
+	  fi )
 
 # Verify that there are no offsets or fuzz in our patches.
 #



Reply to: