diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2019-04-23 16:35:05 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2019-04-23 16:35:05 +0000 |
commit | 18a355feef818f1fdfa581067d5b846e2ddc7888 (patch) | |
tree | 88fca9cad7cb6ec002dc59b557fa016f974f720f /community/abiword/APKBUILD | |
parent | 2e1d8d625fa0dc71ee08e82233b909f8ebad072a (diff) | |
download | aports-18a355feef818f1fdfa581067d5b846e2ddc7888.tar.bz2 aports-18a355feef818f1fdfa581067d5b846e2ddc7888.tar.xz |
community/abiword: get rid of eval
simplify by extracting plugin name from $subpkgname so we don't need to
use eval.
Diffstat (limited to 'community/abiword/APKBUILD')
-rw-r--r-- | community/abiword/APKBUILD | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/community/abiword/APKBUILD b/community/abiword/APKBUILD index baba4721e9..52745ebe73 100644 --- a/community/abiword/APKBUILD +++ b/community/abiword/APKBUILD @@ -26,7 +26,7 @@ _plugins="applix babelfish bmp clarisworks collab docbook command eml epub \ xslfo" for _i in $_plugins; do - subpackages="$subpackages $pkgname-plugin-$_i:plugin_${_i}" + subpackages="$subpackages $pkgname-plugin-$_i:_plugin" done source="http://www.abisource.com/downloads/$pkgname/$pkgver/source/$pkgname-$pkgver.tar.gz @@ -51,18 +51,14 @@ package() { make DESTDIR="$pkgdir" install } -_do_plugin() { - local plugin="$1" - pkgdesc="Abiword $1 plugin" +_plugin() { + local plugin="${subpkgname#${pkgname}-plugin-}" + pkgdesc="Abiword $plugin plugin" local dir="usr/lib/abiword-${pkgver%.*}/plugins" mkdir -p "$subpkgdir"/$dir mv "$pkgdir"/$dir/$plugin.so "$subpkgdir"/$dir/ } -for _i in $_plugins; do - eval "plugin_${_i}() { _do_plugin $_i; }" -done - plugins() { pkgdesc="Abiword plugins, all of them" depends= |