Name: wsf Version: 5.0.214 Release: 1%{?dist} Summary: Whitestar Files Service License: GPL Source0: https://whitestar.io/repo/wsf/5.0.119/5.0.214/wsf.tar.xz BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: make Requires: telnet %description Whitestar Files Service %prep %autosetup -n %{name} %build ESLINT=0 NODE_ENV=production make %install make install-service DESTDIR=%{buildroot} PREFIX=/home/whitestar/wsf %files %doc README.md %attr(0744, whitestar, whitestar) /home/whitestar/wsf/* %attr(0744, whitestar, whitestar) /home/whitestar/wsf/dist/* %attr(0755, whitestar, whitestar) /home/whitestar/wsf/dist/libs/* # Script to be run after package is installed %post # # Create the user: whitestar with password whitestar and admin privileges # password is encrypted below using crypt() command outside this routine # # perl -e 'print crypt("whitestar", "salt"),"\n"' # echo "##" echo "## Creating whitestar userid...and giving it admin authority" echo "##" id -u whitestar || ( echo "Creating new User: whitestar" useradd -m -p saVcBwwVb0fMY whitestar ) usermod -aG wheel whitestar chown -R whitestar /home/whitestar/wsf chown -R whitestar /home/whitestar/wsf/dist # if java 21 folder is not installed, install it if [ ! -d /opt/jdk-21.0.1 ]; then echo "##" echo "## Installing Java 21.0.1" echo "##" cd /tmp wget -c https://cdn.azul.com/zulu/bin/zulu21.30.15-ca-fx-jdk21.0.1-linux_x64.tar.gz tar xzf zulu21.30.15-ca-fx-jdk21.0.1-linux_x64.tar.gz mv zulu21.30.15-ca-fx-jdk21.0.1-linux_x64 /opt/jdk-21.0.1 chown -R whitestar /opt/jdk-21.0.1 restorecon -rv /opt fi if [ ! -e /etc/systemd/system/wsf.service ]; then echo "##" echo "## Creating wsf Service" echo "##" cat > /etc/systemd/system/wsf.service <