diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-11-13 04:43:42 +0000 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-11-13 04:43:42 +0000 |
commit | 77a04e26a835db3ab05f2fa2c9e9b25b255c2f96 (patch) | |
tree | 0c1551e259fa5dd5ba758ff562cc590792fe9e22 /user/command-not-found | |
parent | 4c868930b9c8af6ff6165b02a0c8cd5423139456 (diff) | |
download | packages-77a04e26a835db3ab05f2fa2c9e9b25b255c2f96.tar.gz packages-77a04e26a835db3ab05f2fa2c9e9b25b255c2f96.tar.bz2 packages-77a04e26a835db3ab05f2fa2c9e9b25b255c2f96.tar.xz packages-77a04e26a835db3ab05f2fa2c9e9b25b255c2f96.zip |
user/command-not-found: finally add this
Diffstat (limited to 'user/command-not-found')
-rw-r--r-- | user/command-not-found/APKBUILD | 42 | ||||
-rw-r--r-- | user/command-not-found/explicit-apk-path.patch | 11 |
2 files changed, 53 insertions, 0 deletions
diff --git a/user/command-not-found/APKBUILD b/user/command-not-found/APKBUILD new file mode 100644 index 000000000..96cd1127d --- /dev/null +++ b/user/command-not-found/APKBUILD @@ -0,0 +1,42 @@ +# Contributor: A. Wilcox <awilfox@adelielinux.org> +# Maintainer: A. Wilcox <awilfox@adelielinux.org> +pkgname=command-not-found +pkgver=0.3 +pkgrel=0 +pkgdesc="Provide suggestions for missing commands via APK" +url="https://git.dereferenced.org/kaniini/command-not-found" +arch="noarch" +options="!check" # No test suite. +license="MIT" +depends="apk-tools" +makedepends="" +subpackages="$pkgname-bash $pkgname-zsh" +source="$pkgname-$pkgver.tar.gz::https://git.dereferenced.org/kaniini/command-not-found/archive/v$pkgver.tar.gz + explicit-apk-path.patch + " +builddir="$srcdir/$pkgname" + +package() { + cd "$builddir" + install -d -D -m755 "$pkgdir"/usr/libexec + install -m755 command-not-found.sh "$pkgdir"/usr/libexec/command-not-found +} + +bash() { + pkgdesc="$pkgdesc (Bash shell support)" + install_if="$pkgname=$pkgver-r$pkgrel bash" + cd "$builddir" + install -d -D -m755 "$subpkgdir"/etc/profile.d/ + install -m755 profiles/command-not-found.ash "$subpkgdir"/etc/profile.d/command-not-found.sh +} + +zsh() { + pkgdesc="$pkgdesc (Z shell support)" + install_if="$pkgname=$pkgver-r$pkgrel zsh" + cd "$builddir" + install -d -D -m755 "$subpkgdir"/etc/zprofile.d/ + install -m755 profiles/command-not-found.zsh "$subpkgdir"/etc/zprofile.d/command-not-found.zsh +} + +sha512sums="a9fc6cf063195abf4bbf015f770b93fb23e2afc0efbed10a54adc1e0d38d7f9a57ab5817a52e483dd01aa21888e76f5aaefdbf89c835f227be2f150848ddb7ad command-not-found-0.3.tar.gz +37e9106924c595a514b5df43910f757b0e2867aa24c5bc2f4eb675eb110ce8c73d95c69c059a8a895a3ca58f441718261677c632acda5295c040a892cc024190 explicit-apk-path.patch" diff --git a/user/command-not-found/explicit-apk-path.patch b/user/command-not-found/explicit-apk-path.patch new file mode 100644 index 000000000..b99466b75 --- /dev/null +++ b/user/command-not-found/explicit-apk-path.patch @@ -0,0 +1,11 @@ +--- command-not-found/command-not-found.sh.old 2017-11-30 04:52:39.000000000 +0000 ++++ command-not-found/command-not-found.sh 2018-11-13 04:38:42.000000000 +0000 +@@ -21,7 +21,7 @@ + # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + # SOFTWARE. + +-results=$(apk search -xv "cmd:$1" 2>/dev/null) ++results=$(/sbin/apk search -xv "cmd:$1" 2>/dev/null) + + if [ "$results" ]; then + printf "The program '%s' may be found in these packages:\n" "$1" >&2 |