From 3c5f4385d93c056a8a5bf42bb43335b958685366 Mon Sep 17 00:00:00 2001 From: graysky Date: Sun, 30 Oct 2022 13:42:04 -0400 Subject: [PATCH] added aur/shonenjump --- aur/shonenjump/PKGBUILD | 40 +++++++++++++++++++++++++++++++++++ aur/shonenjump/readme.install | 15 +++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 aur/shonenjump/PKGBUILD create mode 100644 aur/shonenjump/readme.install diff --git a/aur/shonenjump/PKGBUILD b/aur/shonenjump/PKGBUILD new file mode 100644 index 000000000..44e830c9e --- /dev/null +++ b/aur/shonenjump/PKGBUILD @@ -0,0 +1,40 @@ +# Maintainer: graysky + +pkgname=shonenjump +pkgver=0.8.0 +pkgrel=1 +pkgdesc="A faster way to change directory and improve command line productivity" +arch=(x86_64) +url="https://github.com/suzaku/shonenjump" +license=(custom) +makedepends=(go) +depends=(glibc) +conflicts=(autojump) +install=readme.install +source=("$pkgname-$pkgver.tar.gz::https://github.com/suzaku/shonenjump/archive/refs/tags/v$pkgver.tar.gz") +b2sums=('9b46e3a27d29b2b1d3be3a703b90e33f5b4c5e5d3377df12bdcd5eee1efca9c35858b32462b9d100541fa76b59bac3b07f07d37825c83c510edca59504fffaf0') + +build() { + cd "$pkgname-$pkgver" + CGO_CPPFLAGS="${CPPFLAGS}" CGO_CFLAGS="${CFLAGS}" CGO_CXXFLAGS="${CXXFLAGS}" CGO_LDFLAGS="${LDFLAGS}" \ + go build -buildmode=pie -ldflags "-linkmode external -extldflags \"${LDFLAGS}\"" +} + +package() { + cd "$pkgname-$pkgver" + install -d "$pkgdir/usr/bin/" + install -m755 "$pkgname" "$pkgdir/usr/bin/$pkgname" + + install -d "$pkgdir/usr/share/licenses/$pkgname" + install -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + + install -d "$pkgdir/etc/profile.d" + + cd scripts + for i in bash fish zsh; do + install -m644 "$pkgname.$i" "$pkgdir/etc/profile.d/$pkgname.$i" + done + + install -d "$pkgdir/usr/share/zsh/site-functions" + install -m644 _j "$pkgdir/usr/share/zsh/site-functions/_j" +} diff --git a/aur/shonenjump/readme.install b/aur/shonenjump/readme.install new file mode 100644 index 000000000..10e3879fa --- /dev/null +++ b/aur/shonenjump/readme.install @@ -0,0 +1,15 @@ +## arg 1: the new package version +## arg 2: the old package version + +post_install() { + cat <>> Bash users will need to add the following to ~/.bashrc: + [[ -f /etc/profile.d/shonenjump.sh ]] && source /etc/profile.d/shonenjump.sh + + Fish users will need to add the following to ~/.config/fish/config.fish: + [ -f /usr/share/shonenjump/shonenjump.fish ]; and source /usr/share/shonenjump/shonenjump.fish + + Zsh users will need to add the following to ~/.zshrc: + [[ -f /etc/profile.d/shonenjump.zsh ]] && source /etc/profile.d/shonenjump.zsh +END +}