## START: Set by rpmautospec ## (rpmautospec version 0.6.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %ifarch x86_64 %define forgejo_arch amd64 %else %define forgejo_arch %{_arch} %endif Name: forgejo Version: 7.0.3 Release: %{autorelease} Summary: Self-hosted lightweight software forge License: MIT URL: https://forgejo.org/ Source0: https://codeberg.org/%{name}/%{name}/releases/download/v%{version}/%{name}-src-%{version}.tar.gz Source1: https://codeberg.org/%{name}/%{name}/releases/download/v%{version}/%{name}-%{version}-linux-%{forgejo_arch}.xz Source2: sysusers.conf Requires: git Requires: git-lfs BuildRequires: systemd-rpm-macros ExclusiveArch: x86_64 arm64 %description %{summary}. %global debug_package %{nil} # Build-id is too small.. %define _build_id_links none %prep %autosetup -n %{name}-src-%{version} xz -cd %{SOURCE1} > %{name} %build sed -i 's|/usr/local/bin/forgejo|/usr/bin/forgejo|' contrib/systemd/%{name}.service %install cd %{_builddir}/%{name}-src-%{version} install -d %{buildroot}%{_sysconfdir}/%{name} install -d %{buildroot}%{_sharedstatedir}/%{name} install -d %{buildroot}%{_sysusersdir} install -m 0644 %{SOURCE2} %{buildroot}%{_sysusersdir}/forgejo.conf install -d %{buildroot}%{_unitdir} install -p -m 0644 contrib/systemd/%{name}.service %{buildroot}%{_unitdir} install -d %{buildroot}/%{_bindir} install -p -m 0755 %{name} %{buildroot}/%{_bindir} install -d %{buildroot}/%{_docdir}/%{name} install -p -m 0644 README.md %{buildroot}/%{_docdir}/%{name} install -d %{buildroot}/%{_datadir}/licenses/%{name} install -p -m 0644 LICENSE %{buildroot}/%{_datadir}/licenses/%{name} %pre %sysusers_create_compat %{SOURCE2} %post %systemd_post 'forgejo.service' %preun %systemd_preun 'forgejo.service' %postun %systemd_postun_with_restart 'forgejo.service' %files %license LICENSE %doc README.md %{_bindir}/%{name} %attr(770,root,git) %{_sysconfdir}/%{name} %attr(750,git,git) %{_sharedstatedir}/%{name} %{_sysusersdir}/%{name}.conf %{_unitdir}/%{name}.service %changelog ## START: Generated by rpmautospec * Mon Jun 10 2024 Tomi Lähteenmäki - 7.0.3-1 - Upstream release v7.0.3 * Wed May 01 2024 Tomi Lähteenmäki - 1.21.11.1-1 - Upstream release v1.21.11-1 * Fri Mar 01 2024 Tomi Lähteenmäki - 1.21.6.0-1 - Upstream release v1.21.6-0 * Fri Mar 01 2024 Tomi Lähteenmäki - 1.21.5.0-1 - Upstream release v1.21.5-0 ## END: Generated by rpmautospec