2024-10-21 15:53:00 +02:00
|
|
|
# Maintainer: xiretza <aur@xiretza.xyz>
|
|
|
|
_pkgname=factoriauth
|
|
|
|
pkgname=$_pkgname-git
|
2024-10-31 18:39:08 +01:00
|
|
|
pkgver=v1.2.0.r0.g35f706b
|
2024-10-21 15:53:00 +02:00
|
|
|
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:
|