blob: 8f825ba5702a825467cba0928b8cd373aec542ee (
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
|
# Maintainer: Kaiyang Wu <origincode@aosc.io>
pkgname=ciel
_pkgname=${pkgname}-rs
pkgver=3.5.1
pkgrel=1
pkgdesc="A tool for controlling multi-layer file systems and containers."
arch=('i686' 'x86_64')
url="https://github.com/AOSC-Dev/ciel-rs"
license=('MIT')
depends=('systemd' 'dbus' 'openssl' 'libssh2' 'libgit2' 'xz' 'squashfs-tools' 'glibc' 'systemd-libs')
makedepends=('rust' 'make' 'gcc')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/AOSC-Dev/${_pkgname}/archive/v${pkgver}.tar.gz")
sha256sums=('a40b5422baf624af04c5fc559867a2b1542ccb2acf5e4cebc2d7a651614b3852')
conflicts=('ciel-git')
prepare() {
cd ${_pkgname}-${pkgver}
export RUSTUP_TOOLCHAIN=stable
cargo update
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd ${_pkgname}-${pkgver}
export LIBSSH2_SYS_USE_PKG_CONFIG=1
CFLAGS+=' -ffat-lto-objects'
cargo build --release --frozen --all-features --target-dir=target
}
check() {
cd ${_pkgname}-${pkgver}
export RUSTUP_TOOLCHAIN=stable
cargo test --frozen --all-features
}
package() {
cd ${_pkgname}-${pkgver}
install -Dm755 target/release/${_pkgname} -t "${pkgdir}/usr/bin"
# Rename the binary
mv -v "${pkgdir}/usr/bin/ciel-rs" "${pkgdir}/usr/bin/ciel"
# Install assets
PREFIX="${pkgdir}/usr/" ./install-assets.sh
# Install the license
install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}
|