1
1
# Maintainer: taotieren <admin@taotieren.com>
2
2
3
3
pkgname=crm-git
4
- pkgver=0.1.8.r16.g7d4f255
5
- pkgrel=1
4
+ pkgver=0.2.2.r0.gd392e9a
5
+ pkgrel=5
6
6
pkgdesc=" crm (Cargo registry manager)"
7
- arch=(' any ' )
7
+ arch=($CARCH )
8
8
url=" https://github.com/wtklbm/crm"
9
- license=(' MIT' ' Apache-2.0' )
9
+ license=(' MIT AND Apache-2.0' )
10
10
provides=(${pkgname% -git} )
11
11
conflicts=(${pkgname% -git} )
12
12
replaces=()
13
- depends=(' cargo' )
14
- makedepends=(' git' ' rust' )
13
+ depends=(
14
+ gcc-libs
15
+ glibc
16
+ )
17
+ makedepends=(
18
+ git
19
+ cargo
20
+ )
15
21
backup=()
16
- options=(' !strip ' )
22
+ options=(' !lto ' ' !debug ' )
17
23
install=
18
24
source=(" ${pkgname% -git} ::git+${url} .git" )
19
25
sha256sums=(' SKIP' )
@@ -23,25 +29,32 @@ pkgver() {
23
29
git describe --long --tags | sed ' s/v//g;s/\([^-]*-g\)/r\1/;s/-/./g'
24
30
}
25
31
32
+ prepare () {
33
+ git -C " ${srcdir} /${pkgname% -git} " clean -dfx
34
+ }
35
+
26
36
build () {
27
- # build crm
28
37
cd " ${srcdir} /${pkgname% -git} /"
29
- cargo build --release
38
+
39
+ export RUSTUP_TOOLCHAIN=stable
40
+ export CARGO_TARGET_DIR=target
41
+
42
+ cargo build --release --all-features
30
43
}
31
44
32
45
check () {
33
46
cd " ${srcdir} /${pkgname% -git} /"
34
- cargo test --release
47
+
48
+ export RUSTUP_TOOLCHAIN=stable
49
+ cargo test --all-features
35
50
}
36
51
37
52
package () {
38
- # install crm
39
- install -Dm0755 " ${srcdir} /${pkgname% -git} /target/release/${pkgname% -git} " " ${pkgdir} /usr/share/${pkgname% -git} /${pkgname% -git} "
53
+ cd " ${srcdir} /${pkgname% -git} /"
40
54
41
- install -Dm0755 /dev/stdin " ${pkgdir} /usr/bin/${pkgname% -git} " << EOF
42
- #!/bin/env bash
43
- cd /usr/share/${pkgname% -git} /
44
- ./${pkgname% -git} "\$ @"
45
- EOF
55
+ export RUSTUP_TOOLCHAIN=stable
46
56
57
+ cargo install --no-track --all-features --root " $pkgdir /usr/" --path .
58
+ install -Dm0644 " LICENSE-MIT" -t " ${pkgdir} /usr/share/licenses/${pkgname} /"
59
+ install -Dm0644 " LICENSE-Apache-2.0" -t " ${pkgdir} /usr/share/licenses/${pkgname} /"
47
60
}
0 commit comments