51 lines
1.3 KiB
Bash
51 lines
1.3 KiB
Bash
# Maintainer: xiretza <aur@xiretza.xyz>
|
|
_pkgname=factoriauth
|
|
pkgname=$_pkgname-git
|
|
pkgver=1.0.0.r6.g63487af
|
|
pkgrel=1
|
|
pkgdesc="An unofficial Factorio authentication server"
|
|
arch=(x86_64)
|
|
url="https://git.it-syndikat.org/xiretza/factoriauth"
|
|
license=('AGPL-3.0-or-later')
|
|
groups=()
|
|
depends=("glibc" "gcc-libs")
|
|
makedepends=("git" "cargo")
|
|
provides=("$_pkgname")
|
|
conflicts=("$_pkgname")
|
|
backup=("etc/$_pkgname/config.toml")
|
|
source=(
|
|
"$_pkgname::git+$url"
|
|
"$_pkgname.service"
|
|
)
|
|
sha256sums=('SKIP'
|
|
'06a220daeab399326b68bb094340d6d5970da29321ceb468382952de198855d3')
|
|
|
|
pkgver() {
|
|
cd "$srcdir/$_pkgname"
|
|
|
|
git describe --long --tags --abbrev=7 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
|
|
}
|
|
|
|
prepare() {
|
|
cd "$srcdir/$_pkgname"
|
|
|
|
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
|
|
}
|
|
|
|
build() {
|
|
cd "$srcdir/$_pkgname"
|
|
|
|
# https://github.com/launchbadge/sqlx/issues/3149
|
|
CFLAGS+=" -ffat-lto-objects"
|
|
cargo build --frozen --release --all-features
|
|
}
|
|
|
|
package() {
|
|
cd "$srcdir/$_pkgname"
|
|
|
|
install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$_pkgname"
|
|
install -Dm0644 -T "config.toml.example" "$pkgdir/etc/$_pkgname/config.toml"
|
|
sed -i -e "s#sqlite://sqlite.db#sqlite:///var/lib/$_pkgname/sqlite.db#" "$pkgdir/etc/$_pkgname/config.toml"
|
|
}
|
|
|
|
# vim: set et ts=4:
|