diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-03-08 10:08:01 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-03-08 10:08:01 +0000 |
commit | 947681e9d101e6fde816de68aad15e81a5c50185 (patch) | |
tree | 11d30fa5435c53de0f5507de422a583fdc2ec407 /abuild.in | |
parent | d3efd64ab1f21946e3cce436ab712505fddb5ce0 (diff) | |
download | abuild-947681e9d101e6fde816de68aad15e81a5c50185.tar.bz2 abuild-947681e9d101e6fde816de68aad15e81a5c50185.tar.xz |
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-x | abuild.in | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -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 |