From 5826fce70e1b90a5af2450353ea1fbdfc7a280c5 Mon Sep 17 00:00:00 2001 From: TheK0tYaRa Date: Sat, 7 Mar 2026 21:04:40 +0300 Subject: [PATCH] added initial spec --- pterodactyl-wings.spec | 139 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 139 insertions(+) create mode 100644 pterodactyl-wings.spec diff --git a/pterodactyl-wings.spec b/pterodactyl-wings.spec new file mode 100644 index 0000000..8c77879 --- /dev/null +++ b/pterodactyl-wings.spec @@ -0,0 +1,139 @@ +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 < %buildroot%_sysconfdir/logrotate.d/%name </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 1.12.1-alt1 +- Initial build.