diff --git a/akkoma.spec b/akkoma.spec index 00501d6..65636f3 100644 --- a/akkoma.spec +++ b/akkoma.spec @@ -6,17 +6,26 @@ License: AGPL-3 URL: https://akkoma.dev %undefine _disable_source_fetch Source0: https://akkoma.dev/AkkomaGang/akkoma/archive/v%{version}.tar.gz + BuildRequires: git gcc g++ make cmake file-devel elixir erlang-os_mon erlang-eldap erlang-xmerl erlang-erl_interface erlang-syntax_tools openssl-devel erlang-crypto Requires: postgresql-server postgresql-contrib file Requires(pre): shadow-utils +Suggests: caddy varnish %description Magically expressive social media %global debug_package %{nil} +%global _build_id_links none %prep %setup -n akkoma +rm -rf installation/init.d +rm -rf installation/freebsd +rm -rf installation/openbsd +rm -rf installation/netbsd +rm -rf installation/akkoma.supervisord +rm -rf rel/files/installation/init.d/ %pre getent group akkoma >/dev/null || groupadd -r akkoma @@ -34,14 +43,39 @@ MIX_ENV=prod mix release --path=release %install mkdir -p %{buildroot}/usr/lib/akkoma/ mkdir -p %{buildroot}/usr/lib/akkoma/ +mkdir -p %{buildroot}/usr/local/share/akkoma/ +mkdir -p %{buildroot}/var/lib/akkoma/static/ +mkdir -p %{buildroot}/var/lib/akkoma/uploads/ +install -m 755 installation/akkoma.vcl %{buildroot}/usr/local/share/akkoma/akkoma.vcl +mkdir -p %{buildroot}/etc/systemd/system/ +install -m 755 installation/akkoma.service %{buildroot}/etc/systemd/system/akkoma.service cp -r release/* %{buildroot}/usr/lib/akkoma/ +mkdir -p %{buildroot}/etc/akkoma/ %files -%defattr(777,akkoma,akkoma,777) -%dir /usr/lib/akkoma/ -/usr/lib/akkoma/ +%defattr(760,akkoma,akkoma,777) +# src +/usr/lib/akkoma/bin/ +/usr/lib/akkoma/erts-13.1.2/ +/usr/lib/akkoma/releases/%{version} +%defattr(600,akkoma,akkoma,777) +/usr/lib/akkoma/installation/ +/usr/lib/akkoma/lib/ +/usr/lib/akkoma/releases/start_erl.data +/usr/lib/akkoma/OTP_VERSION +/etc/akkoma/ +/var/lib/akkoma/ %config(noreplace) /usr/lib/akkoma/releases/COOKIE +%defattr(600,root,root,777) +# helpy stuff +/usr/local/share/akkoma/akkoma.vcl +/etc/systemd/system/akkoma.service + +%post +ln -sf /usr/lib/akkoma/bin/pleroma %{_bindir}/pleroma +ln -sf /usr/lib/akkoma/bin/pleroma_ctl %{_bindir}/pleroma_ctl + %changelog * Fri Dec 16 2022 FloatingGhost - 3.5.0 - Initial build