diff options
author | Nebulosa | 2024-02-23 13:18:44 +0300 |
---|---|---|
committer | Nebulosa | 2024-02-23 13:18:44 +0300 |
commit | dcabeb365fc3a71c5e8df08e4c47af60866bb475 (patch) | |
tree | 4fdd43cd93b50141cd1b8129185f645c0964a265 | |
download | aur-dcabeb365fc3a71c5e8df08e4c47af60866bb475.tar.gz |
Init commit
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | PKGBUILD | 48 |
2 files changed, 64 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..1ac168b40f3e --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = scu-git + pkgdesc = System fetch utility is aimed at informativeness + pkgver = 1.4.0.r7.ga29c401 + pkgrel = 1 + url = https://gitlab.com/omnitix/scu + arch = i686 + arch = x86_64 + license = GPL-3.0-or-later + makedepends = git + makedepends = rust + options = !debug + options = !lto + source = scu::git+https://gitlab.com/omnitix/scu.git + b2sums = SKIP + +pkgname = scu-git diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..fed7809c2507 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,48 @@ +# Maintainer: Nebulosa <nebulosa2007-at-yandex-dot-ru> + +## The following variable can be customized at build time. +## Use env or export to change at your wish +## +## Example: env _sccache=y makepkg -sc +## +## Default is: None => not use sccache +## +## More info: https://github.com/mozilla/sccache +: ${_sccache:=} + +pkgname=scu-git +pkgver=1.4.0.r7.ga29c401 +pkgrel=1 +pkgdesc="System fetch utility is aimed at informativeness" +arch=(i686 x86_64) +url="https://gitlab.com/omnitix/${pkgname%-git}" +license=(GPL-3.0-or-later) +makedepends=(git rust) +[[ -n ${_sccache} ]] && makedepends+=(sccache) +options=(!debug !lto) +source=(${pkgname%-git}::git+$url.git) +b2sums=('SKIP') + +pkgver() { + git -C ${pkgname%-git} describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//' +} + +prepare() { + cd ${pkgname%-git} + export CARGO_HOME=${srcdir}/${pkgname%-git}/.cargo # Download all to src directory, not in ~/.cargo + cargo fetch --target "$(rustc -vV | sed -n 's/host: //p')" +} + +build() { + cd ${pkgname%-git} + [[ -n ${_sccache} ]] && export RUSTC_WRAPPER=sccache # If $_sccache not empty, build using binary cache + export RUSTFLAGS="--remap-path-prefix=${srcdir}=/" # Prevent warning: 'Package contains reference to $srcdir' + export CARGO_HOME=${srcdir}/${pkgname%-git}/.cargo # Use downloaded earlier from src directory, not from ~/.cargo + export CARGO_TARGET_DIR=target # Place the output in target relative to the current directory + cargo build --release +} + +package() { + cd ${pkgname%-git} + install -Dm755 target/release/${pkgname%-git} -t ${pkgdir}/usr/bin/ +} |