Skip to content

Commit

Permalink
fix: lint and jpegli version
Browse files Browse the repository at this point in the history
  • Loading branch information
martabal committed Oct 15, 2024
1 parent a2bc046 commit f7c155c
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 13 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Test
on:
workflow_dispatch:
pull_request:
push:
branches: [main]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
shellcheck:
name: ShellCheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
4 changes: 2 additions & 2 deletions server/bin/build-imagemagick.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ set -e

git clone https://github.com/ImageMagick/ImageMagick.git
cd ImageMagick
git reset --hard $IMAGEMAGICK_REVISION
git reset --hard "$IMAGEMAGICK_REVISION"

./configure --with-modules
make -j$(nproc)
make -j"$(nproc)"
make install
cd .. && rm -rf ImageMagick
ldconfig /usr/local/lib
2 changes: 1 addition & 1 deletion server/bin/build-libheif.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e

git clone https://github.com/strukturag/libheif.git
cd libheif
git reset --hard $LIBHEIF_REVISION
git reset --hard "$LIBHEIF_REVISION"

mkdir build
cd build
Expand Down
18 changes: 16 additions & 2 deletions server/bin/build-libjxl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,23 @@

set -e

JPEGLI_LIBJPEG_LIBRARY_SOVERSION="62"
JPEGLI_LIBJPEG_LIBRARY_VERSION="62.3.0"

while [[ "$#" -gt 0 ]]; do
case $1 in
--JPEGLI_LIBJPEG_LIBRARY_SOVERSION) JPEGLI_LIBJPEG_LIBRARY_SOVERSION="$2"; shift ;;
--JPEGLI_LIBJPEG_LIBRARY_VERSION) JPEGLI_LIBJPEG_LIBRARY_VERSION="$2"; shift ;;
*) echo "Unknown parameter passed: $1"; exit 1 ;;
esac
shift
done

: "${LIBJXL_REVISION:=$(jq -cr '.sources[] | select(.name == "libjxl").revision' build-lock.json)}"

git clone https://github.com/libjxl/libjxl.git
cd libjxl
git reset --hard $LIBJXL_REVISION
git reset --hard "$LIBJXL_REVISION"
git submodule update --init --recursive --depth 1 --recommend-shallow

mkdir build
Expand All @@ -27,8 +39,10 @@ cmake \
-DJPEGXL_ENABLE_AVX512=ON \
-DJPEGXL_ENABLE_AVX512_ZEN4=ON \
-DJPEGXL_ENABLE_PLUGINS=ON \
-JPEGLI_LIBJPEG_LIBRARY_SOVERSION="${JPEGLI_LIBJPEG_LIBRARY_SOVERSION}" \
-JPEGLI_LIBJPEG_LIBRARY_VERSION="${JPEGLI_LIBJPEG_LIBRARY_VERSION}" \
..
cmake --build . -- -j$(nproc)
cmake --build . -- -j"$(nproc)"
cmake --install .
cd ../.. && rm -rf libjxl
ldconfig /usr/local/lib
4 changes: 2 additions & 2 deletions server/bin/build-libraw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ set -e

git clone https://github.com/libraw/libraw.git
cd libraw
git reset --hard $LIBRAW_REVISION
git reset --hard "$LIBRAW_REVISION"

autoreconf --install
./configure
make -j$(nproc)
make -j"$(nproc)"
make install
cd .. && rm -rf libraw
ldconfig /usr/local/lib
2 changes: 1 addition & 1 deletion server/bin/build-libvips.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e

git clone https://github.com/libvips/libvips.git
cd libvips
git reset --hard $LIBVIPS_REVISION
git reset --hard "$LIBVIPS_REVISION"

meson setup build --buildtype=release --libdir=lib -Dintrospection=disabled -Dtiff=disabled
cd build
Expand Down
10 changes: 5 additions & 5 deletions server/bin/install-ffmpeg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ set -e

LOCK=$(jq -c '.packages[] | select(.name == "ffmpeg")' build-lock.json)
export TARGETARCH=${TARGETARCH:=$(dpkg --print-architecture)}
FFMPEG_VERSION=${FFMPEG_VERSION:=$(echo $LOCK | jq -r '.version')}
FFMPEG_SHA256=${FFMPEG_SHA256:=$(echo $LOCK | jq -r '.sha256[$ENV.TARGETARCH]')}
FFMPEG_VERSION=${FFMPEG_VERSION:=$(echo "$LOCK" | jq -r '.version')}
FFMPEG_SHA256=${FFMPEG_SHA256:=$(echo "$LOCK" | jq -r '.sha256[$ENV.TARGETARCH]')}

echo "$FFMPEG_SHA256 jellyfin-ffmpeg7_${FFMPEG_VERSION}-bookworm_${TARGETARCH}.deb" > ffmpeg.sha256

wget -nv https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v${FFMPEG_VERSION}/jellyfin-ffmpeg7_${FFMPEG_VERSION}-bookworm_${TARGETARCH}.deb
wget -nv https://github.com/jellyfin/jellyfin-ffmpeg/releases/download/v"${FFMPEG_VERSION}"/jellyfin-ffmpeg7_"${FFMPEG_VERSION}"-bookworm_"${TARGETARCH}".deb
sha256sum -c ffmpeg.sha256
apt-get -yqq -f install ./jellyfin-ffmpeg7_${FFMPEG_VERSION}-bookworm_${TARGETARCH}.deb
rm jellyfin-ffmpeg7_${FFMPEG_VERSION}-bookworm_${TARGETARCH}.deb
apt-get -yqq -f install ./jellyfin-ffmpeg7_"${FFMPEG_VERSION}"-bookworm_"${TARGETARCH}".deb
rm jellyfin-ffmpeg7_"${FFMPEG_VERSION}"-bookworm_"${TARGETARCH}".deb
rm ffmpeg.sha256
ldconfig /usr/lib/jellyfin-ffmpeg/lib

Expand Down

0 comments on commit f7c155c

Please sign in to comment.