Signed-off-by: Thomas Büttner <thomas@vergesslicher.tech>pull/702/head
parent
7f4a073b05
commit
ad36f9ec89
@ -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 \;
|
@ -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 ../../
|
Loading…
Reference in new issue