blob: 54c74736aefb5f79db736d3b662e9e46056ac3e5 (
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
|
# Maintainer: nroi <nroi@mailbox.org>
pkgname=flexo-git
pkgrel=1
pkgver=1.6.9.r7.gc44a7c9
pkgdesc="A central pacman cache"
arch=('x86_64' 'armv6h' 'armv7h' 'aarch64')
url='https://github.com/nroi/flexo'
license=('MIT')
provides=("flexo")
makedepends=('cargo' 'git')
depends=('curl' 'pacman-contrib')
backup=('etc/flexo/flexo.toml')
install="${pkgname%-git}.install"
source=('git+https://github.com/nroi/flexo.git'
'sysuser.conf'
'flexo.install'
'flexo.service'
)
sha256sums=('SKIP'
'b6a618c66d3ffb9ad119b0497d2181cdd382ec870cc768606debed40716c1f4e'
'29ad0efaf1f7fd6d7d2095dd114eda4b1a391a0fda89d45c50ceb96aa3ed61f8'
'd2767b50baab4f441d38a117565382719a77af52ebad206ae206cfc6faa248ed'
)
build() {
cd "${pkgname%-git}/${pkgname%-git}"
# To avoid the warning "Package contains reference to $srcdir"
export CARGO_BUILD_RUSTFLAGS="--remap-path-prefix $HOME=HOME"
cargo build --release
}
pkgver() {
cd "${srcdir}/${pkgname%-git}"
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
package() {
install -Dm644 "${pkgname%-git}/LICENSE" "$pkgdir/usr/share/licenses/${pkgname}/LICENSE"
install -Dm644 "${srcdir}/flexo.service" "${pkgdir}/usr/lib/systemd/system/flexo.service"
install -Dm644 "${srcdir}/sysuser.conf" "${pkgdir}/usr/lib/sysusers.d/flexo.conf"
install -Dm644 "${pkgname%-git}/${pkgname%-git}/conf/flexo.toml" "$pkgdir/etc/flexo/flexo.toml"
install -Dm755 "${pkgname%-git}/${pkgname%-git}/target/release/flexo" "$pkgdir/usr/bin/flexo"
install -Dm755 "${pkgname%-git}/flexo_purge_cache" "$pkgdir/usr/bin/flexo_purge_cache"
}
|