Code review updates

Also fix a bug in the tarball creation that existed even prior
to moving it into create_tarball.sh
This commit is contained in:
Brian J. Murrell 2019-02-15 08:50:31 -05:00
parent 4018b7e2d5
commit e33706ab25
3 changed files with 6 additions and 7 deletions

View File

@ -1,7 +1,6 @@
srpm:
dnf -y install git
git submodule init
git submodule update
git submodule update --init --recursive
cd deployment/fedora-package-x64; \
./create_tarball.sh; \
rpmbuild -bs pkg-src/jellyfin.spec \

View File

@ -24,12 +24,12 @@ tar \
--exclude='**/.nuget' \
--exclude='*.deb' \
--exclude='*.rpm' \
-Jcf "$pkg_src_dir/jellyfin-${VERSION}.tar.xz" \
-czf "$pkg_src_dir/jellyfin-${VERSION}.tar.gz" \
-C "../.." ./ || GNU_TAR=0
if [ $GNU_TAR -eq 0 ]; then
echo "The installed tar binary did not support --transform. Using workaround."
mkdir -p "${package_temporary_dir}/jellyfin"
mkdir -p "${package_temporary_dir}/jellyfin"{,-"${VERSION}"}
# Not GNU tar
tar \
--exclude='.git*' \
@ -47,9 +47,9 @@ if [ $GNU_TAR -eq 0 ]; then
"${package_temporary_dir}/jellyfin/jellyfin-${VERSION}.tar.gz" \
-C "../.." ./
echo "Extracting filtered package."
tar -Jzf "${package_temporary_dir}/jellyfin/jellyfin-${VERSION}.tar.gz" -C "${package_temporary_dir}/jellyfin-${VERSION}"
tar -xzf "${package_temporary_dir}/jellyfin/jellyfin-${VERSION}.tar.gz" -C "${package_temporary_dir}/jellyfin-${VERSION}"
echo "Removing filtered package."
rm -f "${package_temporary_dir}/jellyfin/jellyfin-${VERSION}.tar.gz"
echo "Repackaging package into final tarball."
tar -Jzf "${pkg_src_dir}/jellyfin-${VERSION}.tar.gz" -C "${package_temporary_dir}" "jellyfin-${VERSION}"
tar -czf "${pkg_src_dir}/jellyfin-${VERSION}.tar.gz" -C "${package_temporary_dir}" "jellyfin-${VERSION}"
fi

View File

@ -12,7 +12,7 @@ Release: 1%{?dist}
Summary: The Free Software Media Browser
License: GPLv2
URL: https://jellyfin.media
Source0: %{name}-%{version}.tar.xz
Source0: %{name}-%{version}.tar.gz
Source1: jellyfin.service
Source2: jellyfin.env
Source3: jellyfin.sudoers