blob: 97c2cdaaf33afe92d32174e9cc4c1a57bbd827fc (
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
56
57
|
# Maintainer: tarball <bootctl@gmail.com>
pkgname=letmein
pkgver=7.2.0
pkgrel=1
pkgdesc='Authenticating port knocker'
arch=(i686 x86_64 armv7h aarch64)
url='https://github.com/mbuesch/letmein'
license=(Apache-2.0 MIT)
makedepends=(cargo)
depends=(glibc gcc-libs nftables)
install=$pkgname.install
backup=(etc/letmein.conf etc/letmeind.conf)
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgname-$pkgver.tar.gz")
sha256sums=('c1507e4c978216c7b60f5a467911a8fb3df3f64f02c0d80ba11b660a1929d11b')
build() {
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cd $pkgname-$pkgname-$pkgver
cargo build --release --locked
}
check() {
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
cd $pkgname-$pkgname-$pkgver
cargo test --locked
}
package() {
cd $pkgname-$pkgname-$pkgver
install -Dm755 -t "$pkgdir/usr/bin/" \
target/release/letmein{,d,fwd}
install -Dm644 -t "$pkgdir/usr/share/doc/$pkgname/" \
README.md CONFIGURATION.md nftables.conf
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname/" \
LICENSE-{APACHE,MIT}
install -Dm644 -t "$pkgdir/etc/" letmein/letmein.conf
install -Dm640 -t "$pkgdir/etc/" letmeind/letmeind.conf
local _systemd=(
letmeind/letmeind.{service,socket}
letmeinfwd/letmeinfwd.{service,socket}
)
sed -i 's:/opt/letmein:/usr:g' "${_systemd[@]}"
install -Dm644 -t "$pkgdir/usr/lib/systemd/system" \
"${_systemd[@]}"
}
|