diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2008-11-04 10:34:40 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2008-11-04 10:34:40 +0000 |
commit | ed9f3ec3427cff55fcc27beada6bb12e870ac3e0 (patch) | |
tree | c7dfa9bb07f7e894b3205a660d6ec2518bd8acd6 /abuild | |
parent | e15908ffc2799e75efd34c7bbbf6a77043137467 (diff) | |
download | abuild-ed9f3ec3427cff55fcc27beada6bb12e870ac3e0.tar.gz abuild-ed9f3ec3427cff55fcc27beada6bb12e870ac3e0.tar.bz2 abuild-ed9f3ec3427cff55fcc27beada6bb12e870ac3e0.tar.xz abuild-ed9f3ec3427cff55fcc27beada6bb12e870ac3e0.zip |
create .PKGINFO filev0.3
Diffstat (limited to 'abuild')
-rwxr-xr-x | abuild | 69 |
1 files changed, 58 insertions, 11 deletions
@@ -165,22 +165,69 @@ package_apk() { local p="$pkgname-$pkgver" [ "$pkgrel" -ne 0 ] && p="$p-r$pkgrel" local pkg="$p.apk" - local db="$dir/var/db/apk/$p" - mkdir -p "$db" - echo "$arch" > "$db/ARCH" - echo "$pkgdesc" > "$db/DESC" - echo "$license" > "$db/LICENSE" - echo "$depends" > "$db/DEPEND" - echo "$url" > "$db/WWW" +# local db="$dir/var/db/apk/$p" +# mkdir -p "$db" +# echo "$arch" > "$db/ARCH" +# echo "$pkgdesc" > "$db/DESC" +# echo "$license" > "$db/LICENSE" +# echo "$depends" > "$db/DEPEND" +# echo "$url" > "$db/WWW" + + [ ! -d "$dir" ] && die "Missing $dir" + cd "$dir" + msg "Creating $pkg" + local builddate=$(date -u "+%s") + local size=$(du -sk | awk '{print $1 * 1024}') + + echo "# Generated by $(basename $0) $myver" >.PKGINFO + if [ -n "$FAKEROOTKEY" ]; then + echo "# using $(fakeroot -v)" >> .PKGINFO + fi + echo "# $(date -u)" >> .PKGINFO + cat >> .PKGINFO <<EOF +pkgname = $pkgname +pkgver = $pkgver +pkgdesc = $pkgdesc +url = $url +builddate = $builddate +packager = ${PACKAGER:-"Unknown"} +size = $size +EOF local i + + for i in $license; do + echo "license = $i" >>.PKGINFO + done + for i in $replaces; do + echo "replaces = $i" >>.PKGINFO + done + for i in $depends; do + echo "depend = $i" >>.PKGINFO + done + for i in $conflicts; do + echo "conflict = $i" >>.PKGINFO + done + for i in $provides; do + echo "provides = $i" >>.PKGINFO + done + for i in $backup; do + echo "backup = $i" >>.PKGINFO + done + + local metafiles=".PKGINFO" if [ -n "$install" ]; then cp "$srcdir/$install" "$dir/.INSTALL" || return 1 chmod +x "$dir/.INSTALL" + metafiles="$metafiles .INSTALL" fi - for i in pre-install post-install pre-deinstall post-deinstall; do - [ -f ../$i ] && cp ../$i "$db"/ - done - ( cd "$dir" && tar -zcf "$PKGDEST/$pkg" * ) + +# for i in pre-install post-install pre-deinstall post-deinstall; do +# [ -f ../$i ] && cp ../$i "$db"/ +# done + + set * + [ "$1" = '*' ] && set -- + ( cd "$dir" && tar -zcf "$PKGDEST/$pkg" $metafiles $@ ) } package() { |