Commit 947681e9 authored by Natanael Copa's avatar Natanael Copa

abuild: add maintainer info to .PKGBUILD

We can either set maintainer="..." in APKBUILD or use it as comment.
parent d3efd64a
...@@ -459,6 +459,12 @@ git_last_commit() { ...@@ -459,6 +459,12 @@ git_last_commit() {
git log --format=oneline -n 1 "$startdir" | awk '{print $1}' 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() { prepare_metafiles() {
getpkgver || return 1 getpkgver || return 1
local name=${subpkgname:-$pkgname} local name=${subpkgname:-$pkgname}
...@@ -492,7 +498,6 @@ builddate = $builddate ...@@ -492,7 +498,6 @@ builddate = $builddate
packager = ${PACKAGER:-"Unknown"} packager = ${PACKAGER:-"Unknown"}
size = $size size = $size
arch = $parch arch = $parch
commit = $(git_last_commit)$(git_dirty)
EOF EOF
local i deps local i deps
deps="$depends" deps="$depends"
...@@ -506,6 +511,16 @@ EOF ...@@ -506,6 +511,16 @@ EOF
done done
fi 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 for i in $license; do
echo "license = $i" >> "$pkginfo" echo "license = $i" >> "$pkginfo"
done done
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment