diff options
-rwxr-xr-x | abuild | 30 |
1 files changed, 21 insertions, 9 deletions
@@ -310,15 +310,24 @@ EOF 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 + for i in $install; do + script=${i#$name} + case "$script" in + .install) + warning "Deprecated .install script found." + script=.INSTALL + ;; + .pre-install|.post-install|.pre-upgrade|.post-upgrade|.pre-deinstall|.post-deinstall) + msg "Adding $script" + ;; + *) error "$script: Invalid install script" + return 1 + ;; + esac + cp "$srcdir/$i" "$dir/$script" || return 1 + chmod +x "$dir/$script" + metafiles="$metafiles $script" + done set * [ "$1" = '*' ] && set -- @@ -333,6 +342,7 @@ package() { # predefined splitfunc doc default_doc() { depends="$depends_doc" + install="$install_doc" local i for i in doc man info html sgml licenses; do if [ -d "$pkgdir/usr/share/$i" ]; then @@ -361,6 +371,7 @@ 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" @@ -377,6 +388,7 @@ mod() { # predefined splitfunc dev default_dev() { depends="$pkgname $depends_dev" + install="$install_dev" cd "$pkgdir" || return 0 for i in usr/include usr/lib/pkgconfig usr/share/aclocal\ usr/share/gettext usr/bin/*-config \ |