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() {
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
......
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