small improvements; aur package
This commit is contained in:
parent
79a6049a91
commit
03677e24be
15 changed files with 386 additions and 287 deletions
53
aur/PKGBUILD
Normal file
53
aur/PKGBUILD
Normal file
|
@ -0,0 +1,53 @@
|
|||
# Maintainer: Ricardo Band <email@ricardo.band>
|
||||
|
||||
pkgname=sanic
|
||||
pkgver=0.0.1
|
||||
pkgrel=1
|
||||
pkgdesc="chaos music control inspired by relaxx player"
|
||||
arch=('any')
|
||||
url=https://git.berlin.ccc.de/cccb/sanic
|
||||
license=('custom:MIT')
|
||||
makedepends=('go')
|
||||
source=("$pkgname.service"
|
||||
"$pkgname.sysusers"
|
||||
"$pkgname.tmpfiles"
|
||||
"$url/archive/v$pkgver.tar.gz")
|
||||
sha256sums=("1337deadbeef"
|
||||
"1337deadbeef"
|
||||
"1337deadbeef"
|
||||
"1337deadbeef")
|
||||
|
||||
prepare() {
|
||||
cd "$pkgname-$pkgver"
|
||||
|
||||
mkdir -p build/
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$pkgname-$pkgver"
|
||||
|
||||
export CGO_CPPFLAGS="$CPPFLAGS"
|
||||
export CGO_CFLAGS="$CFLAGS"
|
||||
export CGO_CXXFLAGS="$CXXFLAGS"
|
||||
export CGO_LDFLAGS="$LDFLAGS"
|
||||
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
|
||||
|
||||
go build -o build/ .
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "$pkgname-$pkgver"
|
||||
|
||||
go test ./...
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$pkgname-$pkgver"
|
||||
|
||||
install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
install -Dm755 build/$pkgname "$pkgdir"/usr/bin/$pkgname
|
||||
install -Dm644 "../$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"
|
||||
install -Dm644 "../$pkgname.sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"
|
||||
install -Dm644 "../$pkgname.tmpfiles" "$pkgdir/usr/lib/tmpfiles.d/$pkgname.conf"
|
||||
}
|
||||
|
28
aur/sanic.service
Normal file
28
aur/sanic.service
Normal file
|
@ -0,0 +1,28 @@
|
|||
[Unit]
|
||||
Description=chaos music control
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=sanic
|
||||
Group=sanic
|
||||
ExecStart=/usr/bin/sanic
|
||||
Restart=always
|
||||
# security
|
||||
NoNewPrivileges=true
|
||||
ProtectSystem=strict
|
||||
ProtectHome=yes
|
||||
StateDirectory=sanic
|
||||
StateDirectoryMode=0750
|
||||
ConfigurationDirectory=sanic
|
||||
ConfigurationDirectoryMode=0750
|
||||
PrivateTmp=true
|
||||
ProtectKernelTunables=true
|
||||
ProtectKernelModules=true
|
||||
ProtectKernelLogs=true
|
||||
ProtectControlGroups=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
3
aur/sanic.sysusers
Normal file
3
aur/sanic.sysusers
Normal file
|
@ -0,0 +1,3 @@
|
|||
u sanic - "chaos music control" /run/sanic /usr/bin/nologin
|
||||
g sanic - -
|
||||
|
3
aur/sanic.tmpfiles
Normal file
3
aur/sanic.tmpfiles
Normal file
|
@ -0,0 +1,3 @@
|
|||
d /etc/sanic 0750 sanic sanic
|
||||
d /run/sanic 0750 sanic sanic
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue