With makepkg 3.4.0 is possible to avoid the build() function and use package() 
only.
Current AUR checks only for build() when it parsing PKGBUILD, this patch 
checks for both. build() OR package() function is needed.

-- 
Andrea Scarpino - andreascarpino.it
KDE Maintainer in Arch Linux
From 8dbc3205d67de8ca26abcdf8596c8f540ec27a5d Mon Sep 17 00:00:00 2001
From: Andrea Scarpino <[email protected]>
Date: Wed, 23 Jun 2010 16:26:29 +0200
Subject: [PATCH] Accept packages with build and/or package function (FS#19914)

---
 web/html/pkgsubmit.php |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index 0b9335b..7ca2aaf 100644
--- a/web/html/pkgsubmit.php
+++ b/web/html/pkgsubmit.php
@@ -113,7 +113,7 @@ if ($_COOKIE["AURSID"]):
 
 			# Now process the lines and put any var=val lines into the
 			# 'pkgbuild' array. Also check to make sure it has the build()
-			# function.
+			# or the package() functions.
 			#
 			$seen_build_function = 0;
 			while (list($k, $line) = each($lines)) {
@@ -149,7 +149,7 @@ if ($_COOKIE["AURSID"]):
 				}
 				else {
 					# Non variable assignment line. (comment, blank, command, etc)
-					if (preg_match('/\s*build\s*\(\)/', $line)) {
+					if (preg_match('/\s*build\s*\(\)/', $line) || preg_match('/\s*package\s*\(\)/', $line)) {
 						$seen_build_function = 1;
 					}
 				}
@@ -160,7 +160,7 @@ if ($_COOKIE["AURSID"]):
 			# on the values, or attempts to fix line continuation/wrapping.
 			#
 			if (!$seen_build_function) {
-				$error = __("Missing build function in PKGBUILD.");
+				$error = __("Missing build and package functions in PKGBUILD.");
 			}
 
 			$req_vars = array("url", "pkgdesc", "license", "pkgrel", "pkgver", "arch", "pkgname");
-- 
1.7.1

Reply via email to