You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by do...@apache.org on 2010/10/09 00:01:32 UTC

svn commit: r1006048 - in /ofbiz/trunk/debian: changelog rules strip-common-licenses.sh

Author: doogie
Date: Fri Oct  8 22:01:32 2010
New Revision: 1006048

URL: http://svn.apache.org/viewvc?rev=1006048&view=rev
Log:
Remove Apache-2.0 license text from copyright, instead referring to the
shared one in /usr/share/common-licenses.

Added:
    ofbiz/trunk/debian/strip-common-licenses.sh
Modified:
    ofbiz/trunk/debian/changelog
    ofbiz/trunk/debian/rules

Modified: ofbiz/trunk/debian/changelog
URL: http://svn.apache.org/viewvc/ofbiz/trunk/debian/changelog?rev=1006048&r1=1006047&r2=1006048&view=diff
==============================================================================
--- ofbiz/trunk/debian/changelog (original)
+++ ofbiz/trunk/debian/changelog Fri Oct  8 22:01:32 2010
@@ -26,6 +26,8 @@ ofbiz (UNRELEASED) unstable; urgency=low
     anymore.
   * Protect sourcing of /etc/default/rcS, it is a conffile that might be
     removed.
+  * Remove Apache-2.0 license text from copyright, instead referring to the
+    shared one in /usr/share/common-licenses.
 
  -- Adam Heath <do...@brainfood.com>  UNRELEASED
 

Modified: ofbiz/trunk/debian/rules
URL: http://svn.apache.org/viewvc/ofbiz/trunk/debian/rules?rev=1006048&r1=1006047&r2=1006048&view=diff
==============================================================================
--- ofbiz/trunk/debian/rules (original)
+++ ofbiz/trunk/debian/rules Fri Oct  8 22:01:32 2010
@@ -91,7 +91,8 @@ debian/EncryptPassword.class: debian/sta
 	$(JAVAC) -classpath framework/base/build/lib/ofbiz-base.jar:framework/common/build/lib/ofbiz-common.jar -d $(@D) $*.java
 
 debian/copyright: debian/copyright.in LICENSE
-	cat $^ > $@.new
+	cat debian/copyright.in > $@.new
+	sh debian/strip-common-licenses.sh >> $@.new
 	mv $@.new $@
 
 binary-indep: DH_OPTIONS=-i

Added: ofbiz/trunk/debian/strip-common-licenses.sh
URL: http://svn.apache.org/viewvc/ofbiz/trunk/debian/strip-common-licenses.sh?rev=1006048&view=auto
==============================================================================
--- ofbiz/trunk/debian/strip-common-licenses.sh (added)
+++ ofbiz/trunk/debian/strip-common-licenses.sh Fri Oct  8 22:01:32 2010
@@ -0,0 +1,54 @@
+#!/bin/sh
+
+mode=start
+skipping=
+find_license=
+while IFS="" read line; do
+	case "$mode" in
+		(start)
+			case "$line" in
+				(=========================================================================)
+					mode=in_header
+					;;
+				(*)
+					echo "Bad start line: $line"
+					exit 1
+					;;
+			esac
+			;;
+		(in_header)
+			case "$line" in
+				(=========================================================================)
+					mode=license_lead
+					;;
+				(*)
+					;;
+			esac
+			;;
+		(license_lead)
+			case "$line" in
+				(=========================================================================)
+					mode=license_text
+					;;
+				(*)
+					;;
+			esac
+			;;
+		(license_text)
+			case "$line" in
+				("                                 Apache License")
+					skipping=1
+					echo "On debian systems, the full Apache 2.0 license is located at: "
+					echo "/usr/share/common-licenses/Apache-2.0"
+					;;
+				(=========================================================================)
+					skipping=
+					mode=license_lead
+					;;
+			esac
+			;;
+	esac
+	if [ "z" = "z$skipping" ]; then
+		echo "$line"
+	fi
+done < LICENSE