22 lines
807 B
Bash
Executable File
22 lines
807 B
Bash
Executable File
#!/usr/bin/bash
|
|
|
|
# Setup rpmbuild directory structure
|
|
mkdir -p /root/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
|
|
|
|
# Install .NET SDK for building
|
|
dnf install dotnet-sdk-8.0 -y
|
|
|
|
# Download source files using spectool
|
|
spectool -g -R /app/resources/jellyfin-server_${PACKAGE_VERSION}.spec
|
|
|
|
# Copy additional files to SOURCES
|
|
cp /app/resources/fix-envfile-path.patch /root/rpmbuild/SOURCES/fix-envfile-path.patch
|
|
cp /app/resources/tmpfiles.conf /root/rpmbuild/SOURCES/tmpfiles.conf
|
|
|
|
# Build the RPM
|
|
rpmbuild -ba /app/resources/jellyfin-server_${PACKAGE_VERSION}.spec
|
|
|
|
# Copy the built RPMs to output directory
|
|
cp /root/rpmbuild/RPMS/x86_64/jellyfin-server-${PACKAGE_VERSION}-${PACKAGE_RELEASE}.x86_64.rpm /app/dist/
|
|
cp /root/rpmbuild/SRPMS/jellyfin-server-${PACKAGE_VERSION}-${PACKAGE_RELEASE}.src.rpm /app/dist/
|