blob: 013faa4f7e4a9c4adf67915da4822a129e747fb9 (
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
|
# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net>
pkgname=static-web-server
pkgver=2.33.1
pkgrel=1
pkgdesc="A cross-platform, high-performance and asynchronous web server for static files-serving"
arch=('i686' 'x86_64')
url="https://static-web-server.net/"
license=('Apache-2.0' 'MIT')
depends=('gcc-libs' 'zlib')
makedepends=('cargo')
backup=('etc/default/static-web-server')
options=('!lto')
source=("$pkgname-$pkgver-src.tar.gz::https://github.com/static-web-server/static-web-server/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('f23865f4245070f7ec3a549c0dc527f2d73ef23f6fc518f3b568772eaa021b6c')
prepare() {
cd "$pkgname-$pkgver"
if [ ! -f "Cargo.lock" ]; then
cargo update
fi
cargo fetch
}
check() {
cd "$pkgname-$pkgver"
#cargo test \
# --frozen
}
package() {
cd "$pkgname-$pkgver"
cargo install \
--locked \
--no-track \
--root "$pkgdir/usr" \
--path .
install -Dm644 "systemd/etc_default_static-web-server" "$pkgdir/etc/default/static-web-server"
install -Dm644 systemd/static-web-server.{service,socket} -t "$pkgdir/usr/lib/systemd/system"
"$pkgdir/usr/bin/static-web-server" generate "$srcdir"
install -Dm644 "$srcdir/completions/static-web-server.bash" "$pkgdir/usr/share/bash-completion/completions/static-web-server"
install -Dm644 "$srcdir/completions/static-web-server.elv" -t "$pkgdir/usr/share/elvish/lib"
install -Dm644 "$srcdir/completions/static-web-server.fish" -t "$pkgdir/usr/share/fish/vendor_completions.d"
install -Dm644 "$srcdir/completions/_static-web-server" -t "$pkgdir/usr/share/zsh/site-functions"
install -Dm644 "$srcdir/man"/static-web-server{,-generate}.1 -t "$pkgdir/usr/share/man/man1"
install -Dm644 "LICENSE-MIT" -t "$pkgdir/usr/share/licenses/static-web-server"
}
|