#!/bin/bash #= .rpm builder set -o errexit set -o xtrace # Move to source directory pushd "${SOURCE_DIR}" # Build DEB if [[ ${ARCH} != $( uname -m ) ]]; then #export CONFIG_SITE=/etc/dpkg-cross/cross-config.${ARCH} export CONFIG_CROSS="-a ${ARCH}" fi #find . -iname 'jellyfin.spec' #pwd # FIXME: that node_modules is probably contents of the jellyfin-npm.tar.xz mkdir -p ~/rpmbuild/RPMS ~/rpmbuild/SRPMS ~/rpmbuild/SOURCES ~/rpmbuild/SPECS tar -zcf ~/"rpmbuild/SOURCES/jellyfin-web-${JELLYFIN_VERSION}.tar.gz" jellyfin-web ln -s ~/"rpmbuild/SOURCES/jellyfin-web-${JELLYFIN_VERSION}.tar.gz" . || : tar -zcf ~/"rpmbuild/SOURCES/jellyfin-${JELLYFIN_VERSION}.tar.gz" jellyfin-server ln -s ~/"rpmbuild/SOURCES/jellyfin-${JELLYFIN_VERSION}.tar.gz" . || : cp -pf rpm/*.* ~/"rpmbuild/SOURCES/" find . -maxdepth 4 -type d ! -ipath '*/node_modules/*' -exec ls -aldF --color=always {} + sh -x rpm/jellyfin-offline.sh rpmbuild -ba rpm/jellyfin.spec --define="jversion ${JELLYFIN_VERSION}" mkdir -p "${ARTIFACT_DIR}/" mv ~/rpmbuild/RPMS/${ARCH}/*rpm ~/rpmbuild/SRPMS/*rpm "${ARTIFACT_DIR}/" popd