e216f89d3a
Signed-off-by: Jason Rothstein <fdragon@fdragon.org>
121 lines
3.0 KiB
RPMSpec
121 lines
3.0 KiB
RPMSpec
ExclusiveArch: %{go_arches}
|
|
%{!?_sysusersdir: %global _sysusersdir %{_prefix}/lib/sysusers.d}
|
|
%if 0%{?el8} || 0%{?el9} || 0%{?el10} || 0%{?fc42} || 0%{?fc43} || 0%{?fc44}
|
|
%global debug_package %{nil}
|
|
%endif
|
|
|
|
Name: gitea
|
|
Version: 1.26.4
|
|
Release: 1%{?dist}
|
|
Summary: Gitea: Git with a cup of tea
|
|
|
|
License: MIT
|
|
URL: https://gitea.io/en-us/
|
|
Source0: https://github.com/go-gitea/gitea/releases/download/v%{version}/gitea-src-%{version}.tar.gz
|
|
Source1: gitea.sysusers
|
|
|
|
BuildRequires: git
|
|
BuildRequires: golang >= 1.26.2
|
|
BuildRequires: pam-devel
|
|
BuildRequires: systemd-rpm-macros
|
|
BuildRequires: make
|
|
%{?systemd_requires}
|
|
%{?sysusers_requires_compat}
|
|
Requires: git
|
|
|
|
%description
|
|
Gitea is a painless self-hosted Git service. It is similar to GitHub, Bitbucket,
|
|
and GitLab. Gitea is a lightweight code hosting solution written in Go and
|
|
published under the MIT license.
|
|
|
|
|
|
%prep
|
|
%autosetup -p1 -n %{name}-src-%{version}
|
|
|
|
%build
|
|
sed -i -e 's/-s -w //g' Makefile
|
|
|
|
LDFLAGS=""
|
|
export LDFLAGS
|
|
|
|
%make_build \
|
|
TAGS="bindata pam sqlite sqlite_unlock_notify" \
|
|
GITEA_VERSION="%{version}-%{release}" \
|
|
build
|
|
|
|
sed -i \
|
|
-e 's|^User=.*$|User=gitea|g' \
|
|
-e 's|^Group=.*$|Group=gitea|g' \
|
|
-e 's|^WorkingDirectory=.*$|WorkingDirectory=%{_sharedstatedir}/gitea|g' \
|
|
-e 's|^ExecStart=.*$|ExecStart=%{_bindir}/gitea web %{_sysconfdir}/gitea/app.ini|g' \
|
|
-e 's|^Environment=.*$|Environment=USER=gitea HOME=%{_sharedstatedir}/gitea GITEA_WORK_DIR=%{_sharedstatedir}/gitea|g' \
|
|
contrib/systemd/gitea.service
|
|
|
|
|
|
%install
|
|
install -d %{buildroot}%{_bindir}
|
|
install -d %{buildroot}%{_sysconfdir}/gitea
|
|
install -d %{buildroot}%{_unitdir}
|
|
install -d %{buildroot}%{_sharedstatedir}/gitea
|
|
install -d %{buildroot}%{_localstatedir}/log/gitea
|
|
install -p -m 0755 %{name} %{buildroot}%{_bindir}/%{name}
|
|
install -p -m 0644 contrib/systemd/gitea.service %{buildroot}%{_unitdir}/gitea.service
|
|
install -D -p -m 0644 %{SOURCE1} %{buildroot}%{_sysusersdir}/gitea.conf
|
|
|
|
|
|
%pre
|
|
%sysusers_create_compat %{SOURCE1}
|
|
|
|
|
|
%post
|
|
%systemd_post gitea.service
|
|
|
|
%preun
|
|
%systemd_preun gitea.service
|
|
|
|
%postun
|
|
%systemd_postun_with_restart gitea.service
|
|
|
|
%files
|
|
%license LICENSE
|
|
%doc CHANGELOG.md
|
|
%doc CODE_OF_CONDUCT.md
|
|
%doc CONTRIBUTING.md
|
|
%doc DCO
|
|
%doc MAINTAINERS
|
|
%doc README.md
|
|
%doc SECURITY.md
|
|
%attr(0750, gitea, gitea) %dir %{_sharedstatedir}/gitea
|
|
%attr(0750, gitea, gitea) %dir %{_localstatedir}/log/gitea
|
|
%{_bindir}/%{name}
|
|
%{_unitdir}/gitea.service
|
|
%attr(0750, gitea, gitea) %dir %{_sysconfdir}/gitea
|
|
%{_sysusersdir}/gitea.conf
|
|
|
|
|
|
%changelog
|
|
* Sat Jun 27 2026 Jason Rothstein
|
|
- 1.26.4
|
|
|
|
* Fri Jun 26 2026 Jason Rothstein
|
|
- 1.26.3
|
|
|
|
* Fri May 22 2026 Jason Rothstein
|
|
- 1.26.2
|
|
|
|
* Sun May 10 2026 Jason Rothstein
|
|
- More best practice applied
|
|
|
|
* Sat May 09 2026 Jason Rothstein
|
|
- Move to macros to manage services and users
|
|
|
|
* Tue Apr 28 2026 Jason Rothstein
|
|
- Drop EL8
|
|
|
|
* Sat Apr 25 2026 Jason Rothstein
|
|
- version bump to 1.26.1
|
|
|
|
* Mon Apr 20 2026 Jason Rothstein
|
|
- version bump to 1.26.0
|
|
- golang >= 1.26.2
|