summaryrefslogtreecommitdiff
path: root/abuild.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-03-08 10:08:01 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-03-08 10:08:01 +0000
commit947681e9d101e6fde816de68aad15e81a5c50185 (patch)
tree11d30fa5435c53de0f5507de422a583fdc2ec407 /abuild.in
parentd3efd64ab1f21946e3cce436ab712505fddb5ce0 (diff)
downloadabuild-947681e9d101e6fde816de68aad15e81a5c50185.tar.gz
abuild-947681e9d101e6fde816de68aad15e81a5c50185.tar.bz2
abuild-947681e9d101e6fde816de68aad15e81a5c50185.tar.xz
abuild-947681e9d101e6fde816de68aad15e81a5c50185.zip
abuild: add maintainer info to .PKGBUILD
We can either set maintainer="..." in APKBUILD or use it as comment.
Diffstat (limited to 'abuild.in')
-rwxr-xr-xabuild.in17
1 files changed, 16 insertions, 1 deletions
diff --git a/abuild.in b/abuild.in
index fff2f63..f302046 100755
--- a/abuild.in
+++ b/abuild.in
@@ -459,6 +459,12 @@ git_last_commit() {
git log --format=oneline -n 1 "$startdir" | awk '{print $1}'
}
+get_maintainer() {
+ if [ -z "$maintainer" ]; then
+ maintainer=$(awk -F': ' '/\# *Maintainer/ {print $2}' "$APKBUILD")
+ fi
+}
+
prepare_metafiles() {
getpkgver || return 1
local name=${subpkgname:-$pkgname}
@@ -492,7 +498,6 @@ builddate = $builddate
packager = ${PACKAGER:-"Unknown"}
size = $size
arch = $parch
-commit = $(git_last_commit)$(git_dirty)
EOF
local i deps
deps="$depends"
@@ -506,6 +511,16 @@ EOF
done
fi
+ local last_commit="$(git_last_commit)$(git_dirty)"
+ if [ -n "$last_commit" ]; then
+ echo "commit = $last_commit" >> "$pkginfo"
+ fi
+
+ get_maintainer
+ if [ -n "$maintainer" ]; then
+ echo "maintainer = $maintainer" >> "$pkginfo"
+ fi
+
for i in $license; do
echo "license = $i" >> "$pkginfo"
done