-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fc858d2
commit 52fcb77
Showing
2 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
VERSION="4.1.1" | ||
|
||
cd /tmp | ||
wget https://github.com/mozilla/mozjpeg/archive/refs/tags/v${VERSION}.tar.gz -O mozjpeg.tar.gz | ||
tar xvzf mozjpeg.tar.gz | ||
cd mozjpeg-${VERSION} | ||
mkdir build | ||
cd build | ||
sudo cmake -G"Unix Makefiles" -DPNG_SUPPORTED=OFF ../ | ||
make install | ||
make deb | ||
sudo dpkg -i mozjpeg_*.deb | ||
sudo ln -s /opt/mozjpeg/bin/cjpeg /usr/bin/cjpeg | ||
sudo ln -s /opt/mozjpeg/bin/jpegtran /usr/bin/jpegtran |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
--- | ||
|
||
# Build and install mozjpeg | ||
|
||
- name: Install build packages for mozjpeg | ||
ansible.builtin.apt: | ||
name: | ||
- cmake | ||
- autoconf | ||
- automake | ||
- libtool | ||
- nasm | ||
- make | ||
- pkg-config | ||
|
||
- name: Copy install script | ||
ansible.builtin.copy: | ||
src: installer.sh | ||
dest: /tmp/installer.sh | ||
owner: root | ||
group: root | ||
mode: '0755' | ||
|
||
- name: Build and install mozjpeg | ||
ansible.builtin.command: | ||
cmd: /tmp/installer.sh | ||
chdir: /tmp | ||
changed_when: true | ||
|
||
- name: Remove build packages | ||
ansible.builtin.apt: | ||
name: | ||
- cmake | ||
- autoconf | ||
- automake | ||
- libtool | ||
- nasm | ||
- make | ||
- pkg-config | ||
state: absent | ||
autoremove: true |