diff options
| author | Thomas Büttner <thomas@vergesslicher.tech> | 2019-01-08 19:04:52 +0100 |
|---|---|---|
| committer | Thomas Büttner <thomas@vergesslicher.tech> | 2019-01-08 19:04:52 +0100 |
| commit | ad36f9ec8951de61a605ceb247296a884e81f6e9 (patch) | |
| tree | 7b40fbc621a7d8328f4c0be2c3ced527d8b7a2a0 | |
| parent | 7f4a073b05ac9c4ce4ef6d499cd5bfba40f72415 (diff) | |
Add rpm build script for fedora and update README
Signed-off-by: Thomas Büttner <thomas@vergesslicher.tech>
| -rw-r--r-- | rpm-package/Dockerfile.fedora_package | 17 | ||||
| -rw-r--r-- | rpm-package/README.md | 16 | ||||
| -rwxr-xr-x | rpm-package/build-fedora-rpm.sh | 24 |
3 files changed, 51 insertions, 6 deletions
diff --git a/rpm-package/Dockerfile.fedora_package b/rpm-package/Dockerfile.fedora_package new file mode 100644 index 000000000..35650106d --- /dev/null +++ b/rpm-package/Dockerfile.fedora_package @@ -0,0 +1,17 @@ +FROM fedora:29 +ARG HOME=/build +RUN mkdir /build && \ + dnf install -y @buildsys-build rpmdevtools dnf-plugins-core && \ + dnf copr enable -y @dotnet-sig/dotnet && \ + rpmdev-setuptree + +WORKDIR /build/rpmbuild +COPY jellyfin.spec SPECS +COPY . SOURCES + +RUN spectool -g -R SPECS/jellyfin.spec && \ + rpmbuild -bs SPECS/jellyfin.spec && \ + dnf build-dep -y SRPMS/jellyfin-*.src.rpm && \ + rpmbuild -bb SPECS/jellyfin.spec && \ + mkdir /jellyfin && \ + find . -name 'jellyfin-*.rpm' -print -exec cp {} /jellyfin \;
\ No newline at end of file diff --git a/rpm-package/README.md b/rpm-package/README.md index 84aded8c6..5944f9e9b 100644 --- a/rpm-package/README.md +++ b/rpm-package/README.md @@ -1,29 +1,33 @@ -# unoffical jellyfin RPM +# Jellyfin RPM -<a href="https://copr.fedorainfracloud.org/coprs/wuerfelbecher/jellyfin/package/jellyfin/"><img src="https://copr.fedorainfracloud.org/coprs/wuerfelbecher/jellyfin/package/jellyfin/status_image/last_build.png" /></a> +## Build Fedora Package with docker + +Change into this directory `cd rpm-package` +Run the build script `./build-fedora-rpm.sh`. +Resulting RPM and src.rpm will be in `../../jellyfin-*.rpm` ## ffmpeg -The RPM package for Fedora/CentOS requires some additional repos as ffmpeg is not in the main repositories. +The RPM package for Fedora/CentOS requires some additional repositories as ffmpeg is not in the main repositories. ```shell # ffmpeg from RPMfusion free # Fedora $ sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm -# CentOS 7 +# CentOS 7 $ sudo yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm ``` ## ISO mounting -To allow jellyfin to mount/umonut ISO files uncomment these two lines in `/etc/sudoers.d/jellyfin-sudoers` +To allow Jellyfin to mount/umonut ISO files uncomment these two lines in `/etc/sudoers.d/jellyfin-sudoers` ``` # %jellyfin ALL=(ALL) NOPASSWD: /bin/mount # %jellyfin ALL=(ALL) NOPASSWD: /bin/umount ``` - ## Database patching + You may need to install sqlite since CentOS has no `Recommends:` with `yum install sqlite`. To fix the paths in the emby database for a migration to jellyfin run the script: ```shell diff --git a/rpm-package/build-fedora-rpm.sh b/rpm-package/build-fedora-rpm.sh new file mode 100755 index 000000000..87c94e081 --- /dev/null +++ b/rpm-package/build-fedora-rpm.sh @@ -0,0 +1,24 @@ +#!/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 ../../ |
