Add spec file

This commit is contained in:
FloatingGhost 2022-12-17 23:45:09 +00:00
commit 0bb81239e0
2 changed files with 80 additions and 0 deletions

32
.woodpecker.yml Normal file
View file

@ -0,0 +1,32 @@
pipeline:
build:
when:
event:
- push
image: fedora:37
commands:
- rpmdev-setuptree
- dnf install -y git gcc g++ make cmake file-devel elixir erlang-os_mon erlang-eldap erlang-xmerl erlang-erl_interface erlang-syntax_tools openssl-devel
- rpmbuild -ba akkoma.spec
- mv /root/rpmbuild/RPMS/x86_64/akkoma-* .
release:
when:
event:
- push
branch:
- develop
- stable
image: node:16
secrets:
- SCW_ACCESS_KEY
- SCW_SECRET_KEY
- SCW_DEFAULT_ORGANIZATION_ID
commands:
- apt-get update && apt-get install -y rclone wget zip
- wget https://github.com/scaleway/scaleway-cli/releases/download/v2.5.1/scaleway-cli_2.5.1_linux_amd64
- mv scaleway-cli_2.5.1_linux_amd64 scaleway-cli
- chmod +x scaleway-cli
- ./scaleway-cli object config install type=rclone
- zip admin-fe.zip -r dist
- rclone copyto admin-fe.zip scaleway:akkoma-updates/frontend/$CI_COMMIT_BRANCH/admin-fe.zip

48
akkoma.spec Normal file
View file

@ -0,0 +1,48 @@
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
%description
Magically expressive social media
%global debug_package %{nil}
%prep
%setup -n akkoma
%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/
cp -r release/* %{buildroot}/usr/lib/akkoma/
%files
%defattr(777,akkoma,akkoma,777)
%dir /usr/lib/akkoma/
/usr/lib/akkoma/
%config(noreplace) /usr/lib/akkoma/releases/COOKIE
%changelog
* Fri Dec 16 2022 FloatingGhost <hannah@coffee-and-dreams.uk> - 3.5.0
- Initial build