139 lines
3.6 KiB
RPMSpec
139 lines
3.6 KiB
RPMSpec
Name: pterodactyl-wings
|
|
Version: 1.12.1
|
|
Release: alt1
|
|
Summary: Server control plane for Pterodactyl Panel
|
|
License: MIT
|
|
Group: System/Servers
|
|
URL: https://github.com/pterodactyl/wings
|
|
VCS: https://github.com/pterodactyl/wings
|
|
|
|
Source: %name-%version.tar
|
|
# Pre-generated vendor tarball containing vendor/
|
|
Source1: %name-development-%version.tar
|
|
|
|
ExclusiveArch: %go_arches
|
|
|
|
BuildRequires(pre): rpm-macros-golang
|
|
BuildRequires(pre): rpm-macros-systemd
|
|
BuildRequires: golang >= 1.24.1
|
|
BuildRequires: rpm-build-golang
|
|
|
|
Requires(pre): /usr/sbin/groupadd
|
|
Requires(pre): /usr/sbin/useradd
|
|
|
|
%description
|
|
Wings is the server control plane used by Pterodactyl Panel.
|
|
|
|
This package installs the Wings daemon, a systemd unit, default state/log
|
|
directories, and logrotate configuration.
|
|
|
|
The main configuration file is not shipped by this package; it must be generated
|
|
from the Pterodactyl Panel and placed at:
|
|
|
|
/etc/pterodactyl/config.yml
|
|
|
|
%prep
|
|
%setup -q -a1
|
|
|
|
%build
|
|
export GOROOT="%_libexecdir/golang"
|
|
export GO111MODULE=on
|
|
export CGO_ENABLED=0
|
|
export GOPROXY=off
|
|
export GOSUMDB=off
|
|
export GOFLAGS="-mod=vendor -trimpath -buildvcs=false"
|
|
|
|
%gobuild \
|
|
-ldflags "-s -w -X github.com/pterodactyl/wings/system.Version=%version" \
|
|
-o wings ./wings.go
|
|
|
|
%install
|
|
install -Dpm0755 wings %buildroot%_bindir/%name
|
|
|
|
install -d %buildroot%_sysconfdir/pterodactyl
|
|
install -d %buildroot%_unitdir
|
|
install -d %buildroot%_sysconfdir/logrotate.d
|
|
|
|
install -d %buildroot%_sharedstatedir/pterodactyl
|
|
install -d %buildroot%_sharedstatedir/pterodactyl/volumes
|
|
install -d %buildroot%_sharedstatedir/pterodactyl/archives
|
|
install -d %buildroot%_sharedstatedir/pterodactyl/backups
|
|
install -d %buildroot%_localstatedir/log/pterodactyl
|
|
|
|
cat > %buildroot%_unitdir/%name.service <<EOF
|
|
[Unit]
|
|
Description=Pterodactyl Wings Daemon
|
|
After=network-online.target docker.service
|
|
Wants=network-online.target
|
|
Requires=docker.service
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=root
|
|
WorkingDirectory=%_sysconfdir/pterodactyl
|
|
ExecStart=%_bindir/%name --config %_sysconfdir/pterodactyl/config.yml
|
|
Restart=on-failure
|
|
RestartSec=5s
|
|
StartLimitIntervalSec=180
|
|
StartLimitBurst=30
|
|
LimitNOFILE=4096
|
|
RuntimeDirectory=wings
|
|
RuntimeDirectoryMode=0755
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|
|
EOF
|
|
|
|
cat > %buildroot%_sysconfdir/logrotate.d/%name <<EOF
|
|
/var/log/pterodactyl/wings.log {
|
|
size 10M
|
|
compress
|
|
delaycompress
|
|
dateext
|
|
maxage 7
|
|
missingok
|
|
notifempty
|
|
postrotate
|
|
/usr/bin/systemctl kill -s HUP wings.service >/dev/null 2>&1 || true
|
|
endscript
|
|
}
|
|
EOF
|
|
|
|
%pre
|
|
getent group pterodactyl >/dev/null || \
|
|
/usr/sbin/groupadd -r pterodactyl >/dev/null 2>&1 || :
|
|
getent passwd pterodactyl >/dev/null || \
|
|
/usr/sbin/useradd -r -g pterodactyl \
|
|
-d %_sharedstatedir/pterodactyl \
|
|
-s /bin/false \
|
|
-c "Pterodactyl service user" \
|
|
pterodactyl >/dev/null 2>&1 || :
|
|
exit 0
|
|
|
|
%post
|
|
%systemd_post %name.service
|
|
|
|
%preun
|
|
%systemd_preun %name.service
|
|
|
|
%postun
|
|
%systemd_postun %name.service
|
|
|
|
%files
|
|
%doc README.md CHANGELOG.md LICENSE
|
|
|
|
%_bindir/%name
|
|
%_unitdir/%name.service
|
|
%config(noreplace) %_sysconfdir/logrotate.d/%name
|
|
|
|
%dir %attr(0755,root,root) %_sysconfdir/pterodactyl
|
|
|
|
%dir %attr(0700,pterodactyl,pterodactyl) %_sharedstatedir/pterodactyl
|
|
%dir %attr(0700,pterodactyl,pterodactyl) %_sharedstatedir/pterodactyl/volumes
|
|
%dir %attr(0700,pterodactyl,pterodactyl) %_sharedstatedir/pterodactyl/archives
|
|
%dir %attr(0700,pterodactyl,pterodactyl) %_sharedstatedir/pterodactyl/backups
|
|
%dir %attr(0750,pterodactyl,pterodactyl) %_localstatedir/log/pterodactyl
|
|
|
|
%changelog
|
|
* Sat Mar 07 2026 Arseniy Romenskiy <romenskiy2012@altlinux.org> 1.12.1-alt1
|
|
- Initial build.
|