Hi, Chris!
Thank you for the nice work that you do to with winutil, but this thread is not about winutil.
You have mentioned that you switched to Astro to build your website and now I’d like to package it for both Mageia and maybe even the rest of the rpm distro family.
I was wondering if this is a good start:
#Comment out if debug symbols are not needed
%define debug_package %{nil}
Name: astro
Version: 7.2.9
%if 0%{?rhel}
Release: 1.el%{?rhel}
%elif 0%{?fedora}
Release: 1%{?dist}
%elif 0%{?suse_version}
Release: 1.suse%{?suse_version}
%else
Release: %mkrel 1
%endif
Summary:
Group:
License:
Source: %{name}-%{version}.tar.gz
Requires: nodejs
BuildRequires: nodejs
BuildRequires: npm
AutoReqProv: yes
%description
%prep
%setup -q -c -n %{name}
%build
NODE_ENV=production npm prune
npm rebuild
%pre
getent group astro >/dev/null || groupadd -r astro
getent passwd astro >/dev/null || useradd -r -g astro -G astro -d %{_libdir}/astro -m -s /sbin/nologin -c “astro” astro
%install
mkdir -p %{buildroot}%{_libdir}/astro
cp -r ./ %{buildroot}%{_libdir}/astro
mkdir -p %{buildroot}%{_datadir}/astro
%post
systemctl enable %{_libdir}/astro/astro.service
%files
%defattr(644, root, root, 755)
%{_libdir}/astro
%{_datadir}/astro
Any constructive critisism is welcomed.