archpackaging

PKGBUILDs
git clone https://git.awy.one/archpackaging
Log | Files | Refs

PKGBUILD (766B) - View raw


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Maintainer: awy <awy@awy.one>

_pkgname=librepods
pkgname=$_pkgname-rust-git
pkgver=r515.6f0323e
pkgrel=1
pkgdesc="Rust implementation of librepods"
arch=('any')
url="https://github.com/kavishdevar/librepods"
license=('GPL3')
depends=('dbus')
makedepends=('cargo' 'git')
source=("git+https://github.com/kavishdevar/librepods.git#branch=linux/rust")
sha256sums=('SKIP')
conflicts=('librepods' 'librepods-git')

pkgver() {
    cd $srcdir/$_pkgname
    git_ver=$(printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)")
    echo "$git_ver"
}

build() {
    cd "$srcdir/$_pkgname/linux-rust"
    cargo build --release
}

package() {
    cd "$srcdir/$_pkgname/linux-rust"
    install -Dm755 target/release/librepods "$pkgdir/usr/bin/librepods"
}