summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO15
-rw-r--r--.gitignore14
-rw-r--r--PKGBUILD46
3 files changed, 75 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..1b5f7641b23c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = redlib-git
+ pkgdesc = Private front-end for Reddit
+ pkgver = v0.29.4.r207.2291095
+ pkgrel = 1
+ url = https://github.com/redlib-org/redlib
+ arch = x86_64
+ license = AGPL-3.0
+ makedepends = cargo
+ makedepends = git
+ options = !lto
+ backup = etc/redlib.conf
+ source = redlib-git::git+https://github.com/redlib-org/redlib
+ sha256sums = SKIP
+
+pkgname = redlib-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..45cb98360bf2
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,14 @@
+# ---> ArchLinuxPackages
+*.tar
+*.tar.*
+*.jar
+*.exe
+*.msi
+*.zip
+*.tgz
+*.log
+*.log.*
+*.sig
+
+pkg/
+src/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..29ed5ce39eb9
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: fossdd <fossdd@pwned.life>
+
+pkgname=redlib-git
+_pkgname=${pkgname%-git}
+pkgver=v0.29.4.r207.2291095
+pkgrel=1
+pkgdesc="Private front-end for Reddit"
+url='https://github.com/redlib-org/redlib'
+license=(AGPL-3.0)
+arch=(x86_64)
+depends=()
+makedepends=(cargo git)
+backup=("etc/$_pkgname.conf")
+options=('!lto')
+source=("$pkgname::git+$url")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/$pkgname"
+ # Git, tags available
+ printf "%s" "$(git describe --long | sed 's/\([^-]*-\)g/r\1/;s/-/./g')"
+ # Git, no tags available
+ # printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd $pkgname
+ export RUSTUP_TOOLCHAIN=stable
+ cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
+}
+
+build() {
+ cd $pkgname
+ export RUSTUP_TOOLCHAIN=stable
+ export CARGO_TARGET_DIR=target
+ cargo build --release --all-features
+}
+
+package() {
+ cd "$pkgname"
+ install -Dm755 "target/release/$_pkgname" -t "$pkgdir/usr/bin/"
+ install -Dm644 'LICENSE' -t "$pkgdir/usr/share/licenses/$pkgname/"
+ install -Dm644 'README.md' -t "$pkgdir/usr/share/doc/$pkgname/"
+ install -Dm644 "contrib/$_pkgname.service" -t "$pkgdir/usr/lib/systemd/system/"
+ install -Dm644 "contrib/$_pkgname.conf" -t "$pkgdir/etc/"
+}