# https://docs.fedoraproject.org/en-US/quick-docs/publish-rpm-on-copr # http://ftp.rpm.org/max-rpm/s1-rpm-inside-scripts.html # https://rpm-software-management.github.io/rpm/manual/macros.html # https://rpm-packaging-guide.github.io/ %global _owner pgnd %global _build_timestamp %( date +%%Y%%m%%d_%%H%%M%%S --utc ) %global _dist .%{_build_timestamp}.%{_owner}.fc%{fedora} %define _ngx_name nginx %define _ngx_ug_name %{_ngx_name}-sysusers %define _ngx_ug_pkgname %{_ngx_ug_name} %define _ngx_ug_comment Nginx users & groups # https://spdx.org/licenses/MIT.html %global _ngx_ug_license MIT %define _ngx_ug_file_in %{_ngx_name}.sysusers %define _ngx_ug_file_out %{_ngx_name}.conf %define _ngx_ug_dir /etc/sysusers.d %global dist %{_dist} # NEVRA (n-e:v-r.a) Name: %{_ngx_ug_name} Epoch: 0 Version: git_1.0 Release: 0%{?dist} BuildArch: noarch Summary: %{_ngx_ug_comment} License: %{_ngx_ug_license} Source0: %{_ngx_ug_file_in} Provides: group(%{_ngx_name}) Provides: user(%{_ngx_name}) BuildRequires: coreutils BuildRequires: systemd-rpm-macros %{?sysusers_requires_compat} %description %{_ngx_ug_comment} %prep cp %{SOURCE0} . %build %install mkdir -p %{buildroot}%{_ngx_ug_dir} install -p -T -m 644 %{SOURCE0} %{buildroot}%{_ngx_ug_dir}/%{_ngx_ug_file_out} %check %pre %sysusers_create_compat %{SOURCE0} %files %dir %{_ngx_ug_dir} %{_ngx_ug_dir}/%{_ngx_ug_file_out} %changelog * Wed Oct 30 2024 pgnd _ - bump 1730332866