aboutsummaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
Diffstat (limited to 'debian')
-rw-r--r--debian/conf/jellyfin.init4
-rw-r--r--debian/docker/Dockerfile62
-rwxr-xr-xdebian/rules2
3 files changed, 53 insertions, 15 deletions
diff --git a/debian/conf/jellyfin.init b/debian/conf/jellyfin.init
index 784536d..02c15ad 100644
--- a/debian/conf/jellyfin.init
+++ b/debian/conf/jellyfin.init
@@ -25,7 +25,7 @@ case "$1" in
start)
log_daemon_msg "Starting Jellyfin Media Server" "jellyfin" || true
- if start-stop-daemon --start --quiet --oknodo --background --pidfile $PIDFILE --make-pidfile --user $JELLYFIN_USER --chuid $JELLYFIN_USER --exec /usr/bin/jellyfin -- $JELLYFIN_ARGS; then
+ if start-stop-daemon --start --quiet --oknodo --background --chdir $JELLYFIN_DATA_DIR --pidfile $PIDFILE --make-pidfile --user $JELLYFIN_USER --chuid $JELLYFIN_USER --exec /usr/bin/jellyfin -- $JELLYFIN_ARGS; then
log_end_msg 0 || true
else
log_end_msg 1 || true
@@ -44,7 +44,7 @@ case "$1" in
restart)
log_daemon_msg "Restarting Jellyfin Media Server" "jellyfin" || true
start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile $PIDFILE --remove-pidfile
- if start-stop-daemon --start --quiet --oknodo --background --pidfile $PIDFILE --make-pidfile --user $JELLYFIN_USER --chuid $JELLYFIN_USER --exec /usr/bin/jellyfin -- $JELLYFIN_ARGS; then
+ if start-stop-daemon --start --quiet --oknodo --background --chdir $JELLYFIN_DATA_DIR --pidfile $PIDFILE --make-pidfile --user $JELLYFIN_USER --chuid $JELLYFIN_USER --exec /usr/bin/jellyfin -- $JELLYFIN_ARGS; then
log_end_msg 0 || true
else
log_end_msg 1 || true
diff --git a/debian/docker/Dockerfile b/debian/docker/Dockerfile
index 02caa7b..f73a459 100644
--- a/debian/docker/Dockerfile
+++ b/debian/docker/Dockerfile
@@ -31,12 +31,22 @@ ENV ARCH=${PACKAGE_ARCH}
RUN apt-get update -y \
&& DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC \
apt-get install --no-install-recommends -y \
- wget debhelper gnupg devscripts build-essential mmv lsb-release \
- libssl*.* liblttng-ust* \
- libfontconfig*-dev libcurl*openssl-dev libfreetype*-dev libssl-dev \
+ wget \
+ debhelper \
+ gnupg \
+ devscripts \
+ build-essential \
+ mmv \
+ lsb-release \
+ libssl*.* \
+ liblttng-ust* \
+ libfontconfig*-dev \
+ libcurl*openssl-dev \
+ libfreetype*-dev \
+ libssl-dev \
&& apt-get clean autoclean -y \
&& apt-get autoremove -y \
- && rm -rf /var/lib/apt/lists/*
+ && rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/*
# Prepare the cross-toolchain
RUN if test "${PACKAGE_ARCH}" != "$( dpkg --print-architecture )"; then \
@@ -60,16 +70,38 @@ RUN if test "${PACKAGE_ARCH}" != "$( dpkg --print-architecture )"; then \
&& cd cross-gcc-packages-amd64/cross-gcc-${GCC_VERSION}-${PACKAGE_ARCH} \
&& DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC \
apt-get -f install --no-install-recommends -o Dpkg::Options::="--force-overwrite" -y \
- bison flex libtool gdb sharutils netbase libmpc-dev libmpfr-dev libgmp-dev \
- systemtap-sdt-dev autogen expect chrpath zlib1g-dev zip \
- binutils-aarch64-linux-gnu binutils-arm-linux-gnueabihf \
- gcc-${GCC_VERSION}-source libstdc++-${GCC_VERSION}-dev-${PACKAGE_ARCH}-cross \
- libc6-dev:${PACKAGE_ARCH} linux-libc-dev:${PACKAGE_ARCH} libgcc1:${PACKAGE_ARCH} libstdc++-${GCC_VERSION}-dev:${PACKAGE_ARCH} \
- libfontconfig*-dev:${PACKAGE_ARCH} libcurl*openssl-dev:${PACKAGE_ARCH} libfreetype*-dev:${PACKAGE_ARCH} libssl-dev:${PACKAGE_ARCH} \
- libssl[13].*:${PACKAGE_ARCH} liblttng-ust*:${PACKAGE_ARCH} \
+ bison \
+ flex \
+ libtool \
+ gdb \
+ sharutils \
+ netbase \
+ libmpc-dev \
+ libmpfr-dev \
+ libgmp-dev \
+ systemtap-sdt-dev \
+ autogen \
+ expect \
+ chrpath \
+ zlib1g-dev \
+ zip \
+ binutils-aarch64-linux-gnu \
+ binutils-arm-linux-gnueabihf \
+ gcc-${GCC_VERSION}-source \
+ libstdc++-${GCC_VERSION}-dev-${PACKAGE_ARCH}-cross \
+ libc6-dev:${PACKAGE_ARCH} \
+ linux-libc-dev:${PACKAGE_ARCH} \
+ libgcc1:${PACKAGE_ARCH} \
+ libstdc++-${GCC_VERSION}-dev:${PACKAGE_ARCH} \
+ libfontconfig*-dev:${PACKAGE_ARCH} \
+ libcurl*openssl-dev:${PACKAGE_ARCH} \
+ libfreetype*-dev:${PACKAGE_ARCH} \
+ libssl-dev:${PACKAGE_ARCH} \
+ libssl[13].*:${PACKAGE_ARCH} \
+ liblttng-ust*:${PACKAGE_ARCH} \
&& apt-get clean autoclean -y \
&& apt-get autoremove -y \
- && rm -rf /var/lib/apt/lists/* \
+ && rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/*
; fi
# Prepare dotnet SDK
@@ -86,6 +118,12 @@ RUN wget https://deb.nodesource.com/setup_${NODEJS_VERSION}.x -O nodejs-install.
&& apt-get install -y \
nodejs
+# Clean up dependencies
+RUN apt-get remove wget -y \
+ && apt-get clean autoclean -y \
+ && apt-get autoremove -y \
+ && rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/*
+
# Link to build script
RUN ln -sf ${SOURCE_DIR}/debian/docker/build.sh /build.sh
diff --git a/debian/rules b/debian/rules
index 678c4d8..e8a07bb 100755
--- a/debian/rules
+++ b/debian/rules
@@ -42,7 +42,7 @@ override_dh_auto_build:
cd jellyfin-server && dotnet publish -maxcpucount:1 --configuration $(CONFIG) \
--output='$(CURDIR)/build/usr/lib/jellyfin/bin' --self-contained --runtime $(DOTNETRUNTIME) \
-p:DebugSymbols=false -p:DebugType=none Jellyfin.Server
- rm $(CURDIR)/build/usr/lib/jellyfin/bin/libcoreclrtraceptprovider.so
+ rm -f $(CURDIR)/build/usr/lib/jellyfin/bin/libcoreclrtraceptprovider.so
cd jellyfin-web && npm ci --no-audit --unsafe-perm && \
npm run build:production && mv $(CURDIR)/jellyfin-web/dist $(CURDIR)/build/web
bgstack15