6.1-alt1
- Initial build.
This commit is contained in:
parent
d5c0cab1a0
commit
d5170376e6
27
.gear/pages-server.service
Normal file
27
.gear/pages-server.service
Normal file
@ -0,0 +1,27 @@
|
||||
[Unit]
|
||||
Description=The Codeberg Pages Server with custom domain support
|
||||
After=network.target
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/pages-server --config-file /etc/pages-server/config.toml
|
||||
Restart=on-failure
|
||||
AmbientCapabilities=CAP_NET_BIND_SERVICE
|
||||
WorkingDirectory=/var/lib/pages-server
|
||||
|
||||
User=_pages
|
||||
Group=_pages
|
||||
|
||||
ProtectSystem=strict
|
||||
PrivateTmp=true
|
||||
ProtectHome=true
|
||||
PrivateDevices=true
|
||||
ProtectKernelTunables=true
|
||||
NoNewPrivileges=true
|
||||
|
||||
ReadWritePaths=/var/lib/pages-server
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
84
.gear/pages-server.spec
Normal file
84
.gear/pages-server.spec
Normal file
@ -0,0 +1,84 @@
|
||||
%define _unpackaged_files_terminate_build 1
|
||||
%global import_path codeberg.org/Codeberg/pages-server
|
||||
|
||||
%define _pseudouser_user _pages
|
||||
%define _pseudouser_group _pages
|
||||
%define _pseudouser_home %_localstatedir/%name
|
||||
|
||||
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
|
||||
|
||||
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 -tags='sqlite sqlite_unlock_notify netgo' -o %name .
|
||||
popd
|
||||
|
||||
%install
|
||||
export BUILDDIR="$PWD/.build"
|
||||
export IGNORE_SOURCES=1
|
||||
export IMPORT_PATH="%import_path"
|
||||
%golang_install
|
||||
|
||||
mkdir -p %buildroot%_sysconfdir/%name
|
||||
mkdir -p %buildroot%_pseudouser_home
|
||||
|
||||
install -Dm644 %SOURCE1 %buildroot%_unitdir/%name.service
|
||||
install -m644 example_config.toml %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
|
||||
|
||||
%pre
|
||||
groupadd -r -f %_pseudouser_user 2>/dev/null ||:
|
||||
useradd -r -g %_pseudouser_group -M -d %_pseudouser_home -s /dev/null \
|
||||
-c 'Codeberg Pages Server' %_pseudouser_user 2>/dev/null ||:
|
||||
|
||||
%files
|
||||
%_bindir/%name
|
||||
%dir %attr(0770, root, %_pseudouser_group) %_localstatedir/%name
|
||||
%dir %attr(0750, root, %_pseudouser_group) %_sysconfdir/%name
|
||||
%config(noreplace) %attr(640, root, %_pseudouser_group) %_sysconfdir/%name/config.toml
|
||||
%_unitdir/%name.service
|
||||
%doc *.md LICENSE
|
||||
|
||||
%changelog
|
||||
* Wed Nov 27 2024 Konstantin Kozoriz <kozorizki@altlinux.org> 6.1-alt1
|
||||
- Initial build.
|
4
.gear/rules
Normal file
4
.gear/rules
Normal file
@ -0,0 +1,4 @@
|
||||
tar: v@version@:.
|
||||
diff: v@version@:. .
|
||||
spec: .gear/pages-server.spec
|
||||
copy: .gear/*.service
|
15
.gear/tags/cb0911f0c9242dac91b5350960e58c0bbc32a9a7
Normal file
15
.gear/tags/cb0911f0c9242dac91b5350960e58c0bbc32a9a7
Normal 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
1
.gear/tags/list
Normal file
@ -0,0 +1 @@
|
||||
cb0911f0c9242dac91b5350960e58c0bbc32a9a7 v6.1
|
Loading…
x
Reference in New Issue
Block a user