diff options
author | spikecodes | 2020-10-20 17:00:51 -0700 |
---|---|---|
committer | spikecodes | 2020-10-20 17:00:51 -0700 |
commit | d2eccd0f7eb69f999f762238abbe4b38a010cf76 (patch) | |
tree | 028caf46efe396e594ce12f1f825e6c151005555 | |
download | aur-d2eccd0f7eb69f999f762238abbe4b38a010cf76.tar.gz |
Initial Commit
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 31 |
2 files changed, 48 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..f7bf4a4bd308 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = libreddit-git + pkgdesc = Alternative private front-end to Reddit + pkgver = r27.c4b9400 + pkgrel = 1 + url = https://github.com/spikecodes/libreddit + arch = x86_64 + license = AGPL-3.0 + makedepends = git + makedepends = cargo + makedepends = rustup + provides = libreddit + conflicts = libreddit + source = libreddit::git+https://github.com/spikecodes/libreddit + sha256sums = SKIP + +pkgname = libreddit-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..4c8ff0816174 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,31 @@ +# Maintainer: spikecodes <19519553+spikecodes@users.noreply.github.com> +pkgname=libreddit-git +_pkgname=${pkgname%-git} +pkgver=r27.c4b9400 +pkgrel=1 +pkgdesc="Alternative private front-end to Reddit" +arch=('x86_64') +url="https://github.com/spikecodes/libreddit" +license=("AGPL-3.0") +makedepends=("git" "cargo" "rustup") +provides=(${_pkgname}) +conflicts=(${_pkgname}) +source=("${_pkgname}::git+${url}") +sha256sums=("SKIP") + +pkgver() { + cd "${_pkgname}" + ( set -o pipefail + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) +} + +build() { + cd "${_pkgname}" + cargo +nightly build --release --locked --all-features --target-dir=target +} + +package() { + install -Dm644 "${_pkgname}/LICENSE" "$pkgdir/usr/share/licenses/${_pkgname}/LICENSE" + install -Dm755 "${_pkgname}/target/release/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}" +} |