jellyfin/rpm-package/build-fedora-rpm.sh
Thomas Büttner ad36f9ec89 Add rpm build script for fedora and update README
Signed-off-by: Thomas Büttner <thomas@vergesslicher.tech>
2019-01-08 19:04:52 +01:00

25 lines
648 B
Bash
Executable File

#!/usr/bin/env sh
# Build a Jellyfin .rpm file with Docker on Linux
# Places the output .rpm file in the parent directory
set -o errexit
set -o xtrace
set -o nounset
package_temporary_dir="`mktemp -d`"
current_user="`whoami`"
image_name="jellyfin-rpmbuild"
cleanup() {
set +o errexit
docker image rm $image_name --force
rm -rf "$package_temporary_dir"
}
trap cleanup EXIT INT
docker build . -t "$image_name" -f ./Dockerfile.fedora_package
docker run --rm -v "$package_temporary_dir:/temp" "$image_name" cp -r /jellyfin /temp/
sudo chown -R "$current_user" "$package_temporary_dir"
mv "$package_temporary_dir"/jellyfin/*.rpm ../../