#!/usr/bin/bash # Setup rpmbuild directory structure mkdir -p /root/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} # Install Node.js for building dnf module enable nodejs:20 -y dnf install nodejs npm -y # Download source files using spectool spectool -g -R /app/resources/jellyfin-web_${PACKAGE_VERSION}.spec # Build the RPM rpmbuild -ba /app/resources/jellyfin-web_${PACKAGE_VERSION}.spec # Copy the built RPMs to output directory cp /root/rpmbuild/RPMS/noarch/jellyfin-web-${PACKAGE_VERSION}-${PACKAGE_RELEASE}.noarch.rpm /app/dist/ cp /root/rpmbuild/SRPMS/jellyfin-web-${PACKAGE_VERSION}-${PACKAGE_RELEASE}.src.rpm /app/dist/