This commit is contained in:
Alex Manning 2021-02-26 11:06:16 +00:00
commit 269e501c57
4 changed files with 144 additions and 0 deletions

1
gitea/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
*.tar.gz

18
gitea/gitea.service Normal file
View file

@ -0,0 +1,18 @@
[Unit]
Description=Gitea git hosting.
[Service]
Execstart=/usr/bin/gitea web
User=git
Group=git
RuntimeDirectory=gitea
StateDirectory=gitea
ConfigurationDirectory=gitea
PIDFile=/run/gitea/gitea.pid
PrivateDevices=yes
[Install]
WantedBy=multi-user.target

63
gitea/gitea.spec Normal file
View file

@ -0,0 +1,63 @@
%global forgeurl https://github.com/go-gitea/gitea
Version: 1.13.2
%forgemeta
Name: gitea
Release: 1%{?dist}
Summary: Gitea
License: MIT
URL: %forgeurl
Source0: %forgesource
Source1: gitea.service
BuildRequires: golang
BuildRequires: nodejs
BuildRequires: npm
BuildRequires: systemd-rpm-macros
BuildRequires: gcc
%description
Gitea
%global debug_package %{nil}
%post
%systemd_post gitea.service
%preun
%systemd_preun gitea.service
%postun
%systemd_postun_with_restart gitea.service
%prep
%autosetup
%build
%global ldflags -X \"code.gitea.io/gitea/modules/setting.CustomPath=/etc/gitea/\" -X \"code.gitea.io/gitea/modules/setting.AppWorkPath=/var/lib/gitea\" -X \"code.gitea.io/gitea/modules/setting.StaticRootPath=/var/lib/gitea/static\" -X \"code.gitea.io/gitea/modules/setting.PIDFile=/run/gitea/gitea.pid\"
TAGS="bindata" LDFLAGS="%{ldflags}" %{__make} build
%install
install -m 0755 -D gitea %{buildroot}%{_bindir}/gitea
install -D %{SOURCE1} %{buildroot}%{_unitdir}/gitea.service
mkdir -p %{buildroot}%{_sysconfdir}/gitea
mkdir -p %{buildroot}%{_libdir}/gitea
mkdir -p %{buildroot}%{_rundir}/gitea
%files
%license LICENSE
%doc README.md
%config(noreplace) %{_sysconfdir}/gitea
%{_rundir}/gitea
%{_libdir}/gitea
/usr/bin/gitea
%{_unitdir}/gitea.service
%changelog
* Wed Feb 24 18:41:47 GMT 2021 Alex Manning <git@alex-m.co.uk>
-

62
gitea/newpackage.spec Normal file
View file

@ -0,0 +1,62 @@
%global forgeurl https://github.com/go-gitea/gitea
Version: 1.13.2
%forgemeta
Name: gitea
Release: 1%{?dist}
Summary: Gitea
License: MIT
URL: %forgeurl
Source0: %forgesource
Source1: gitea.service
BuildRequires: golang
BuildRequires: nodejs
BuildRequires: systemd-rpm-macros
BuildRequires: gcc
%description
Gitea
%global debug_package %{nil}
%post
%systemd_post gitea.service
%preun
%systemd_preun gitea.service
%postun
%systemd_postun_with_restart gitea.service
%prep
%autosetup
%build
%global ldflags -X \"code.gitea.io/gitea/modules/setting.CustomPath=/etc/gitea/\" -X \"code.gitea.io/gitea/modules/setting.AppWorkPath=/var/lib/gitea\" -X \"code.gitea.io/gitea/modules/setting.StaticRootPath=/var/lib/gitea/static\" -X \"code.gitea.io/gitea/modules/setting.PIDFile=/run/gitea/gitea.pid\"
TAGS="bindata" LDFLAGS="%{ldflags}" %{__make} build
%install
install -m 0755 -D gitea %{buildroot}%{_bindir}/gitea
install -D %{SOURCE1} %{buildroot}%{_unitdir}/gitea.service
mkdir -p %{buildroot}%{_sysconfdir}/gitea
mkdir -p %{buildroot}%{_libdir}/gitea
mkdir -p %{buildroot}%{_rundir}/gitea
%files
%license LICENSE
%doc README.md
%config(noreplace) %{_sysconfdir}/gitea
%{_rundir}/gitea
%{_libdir}/gitea
/usr/bin/gitea
%{_unitdir}/gitea.service
%changelog
* Wed Feb 24 18:41:47 GMT 2021 Alex Manning <git@alex-m.co.uk>
-