diff options
author | Taiki Sugawara | 2021-03-20 19:59:02 +0900 |
---|---|---|
committer | Taiki Sugawara | 2021-03-23 23:06:15 +0900 |
commit | de86e27b76cb3e8624e841de9a8d91368c46646f (patch) | |
tree | 769350c8754c2cb7e025964eb4e47aca0b92fdc1 | |
download | aur-de86e27b76cb3e8624e841de9a8d91368c46646f.tar.gz |
first commit
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 36 | ||||
-rw-r--r-- | rl_custom_function-git.install | 16 |
4 files changed, 74 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..736ea1c8dd11 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = rl_custom_function-git + pkgdesc = Enable to inject custom functions into any readline applications + pkgver = r22.28f437d + pkgrel = 1 + url = https://github.com/lincheney/rl_custom_function + install = rl_custom_function-git.install + arch = i686 + arch = x86_64 + license = GPL3 + makedepends = rust + makedepends = cargo + depends = readline + provides = rl_custom_function + source = rl_custom_function::git+https://github.com/lincheney/rl_custom_function.git + sha256sums = SKIP + +pkgname = rl_custom_function-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..2f7f63f5ba8d --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +pkg/ +*.pkg.tar.* +rl_custom_function/ +src/ diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..2ec7d11484d5 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,36 @@ +# Maintainer: Taiki Sugawara <buzz.taiki@gmail.com> +pkgname=rl_custom_function-git +_pkgname=${pkgname%-git} +pkgver=r22.28f437d +pkgrel=1 +pkgdesc="Enable to inject custom functions into any readline applications" +arch=('i686' 'x86_64') +url="https://github.com/lincheney/rl_custom_function" +license=('GPL3') +depends=('readline') +makedepends=('rust' 'cargo') +provides=("$_pkgname") +install=$pkgname.install +source=("$_pkgname::git+https://github.com/lincheney/$_pkgname.git") +sha256sums=('SKIP') + +pkgver() { + cd "$srcdir/$_pkgname" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + cd "$srcdir/$_pkgname" + cargo build --release +} + +check() { + cd "$srcdir/$_pkgname" + cargo test --release +} + +package() { + cd "$srcdir/$_pkgname" + install -D -m755 target/release/librl_custom_function.so $pkgdir/usr/lib/librl_custom_function.so + install -D -m644 README.md $pkgdir/usr/share/doc/$_pkgname/README.md +} diff --git a/rl_custom_function-git.install b/rl_custom_function-git.install new file mode 100644 index 000000000000..26bacb8a7a7c --- /dev/null +++ b/rl_custom_function-git.install @@ -0,0 +1,16 @@ +post_install() { + [ -e /etc/ld.so.preload ] || install -m 644 /dev/null /etc/ld.so.preload + + sed -i -e '/librl_custom_function.so/d' /etc/ld.so.preload + echo '/usr/lib/librl_custom_function.so' >> /etc/ld.so.preload +} + +post_upgrade() { + post_install +} + +post_remove() { + sed -i -e '/librl_custom_function.so/d' /etc/ld.so.preload +} + + |