You are not logged in.
I'm trying to create a source based PKGBUILD for akkoma - based on https://docs.akkoma.dev/stable/installa … _linux_en/ and https://aur.archlinux.org/packages/pleroma. But the latter creates a binary package, while the below PKGBUILD should be used for a source based install.
The main issue seems to be to set the MIX environment variables correctly, otherwise e.g. the .mix-artifacts land in ~/.mix outside of the package.
Does somebody have a clue how to fix it?
pkgname=akkoma
pkgver=3.10.4
pkgrel=4
pkgdesc='Akkoma is a faster-paced fork of Pleroma'
url='https://akkoma.dev/AkkomaGang/akkoma'
license=('AGPL' 'CCPL:cc-by-4.0' 'CCPL:cc-by-sa-4.0')
arch=(any)
makedepends=(cmake rebar git erlang)
depends=(ncurses file libxcrypt-compat elixir)
optdepends=('postgresql: local postgresql database support'
'imagemagick: Pleroma.Upload.Filters.Mogrify, Pleroma.Upload.Filters.Mogrifun support'
'ffmpeg: media preview proxy support for videos'
'perl-image-exiftool: supporting stripping location (GPS) data from uploaded images with Pleroma.Upload.Filters.Exiftool')
backup=('etc/akkoma/config.exs')
install=akkoma.install
source=('akkoma.sysusers'
'akkoma.tmpfiles'
'akkoma.service'
"git+${url}.git#tag=v$pkgver")
sha256sums=('0247ee5cc24049ebc37a00634aad8ed9a44d0f9a399a1373284375f5c861a089'
'ae5bd0e7ee501c4535a52650574a69ca0ba9b60315ec3b7c8a1d98a8246cea6b'
'134a4191292e15b836ee2e34e91103324da85f852c059adb890ed588e5c33f33'
'6f87d35a52ce59cc822cd2bc8db481170e0a0b2d26d1316f00c0ac9d879e620a')
prepare()
{
export MIX_ENV=prod
export MIX_HOME="${pkgname}/.mix"
export MIX_REBAR3="${pkgname}/.mix/rebar3"
export MIX_REBAR="${pkgname}/.mix/rebar"
}
build() {
cd "${pkgname}"
mix local.hex --force
mix local.rebar --force
mix deps.get
mix deps.get --only prod
mix deps.update ssl_verify_fun ecto
}
package() {
cd "$srcdir"
install -Dm 755 akkoma.sysusers "${pkgdir}/usr/lib/sysusers.d/akkoma.conf"
install -Dm 755 akkoma.tmpfiles "${pkgdir}/usr/lib/tmpfiles.d/akkoma.conf"
install -Dm 755 akkoma.service "${pkgdir}/usr/lib/systemd/system/akkoma.service"
install -Dm 644 $srcdir/$pkgname/COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
mkdir -p $pkgdir/opt/akkoma
cd "$pkgname"
# mix install --path $pkgdir/opt/akkoma
cp -r ./* $pkgdir/opt/akkoma
cp -r .* $pkgdir/opt/akkoma
}
Offline
Mix appears to be part of the elixir package ?
If so, it's not part of this package and thus not restricted to $pkgdir / $srcdir .
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
I didn't mean mix it self, but mix within
mix local.hex --force
mix local.rebar --force
mix deps.get
mix deps.get --only prod
mix deps.update ssl_verify_fun ecto
installs things into e.g. ~/.mix
Offline
The only package in repos that depends on elixir is rabbitmq and that doesn't use mix as build system.
It appears you are in uncharted territory . Maybe changing the title to reflect you want to use mix will attract 'people with experience scripting an elixir / mix install .
Best advise I can give is to stick to building in a clean chroot to avoid putting stuff in user home folders.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline