83 lines
2.3 KiB
RPMSpec
83 lines
2.3 KiB
RPMSpec
Name: akkoma
|
|
Version: 3.5.0
|
|
Release: 1
|
|
Summary: Akkoma Social Media
|
|
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
|
|
getent passwd USERNAME >/dev/null || \
|
|
useradd -r -g akkoma -d /usr/lib/akkoma -s /sbin/nologin \
|
|
-c "User that runs the akkoma process" akkoma
|
|
exit 0
|
|
|
|
%build
|
|
mix local.hex --force
|
|
mix local.rebar --force
|
|
MIX_ENV=prod mix deps.get --only=prod
|
|
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(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 <hannah@coffee-and-dreams.uk> - 3.5.0
|
|
- Initial build
|
|
|