2019-02-15 03:07:46 +00:00
|
|
|
srpm:
|
|
|
|
dnf -y install git
|
2019-02-15 13:50:31 +00:00
|
|
|
git submodule update --init --recursive
|
2019-02-15 03:07:46 +00:00
|
|
|
cd deployment/fedora-package-x64; \
|
2019-10-08 02:29:31 +00:00
|
|
|
WORKDIR="$( pwd )"; \
|
|
|
|
VERSION="$( sed -ne '/^Version:/s/.* *//p' "${WORKDIR}"/pkg-src/jellyfin.spec )"; \
|
|
|
|
package_temporary_dir="${WORKDIR}/pkg-dist-tmp"; \
|
|
|
|
pkg_src_dir="${WORKDIR}/pkg-src"; \
|
|
|
|
GNU_TAR=1; \
|
|
|
|
tar \
|
|
|
|
--transform "s,^\.,jellyfin-${VERSION}," \
|
|
|
|
--exclude='.git*' \
|
|
|
|
--exclude='**/.git' \
|
|
|
|
--exclude='**/.hg' \
|
|
|
|
--exclude='**/.vs' \
|
|
|
|
--exclude='**/.vscode' \
|
|
|
|
--exclude='deployment' \
|
|
|
|
--exclude='**/bin' \
|
|
|
|
--exclude='**/obj' \
|
|
|
|
--exclude='**/.nuget' \
|
|
|
|
--exclude='*.deb' \
|
|
|
|
--exclude='*.rpm' \
|
|
|
|
-czf "${SOURCE_DIR}/SOURCES/pkg-src/jellyfin-${VERSION}.tar.gz" \
|
|
|
|
-C ${SOURCE_DIR} ./ || GNU_TAR=0; \
|
|
|
|
if [ $GNU_TAR -eq 0 ]; then
|
|
|
|
package_temporary_dir="$( mktemp -d )"; \
|
|
|
|
mkdir -p "${package_temporary_dir}/jellyfin"; \
|
|
|
|
tar \
|
|
|
|
--exclude='.git*' \
|
|
|
|
--exclude='**/.git' \
|
|
|
|
--exclude='**/.hg' \
|
|
|
|
--exclude='**/.vs' \
|
|
|
|
--exclude='**/.vscode' \
|
|
|
|
--exclude='deployment' \
|
|
|
|
--exclude='**/bin' \
|
|
|
|
--exclude='**/obj' \
|
|
|
|
--exclude='**/.nuget' \
|
|
|
|
--exclude='*.deb' \
|
|
|
|
--exclude='*.rpm' \
|
|
|
|
-czf "${package_temporary_dir}/jellyfin/jellyfin-${VERSION}.tar.gz" \
|
|
|
|
-C ${SOURCE_DIR} ./; \
|
|
|
|
mkdir -p "${package_temporary_dir}/jellyfin-${VERSION}"; \
|
|
|
|
tar -xzf "${package_temporary_dir}/jellyfin/jellyfin-${VERSION}.tar.gz" -C "${package_temporary_dir}/jellyfin-${VERSION}"; \
|
|
|
|
rm -f "${package_temporary_dir}/jellyfin/jellyfin-${VERSION}.tar.gz"; \
|
|
|
|
tar -czf "${SOURCE_DIR}/SOURCES/pkg-src/jellyfin-${VERSION}.tar.gz" -C "${package_temporary_dir}" "jellyfin-${VERSION}"; \
|
|
|
|
rm -rf ${package_temporary_dir}; \
|
|
|
|
fi; \
|
2019-02-15 03:07:46 +00:00
|
|
|
rpmbuild -bs pkg-src/jellyfin.spec \
|
|
|
|
--define "_sourcedir $$PWD/pkg-src/" \
|
|
|
|
--define "_srcrpmdir $(outdir)"
|