From 82e959195414246dece1e4c636b40d06d65211a7 Mon Sep 17 00:00:00 2001
From: Ben Pfaff <blp@nicira.com>
Date: Wed, 1 Sep 2010 10:50:49 -0700
Subject: [PATCH] debian: Generate authorship in debian/copyright from AUTHORS.

---
 debian/.gitignore                  |  1 +
 debian/automake.mk                 | 10 ++++++++++
 debian/{copyright => copyright.in} | 29 +----------------------------
 3 files changed, 12 insertions(+), 28 deletions(-)
 rename debian/{copyright => copyright.in} (50%)

diff --git a/debian/.gitignore b/debian/.gitignore
index 3beef4405..7f43aa6ed 100644
--- a/debian/.gitignore
+++ b/debian/.gitignore
@@ -3,6 +3,7 @@
 *.substvars
 /control
 /corekeeper
+/copyright
 /files
 /nicira-switch
 /openvswitch
diff --git a/debian/automake.mk b/debian/automake.mk
index 5a23d4632..ba9ea861d 100644
--- a/debian/automake.mk
+++ b/debian/automake.mk
@@ -4,6 +4,7 @@ EXTRA_DIST += \
 	debian/control \
 	debian/control.modules.in \
 	debian/copyright \
+	debian/copyright.in \
 	debian/corekeeper.cron.daily \
 	debian/corekeeper.init \
 	debian/corekeeper.override \
@@ -50,3 +51,12 @@ check-debian-changelog-version:
 	fi
 ALL_LOCAL += check-debian-changelog-version
 DIST_HOOKS += check-debian-changelog-version
+
+$(srcdir)/debian/copyright: AUTHORS debian/copyright.in
+	{ sed -n -e '/%AUTHORS%/q' -e p < $(srcdir)/debian/copyright.in;   \
+	  sed '1,/^$$/d' $(srcdir)/AUTHORS |				   \
+		sed -n -e '/^$$/q' -e 's/^/  /p';			   \
+	  sed -e '1,/%AUTHORS%/d' $(srcdir)/debian/copyright.in;	   \
+	} > $@
+
+DISTCLEANFILES += debian/copyright
diff --git a/debian/copyright b/debian/copyright.in
similarity index 50%
rename from debian/copyright
rename to debian/copyright.in
index f4f4df6d5..ae1a78868 100644
--- a/debian/copyright
+++ b/debian/copyright.in
@@ -2,36 +2,9 @@ The original sources for this package can be found at:
 
 	http://openvswitch.org/
 
-
 Upstream Authors (from AUTHORS):
 
-	Andy Southgate          andy.southgate@citrix.com
-	Ben Pfaff               blp@nicira.com
-	Bryan Phillippe         bp@toroki.com
-	Dan Wendlandt           dan@nicira.com
-	David Erickson          derickso@stanford.edu
-	Glen Gibb               grg@stanford.edu
-	Ian Campbell            Ian.Campbell@citrix.com
-	Jean Tourrilhes         jt@hpl.hp.com
-	Jeremy Stribling        strib@nicira.com
-	Jesse Gross             jesse@nicira.com
-	Joe Perches             joe@perches.com
-	Jun Nakajima            jun.nakajima@intel.com
-	Justin Pettit           jpettit@nicira.com
-	Keith Amidon            keith@nicira.com
-	Martin Casado           casado@nicira.com
-	Natasha Gude            natasha@nicira.com
-	Neil McKee              neil.mckee@inmon.com
-	Paul Fazzone            pfazzone@nicira.com
-	Reid Price              reid@nicira.com
-	Simon Horman            horms@verge.net.au
-	Tetsuo NAKAGAWA         nakagawa@mxc.nes.nec.co.jp
-	Thomas Lacroix          thomas.lacroix@citrix.com
-	Todd Deshane            deshantm@gmail.com
-	Tom Everman             teverman@google.com
-	Tsvi Slonim             tsvi@toroki.com
-	Wei Yongjun             yjwei@cn.fujitsu.com
-	Yu Zhiguo               yuzg@cn.fujitsu.com
+%AUTHORS%
 
 Upstream Copyright Holders:
 
-- 
2.47.0