abuild: support for new style install scrits

We need to list all install scripts in $install rather than specify it
in subpackage
This commit is contained in:
Natanael Copa 2011-06-27 18:55:14 +00:00
parent 42df5722ee
commit f597a6e68c

View File

@ -586,15 +586,12 @@ EOF
local metafiles=".PKGINFO"
for i in $install ${triggers%%:*}; do
local n=${i%.*}
if [ "$n" != "$pkgname" ]; then
continue
fi
script=${i#$name}
case "$script" in
.pre-install|.post-install|.pre-upgrade|.post-upgrade|.pre-deinstall|.post-deinstall|.trigger)
msg "Adding $script"
;;
*) error "$script: Invalid install/trigger script"
return 1
;;
esac
msg "Adding $script"
cp "$startdir/$i" "$controldir/$script" || return 1
chmod +x "$controldir/$script"
metafiles="$metafiles $script"
@ -849,7 +846,6 @@ update_abuildrepo() {
# predefined splitfunc doc
default_doc() {
depends="$depends_doc"
install="$install_doc"
triggers="$triggers_doc"
pkgdesc="$pkgdesc (documentation)"
arch=${arch_doc:-"noarch"}
@ -882,7 +878,6 @@ doc() {
# predefined splitfunc mod
default_mod() {
depends="$kernel $depends_mod"
install="$install_mod"
for i in firmware modules; do
if [ -d "$pkgdir/lib/$i" ]; then
rm -rf "$subpkgdir/lib"
@ -900,7 +895,6 @@ mod() {
default_dev() {
local i= j=
depends="$pkgname $depends_dev"
install="$install_dev"
triggers="$triggers_dev"
pkgdesc="$pkgdesc (development files)"
@ -1443,7 +1437,6 @@ fi
if [ -n "$subpkgname" ]; then
origsubpackages="$subpackages"
subpackages=
install=
triggers=
fi
pkgdir="$pkgbasedir/$pkgname"