aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2024-05-14 08:48:43 -0400
committerB. Stack <bgstack15@gmail.com>2024-05-14 08:48:43 -0400
commit2146db71dbb4f650cc9aba9ea3f3b965fe09627c (patch)
tree2d99e323be42fa6c41e3ab0ad752dad1932f6e30
parentadd initial research for rpm (diff)
downloadjellyfin-packaging-rpm-attempt-1.tar.gz
jellyfin-packaging-rpm-attempt-1.tar.bz2
jellyfin-packaging-rpm-attempt-1.zip
more research, but will stoprpm-attempt-1
-rwxr-xr-xrpm/docker/build.sh6
-rwxr-xr-xrpm/jellyfin-offline.sh13
-rw-r--r--rpm/jellyfin.spec21
3 files changed, 23 insertions, 17 deletions
diff --git a/rpm/docker/build.sh b/rpm/docker/build.sh
index 87a2bc9..4dd676e 100755
--- a/rpm/docker/build.sh
+++ b/rpm/docker/build.sh
@@ -15,11 +15,15 @@ if [[ ${ARCH} != $( uname -m ) ]]; then
fi
#find . -iname 'jellyfin.spec'
#pwd
-find . -maxdepth 4 -type d ! -ipath '*/node_modules/*' -exec ls -aldF --color=always {} +
+# FIXME: that node_modules is probably contents of the jellyfin-npm.tar.xz
mkdir -p ~/rpmbuild/RPMS ~/rpmbuild/SRPMS ~/rpmbuild/SOURCES ~/rpmbuild/SPECS
tar -zcf ~/"rpmbuild/SOURCES/jellyfin-web-${JELLYFIN_VERSION}.tar.gz" jellyfin-web
+ln -s ~/"rpmbuild/SOURCES/jellyfin-web-${JELLYFIN_VERSION}.tar.gz" . || :
tar -zcf ~/"rpmbuild/SOURCES/jellyfin-${JELLYFIN_VERSION}.tar.gz" jellyfin-server
+ln -s ~/"rpmbuild/SOURCES/jellyfin-${JELLYFIN_VERSION}.tar.gz" . || :
cp -pf rpm/*.* ~/"rpmbuild/SOURCES/"
+find . -maxdepth 4 -type d ! -ipath '*/node_modules/*' -exec ls -aldF --color=always {} +
+sh -x rpm/jellyfin-offline.sh
rpmbuild -ba rpm/jellyfin.spec --define="jversion ${JELLYFIN_VERSION}"
mkdir -p "${ARTIFACT_DIR}/"
diff --git a/rpm/jellyfin-offline.sh b/rpm/jellyfin-offline.sh
index f87897a..08016ae 100755
--- a/rpm/jellyfin-offline.sh
+++ b/rpm/jellyfin-offline.sh
@@ -1,12 +1,13 @@
#!/bin/sh
-JELLYFIN_VERSION=10.8.13
-DOTNET_VERSION=6.0.24
-DOTNET_HOST_VERSION=6.0.24
+#JELLYFIN_VERSION=10.8.13
+#DOTNET_VERSION=6.0.24
+#DOTNET_HOST_VERSION=6.0.24
+DOTNET_HOST_VERSION="${DOTNET_HOST_VERSION:-${DOTNET_VERSION}}"
# Retrieve neccessary .NET NuGet packages for offline building
tar xf jellyfin-${JELLYFIN_VERSION}.tar.gz
-pushd jellyfin-${JELLYFIN_VERSION}
+pushd jellyfin-server
mkdir jellyfin-nupkgs
dotnet restore --packages ./jellyfin-nupkgs
mkdir jellyfin-nupkgs2
@@ -25,7 +26,7 @@ popd
# Retrieve neccessary NPM packages for offline building
tar xf jellyfin-web-${JELLYFIN_VERSION}.tar.gz
-pushd jellyfin-web-${JELLYFIN_VERSION}
+pushd jellyfin-web
mkdir jellyfin-npm
npm config set cache ./jellyfin-npm
npm i webpack
@@ -35,4 +36,4 @@ npm ci
tar -c -I 'xz -9 -T0' -f ../jellyfin-npm.tar.xz jellyfin-npm
cp -p package-lock.json ../jellyfin-web-package-lock.json
popd
-
+mv -i *z ~/rpmbuild/SOURCES/ 2>&1 | grep -vE -e "jellyfin-${JELLYFIN_VERSION}|jellyfin-web-${JELLYFIN_VERSION}" || :
diff --git a/rpm/jellyfin.spec b/rpm/jellyfin.spec
index 2f14f7e..347cc39 100644
--- a/rpm/jellyfin.spec
+++ b/rpm/jellyfin.spec
@@ -24,6 +24,7 @@ License: GPL-2.0-only
URL: https://jellyfin.org
Source0: https://github.com/jellyfin/jellyfin/archive/v%{version}/%{name}-%{version}.tar.gz
Source1: https://github.com/jellyfin/jellyfin-web/archive/v%{version}/%{name}-web-%{version}.tar.gz
+# FIXME: these nupkg ones probably come from the `dotnet restore` list.
Source2: %{name}-nupkgs.tar.xz
Source3: %{name}-nupkgs2.tar.xz
Source4: %{name}-npm.tar.xz
@@ -118,17 +119,17 @@ The Jellyfin media server web frontend.
%prep
%autosetup -p1 -b 1 -n jellyfin-server
pushd ..
-tar xf %{SOURCE2}
-tar xf %{SOURCE3}
-tar xf %{SOURCE4}
-cp -p %{SOURCE5} %{name}-web-%{version}/package-lock.json
+#tar xf %%{SOURCE2}
+#tar xf %%{SOURCE3}
+#tar xf %%{SOURCE4}
+cp -p %{SOURCE5} %{name}-web/package-lock.json
popd
-dotnet nuget add source %{_builddir}/jellyfin-nupkgs -n jellyfin-nupkgs
-dotnet nuget add source %{_builddir}/jellyfin-nupkgs2 -n jellyfin-nupkgs2
-dotnet nuget disable source nuget.org
-dotnet nuget disable source "NuGet official package source"
+#dotnet nuget add source %{_builddir}/jellyfin-nupkgs -n jellyfin-nupkgs
+#dotnet nuget add source %{_builddir}/jellyfin-nupkgs2 -n jellyfin-nupkgs2
+#dotnet nuget disable source nuget.org
+#dotnet nuget disable source "NuGet official package source"
%build
@@ -141,7 +142,7 @@ dotnet publish --configuration Release \
--runtime %{dotnet_rid} \
"-p:DebugSymbols=false;DebugType=none" \
Jellyfin.Server
-cd ../%{name}-web-%{version}
+cd ../%{name}-web
npm config set offline=true
npm config set cache ../jellyfin-npm
npm ci
@@ -181,7 +182,7 @@ mkdir -p %{buildroot}%{_localstatedir}/log/jellyfin
# jellyfin-server-lowports subpackage
install -p -m 644 -D %{SOURCE17} %{buildroot}%{_unitdir}/jellyfin.service.d/jellyfin-server-lowports.conf
-cd ../%{name}-web-%{version}
+cd ../%{name}-web
# move web licenses prior to installation
mv dist/*.js.LICENSE.txt ../jellyfin-%{version}/
mv dist/libraries/*.js.LICENSE.txt ../jellyfin-%{version}/
bgstack15