- Initial build.
This commit is contained in:
kozorizki 2024-11-26 11:29:18 +03:00
parent d5c0cab1a0
commit 21fc3d2d67
5 changed files with 112 additions and 0 deletions

View File

@ -0,0 +1,15 @@
[Unit]
Description=The Codeberg Pages Server with custom domain support
After=network.target
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=pages-server
Group=pages-server
ExecStart=/usr/bin/pages-server --config-file /etc/pages-server/config.toml
Restart=always
[Install]
WantedBy=default.target

75
.gear/pages-server.spec Normal file
View File

@ -0,0 +1,75 @@
%define _unpackaged_files_terminate_build 1
%global import_path codeberg.org/Codeberg/pages-server
Name: pages-server
Version: 6.1
Release: alt1
Summary: The Codeberg Pages Server with custom domain support
License: EUPL-1.2
Group: Other
Url: https://codeberg.page
Vcs: https://codeberg.org/Codeberg/pages-server.git
Source0: %name-%version.tar
Source1: %name.service
Source2: example_config.toml
Patch: %name-%version-%release.patch
ExclusiveArch: %go_arches
BuildRequires(pre): rpm-macros-golang
BuildRequires: rpm-build-golang golang >= 1.22
%description
Codeberg Pages allows you to easily publish static websites with a
human-friendly address ({username}.codeberg.page) via Git on Codeberg.
%prep
%setup
%patch -p1
%build
export BUILDDIR="$PWD/.build"
export IMPORT_PATH="%import_path"
export GOPATH="$BUILDDIR:%go_path"
%golang_prepare
pushd $BUILDDIR/src/%import_path
%gobuild -o %name .
popd
%install
export BUILDDIR="$PWD/.build"
export IGNORE_SOURCES=1
export IMPORT_PATH="%import_path"
%golang_install
mkdir -p %buildroot%_sysconfdir/%name
install -Dm644 %SOURCE1 %buildroot%_unitdir/%name.service
install -m644 %SOURCE2 %buildroot%_sysconfdir/%name/config.toml
mkdir -p %buildroot%_bindir/
cd .build/src/%import_path
install -p -m755 %name %buildroot%_bindir/%name
%post
%post_systemd_postponed %name.service
%preun
%preun_systemd %name.service
%files
%_bindir/%name
%config(noreplace) %_sysconfdir/%name/config.toml
%_unitdir/%name.service
%doc *.md LICENSE
%changelog
* Wed Nov 27 2024 Konstantin Kozoriz <kozorizki@basealt.ru> 6.1-alt1
- Initial build.

6
.gear/rules Normal file
View File

@ -0,0 +1,6 @@
tar: v@version@:.
diff: v@version@:. .
spec: .gear/pages-server.spec
copy: .gear/*.service
copy: example_config.toml

View File

@ -0,0 +1,15 @@
object 85059aa46ef0b04c76646c8a56a7860f5007f58a
type commit
tag v6.1
tagger crapStone <me@crapstone.dev> 1732232136 +0100
v6.1
Improved caching of pages.
-----BEGIN PGP SIGNATURE-----
iIcEABYKAC8WIQQQHBKbauF/62FpPBsi1L8M98wpyAUCZz/D2BEcbWVAY3JhcHN0
b25lLmRldgAKCRAi1L8M98wpyA2OAP9qpnXNoO0CE72X3mpR7wpRXr8n3EL/K4Xi
rC9fbTq91AEA2+RAeX/t07EdlmvoLjg8AI4/e2eYoPNLAN4z83XfzwI=
=xZxd
-----END PGP SIGNATURE-----

1
.gear/tags/list Normal file
View File

@ -0,0 +1 @@
cb0911f0c9242dac91b5350960e58c0bbc32a9a7 v6.1