blob: 95ab8ed52e6b8d60cb42ae5af4da179b41ff5e7b (
plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# Maintainer: Jiuyang Liu <liu@jiuyang.me>
_pkgname=nsncd-codyps
pkgname=nsncd-codyps-git
pkgver=v1.4.2.codyps.1.r5.gb01247c
pkgrel=1
pkgdesc='nscd-compatible daemon without caching. (fork with fixes & socket activation)'
arch=('x86_64')
url='https://github.com/codyps/nsncd'
license=('MIT')
conflicts=('nsncd' 'nsncd-git')
makedepends=('git' 'cargo')
depends=(glibc gcc-libs)
source=("$_pkgname::git+$url.git")
b2sums=('SKIP')
pkgver() {
cd "$_pkgname"
git describe --long --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
cd "$_pkgname"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
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 --frozen --release --all-features
}
check() {
cd "$_pkgname"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
#cargo test --frozen --all-features
}
package() {
cd "$_pkgname"
# binary
install -vDm755 -T "target/release/nsncd" "$pkgdir/usr/lib/nsncd"
# license
install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
# systemd
install -vDm644 -T "nsncd.service" "$pkgdir/usr/lib/systemd/system/nsncd.service"
install -vDm644 -T "nsncd.socket" "$pkgdir/usr/lib/systemd/system/nsncd.socket"
}
|