Skip to content

Commit

Permalink
Tomasz/jpeg turbo2 (#17)
Browse files Browse the repository at this point in the history
* added libjpeg-turbo2 package

* build new package
  • Loading branch information
tomasz-h2o authored Jun 21, 2024
1 parent 19da844 commit b0f2cdb
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ jobs:
docker run --privileged --rm -v $(pwd)/packages:/work/packages -v $(pwd)/font-liberation1.yaml:/work/font-liberation1.yaml cgr.dev/chainguard/melange build --arch=x86_64 font-liberation1.yaml
docker run --privileged --rm -v $(pwd)/packages:/work/packages -v $(pwd)/libspatialindex.yaml:/work/libspatialindex.yaml cgr.dev/chainguard/melange build --arch=x86_64 libspatialindex.yaml
docker run --privileged --rm -v $(pwd)/packages:/work/packages -v $(pwd)/mesa22.yaml:/work/mesa22.yaml cgr.dev/chainguard/melange build --arch=x86_64 mesa22.yaml
docker run --privileged --rm -v $(pwd)/packages:/work/packages -v $(pwd)/libjpeg-turbo2.yaml:/work/libjpeg-turbo2.yaml cgr.dev/chainguard/melange build --arch=x86_64 libjpeg-turbo2.yaml
1 change: 1 addition & 0 deletions .github/workflows/push-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
docker run --privileged --rm -v $(pwd)/packages:/work/packages -v $(pwd)/font-liberation1.yaml:/work/font-liberation1.yaml -v $(pwd)/melange.rsa:/work/melange.rsa cgr.dev/chainguard/melange build --signing-key melange.rsa --arch=x86_64 font-liberation1.yaml
docker run --privileged --rm -v $(pwd)/packages:/work/packages -v $(pwd)/libspatialindex.yaml:/work/libspatialindex.yaml -v $(pwd)/melange.rsa:/work/melange.rsa cgr.dev/chainguard/melange build --signing-key melange.rsa --arch=x86_64 libspatialindex.yaml
docker run --privileged --rm -v $(pwd)/packages:/work/packages -v $(pwd)/mesa22.yaml:/work/mesa22.yaml -v $(pwd)/melange.rsa:/work/melange.rsa cgr.dev/chainguard/melange build --signing-key melange.rsa --arch=x86_64 mesa22.yaml
docker run --privileged --rm -v $(pwd)/packages:/work/packages -v $(pwd)/libjpeg-turbo2.yaml:/work/libjpeg-turbo2.yaml -v $(pwd)/melange.rsa:/work/melange.rsa cgr.dev/chainguard/melange build --signing-key melange.rsa --arch=x86_64 libjpeg-turbo2.yaml
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v3
Expand Down
66 changes: 66 additions & 0 deletions libjpeg-turbo2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
package:
name: libjpeg-turbo2
version: 2.0.3
epoch: 1
description: "Accelerated baseline JPEG compression and decompression library"
copyright:
- license: BSD-3-Clause AND IJG AND Zlib

environment:
contents:
keyring:
- https://packages.wolfi.dev/os/wolfi-signing.rsa.pub
repositories:
- https://packages.wolfi.dev/os
packages:
- build-base
- ca-certificates-bundle
- cmake
- nasm
- samurai # use ninja pkg later?
- wolfi-base

pipeline:
- uses: git-checkout
with:
repository: https://github.com/libjpeg-turbo/libjpeg-turbo
tag: ${{package.version}}
expected-commit: 5db6a6819d0f904e0b58f34ae928fea234adb1a0

- runs: |
cmake -B build -G Ninja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
-DBUILD_SHARED_LIBS=True \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DWITH_JPEG8=1
cmake --build build
- runs: |
DESTDIR="${{targets.destdir}}" cmake --install build
- uses: strip

subpackages:
- name: "libjpeg-turbo2-dev"
description: "headers for libjpeg-turbo2"
pipeline:
- uses: split/dev

- name: "libjpeg-turbo2-doc"
description: "libjpeg-turbo2 documentation"
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/usr/share/doc/libjpeg-turbo
mv doc/* "${{targets.subpkgdir}}"/usr/share/doc/libjpeg-turbo
dependencies:
runtime:
- libjpeg-turbo-dev

- name: "libjpeg-turbo2-utils"
description: "Utilities for manipulating JPEG images"
pipeline:
- runs: |
mkdir -p "${{targets.subpkgdir}}"/usr/bin
mv "${{targets.destdir}}"/usr/bin/* "${{targets.subpkgdir}}"/usr/bin

0 comments on commit b0f2cdb

Please sign in to comment.