summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD50
2 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..0e2fad8bb8af
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = paru-git
+ pkgdesc = AUR helper based on yay
+ pkgver = 0.99.0.r0.g36063ec
+ pkgrel = 1
+ url = https://github.com/morganamilo/paru
+ arch = x86_64
+ arch = i686
+ license = GPL3
+ makedepends = cargo
+ depends = git
+ depends = pacman
+ optdepends = asp: downloading repo pkgbuilds
+ provides = paru
+ conflicts = paru
+ backup = etc/paru.conf
+ source = git+https://github.com/morganamilo/paru
+ sha256sums = SKIP
+
+pkgname = paru-git
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..56da7823d30c
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,50 @@
+# Maintainer: Morgan <morganamilo@archlinux.org>
+pkgname=paru-git
+_pkgname=paru
+pkgver=0.99.0.r0.g36063ec
+pkgrel=1
+pkgdesc='AUR helper based on yay'
+url='https://github.com/morganamilo/paru'
+source=("git+https://github.com/morganamilo/paru")
+backup=("etc/paru.conf")
+arch=('x86_64' 'i686')
+license=('GPL3')
+makedepends=('cargo')
+depends=('git' 'pacman')
+optdepends=('asp: downloading repo pkgbuilds')
+conflicts=('paru')
+provides=('paru')
+sha256sums=(SKIP)
+
+build () {
+ cd "$srcdir/$_pkgname"
+
+ if pacman -T pacman-git > /dev/null; then
+ _features+="git,generate,"
+ fi
+
+ if [[ $(rustc -V) == *"nightly"* ]]; then
+ _features+="backtrace,"
+ fi
+
+ PARU_VERSION=$pkgver cargo build --features "${_features:-}" --release
+}
+
+package() {
+ cd "$srcdir/$_pkgname"
+
+ install -Dm755 target/release/paru "${pkgdir}/usr/bin/paru"
+ install -Dm644 paru.conf "${pkgdir}/etc/paru.conf"
+
+ install -Dm644 man/paru.8 "$pkgdir/usr/share/man/man8/paru.8"
+ install -Dm644 man/paru.conf.5 "$pkgdir/usr/share/man/man5/paru.conf.5"
+
+ install -Dm644 completions/bash "${pkgdir}/usr/share/bash-completion/completions/paru.bash"
+ install -Dm644 completions/fish "${pkgdir}/usr/share/fish/completions/paru.fish"
+ install -Dm644 completions/zsh "${pkgdir}/usr/share/zsh/functions/Completion/Linux/_paru"
+}
+
+pkgver() {
+ cd "$srcdir/$_pkgname"
+ git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}