From patchwork Wed Apr 22 23:11:20 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frans Pop X-Patchwork-Id: 19450 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n3MNBOGr031696 for ; Wed, 22 Apr 2009 23:11:24 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751794AbZDVXLX (ORCPT ); Wed, 22 Apr 2009 19:11:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752006AbZDVXLX (ORCPT ); Wed, 22 Apr 2009 19:11:23 -0400 Received: from Cpsmtpm-eml108.kpnxchange.com ([195.121.3.12]:56014 "EHLO CPSMTPM-EML108.kpnxchange.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751794AbZDVXLX (ORCPT ); Wed, 22 Apr 2009 19:11:23 -0400 Received: from aragorn.fjphome.nl ([84.85.147.182]) by CPSMTPM-EML108.kpnxchange.com with Microsoft SMTPSVC(7.0.6001.18000); Thu, 23 Apr 2009 01:11:21 +0200 From: Frans Pop To: linux-kbuild@vger.kernel.org Subject: [PATCH 9/14] deb-pkg: improve maintainer identification Date: Thu, 23 Apr 2009 01:11:20 +0200 User-Agent: KMail/1.9.9 Cc: Sam Ravnborg , maximilian attems , Andres Salomon References: <200904230034.59627.elendil@planet.nl> In-Reply-To: <200904230034.59627.elendil@planet.nl> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200904230111.21558.elendil@planet.nl> X-OriginalArrivalTime: 22 Apr 2009 23:11:21.0756 (UTC) FILETIME=[A6828DC0:01C9C39F] Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org From: maximilian attems Subject: deb-pkg: improve maintainer identification Try harder to find email and maintainer name. Debian's own devscripts all use DEBEMAIL or DEBFULLNAME prior to an eventual EMAIL or NAME environment variable. Match their logic. "Anonymous" sounds nicer then "Kernel Compiler" if no name is found. Signed-off-by: maximilian attems Signed-off-by: Frans Pop Cc: Andres Salomon --- I've removed some unnecessary braces. Also, "Anonymous Maintainer" seemed somewhat redundant to me; just "Anonymous" should do. -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/scripts/package/builddeb b/scripts/package/builddeb index 2bd12c1..60f8de2 100644 --- a/scripts/package/builddeb +++ b/scripts/package/builddeb @@ -95,14 +95,30 @@ EOF chmod 755 "$tmpdir/DEBIAN/$script" done -name="Kernel Compiler <$(id -nu)@$(hostname -f)>" +# Try to determine maintainer and email values +if [ -n "$DEBEMAIL" ]; then + email=$DEBEMAIL +elif [ -n "$EMAIL" ]; then + email=$EMAIL +else + email=$(id -nu)@$(hostname -f) +fi +if [ -n "$DEBFULLNAME" ]; then + name=$DEBFULLNAME +elif [ -n "$NAME" ]; then + name=$NAME +else + name="Anonymous" +fi +maintainer="$name <$email>" + # Generate a simple changelog template cat < debian/changelog linux ($packageversion) unstable; urgency=low * Custom built Linux kernel. - -- $name $(date -R) + -- $maintainer $(date -R) EOF # Generate copyright file @@ -130,7 +146,7 @@ cat < debian/control Source: linux Section: base Priority: optional -Maintainer: $name +Maintainer: $maintainer Standards-Version: 3.6.1 EOF