summaryrefslogtreecommitdiff
path: root/abuild
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-03-06 17:51:53 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-03-06 17:51:53 +0000
commit2fb6e1a6512047ea1d7f9a31bdce5e1561682fb9 (patch)
tree0eb8d65c3a18851badd632e521a28e546610057e /abuild
parent2b1fd461770058c6fd6cbdd8edac934843ad94da (diff)
downloadabuild-2fb6e1a6512047ea1d7f9a31bdce5e1561682fb9.tar.gz
abuild-2fb6e1a6512047ea1d7f9a31bdce5e1561682fb9.tar.bz2
abuild-2fb6e1a6512047ea1d7f9a31bdce5e1561682fb9.tar.xz
abuild-2fb6e1a6512047ea1d7f9a31bdce5e1561682fb9.zip
abuild: fixes for new install scripts
Diffstat (limited to 'abuild')
-rwxr-xr-xabuild16
1 files changed, 11 insertions, 5 deletions
diff --git a/abuild b/abuild
index e73e062..7fea685 100755
--- a/abuild
+++ b/abuild
@@ -285,9 +285,14 @@ size = $size
EOF
local i deps
deps="$depends"
- if [ -n "$install" ] && head -n 1 "$srcdir/$install" | grep '^#' >/dev/null && ! depends_has busybox && [ "$pkgname" != "busybox" ]; then
- msg "Adding busybox to depends since we have an install script"
- deps="$deps busybox"
+ if [ "$pkgname" != "busybox" ] && ! depends_has busbox; then
+ for i in $install; do
+ if head -n 1 "$srcdir/$i" | grep '^#!/bin/sh' >/dev/null ; then
+ msg "Script found. busybox added as a dependency for $pkg"
+ deps="$deps busybox"
+ break
+ fi
+ done
fi
for i in $license; do
@@ -672,8 +677,9 @@ newaport() {
if [ -n "$cpinitd" ]; then
cp "$datadir"/sample.initd $pn.initd
cp "$datadir"/sample.confd $pn.confd
- cp "$datadir"/sample.install $pn.install
- sed -i -e "s/^install=.*/install=\"$pn.install\"/" \
+ cp "$datadir"/sample.pre-install $pn.pre-install
+ cp "$datadir"/sample.post-install $pn.post-install
+ sed -i -e "s/^install=.*/install=\"\$pkgname.pre-install \$pkgname.post-install\"/" \
-e "s/^source=\"\(.*\)\"/source=\"\1\n\t$pn.initd\n\t$pn.confd\n\t\$install\n\t\"/" \
APKBUILD