-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
5 changed files
with
116 additions
and
1 deletion.
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,61 @@ | ||
FROM alpine:3.13.2 | ||
|
||
ARG version | ||
ENV VERSION=${version} \ | ||
\ | ||
DEV_PKGS="autoconf automake curl gcc git gperf g++ libtool make nasm pkgconfig python3 ragel" \ | ||
PREFIX=/tmp/output \ | ||
PKG_CONFIG_PATH="/tmp/output/lib/pkgconfig" | ||
|
||
RUN apk add --no-cache ${DEV_PKGS} &&\ | ||
# freetype | ||
git clone --recurse-submodules https://gitlab.freedesktop.org/freetype/freetype.git /tmp/freetype -b VER-2-10-4 --depth 1 &&\ | ||
cd /tmp/freetype &&\ | ||
./autogen.sh &&\ | ||
./configure --prefix="${PREFIX}" --disable-static --enable-shared &&\ | ||
make &&\ | ||
make install &&\ | ||
# fribidi | ||
git clone https://github.com/fribidi/fribidi.git /tmp/fribidi -b v1.0.10 --depth 1 &&\ | ||
cd /tmp/fribidi &&\ | ||
./autogen.sh --prefix="${PREFIX}" --disable-static --enable-shared &&\ | ||
make &&\ | ||
make install &&\ | ||
# harfbuzz | ||
git clone https://github.com/harfbuzz/harfbuzz.git /tmp/harfbuzz -b 2.7.4 --depth 1 &&\ | ||
cd /tmp/harfbuzz &&\ | ||
./autogen.sh --prefix="${PREFIX}" --disable-static --enable-shared &&\ | ||
make &&\ | ||
make install &&\ | ||
# libxml2 | ||
git clone https://gitlab.gnome.org/GNOME/libxml2.git /tmp/libxml2 -b v2.9.10 --depth 1 &&\ | ||
cd /tmp/libxml2 &&\ | ||
./autogen.sh --prefix="${PREFIX}" --with-ftp=no --with-http=no --with-python=no &&\ | ||
make &&\ | ||
make install &&\ | ||
# fontconfig | ||
mkdir -p /tmp/fontconfig &&\ | ||
cd /tmp/fontconfig &&\ | ||
curl -sL https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.13.93.tar.gz | tar -zx --strip-components=1 &&\ | ||
./configure --prefix="${PREFIX}" --disable-static --enable-shared --enable-libxml2 &&\ | ||
# https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/272 | ||
for i in doc/*.fncs; do \ | ||
touch -r $i ${i//.fncs/.sgml}; \ | ||
done &&\ | ||
make &&\ | ||
make install &&\ | ||
# libass | ||
git clone https://github.com/libass/libass.git /tmp/libass -b ${VERSION} --depth 1 &&\ | ||
cd /tmp/libass &&\ | ||
./autogen.sh &&\ | ||
./configure --prefix="${PREFIX}" --disable-static --enable-shared &&\ | ||
make &&\ | ||
make install &&\ | ||
rm -rf /tmp/freetype &&\ | ||
rm -rf /tmp/fribidi &&\ | ||
rm -rf /tmp/harfbuzz &&\ | ||
rm -rf /tmp/libxml2 &&\ | ||
rm -rf /tmp/fontconfig &&\ | ||
rm -rf /tmp/libass &&\ | ||
apk del ${DEV_PKGS} &&\ | ||
cp -r ${PREFIX} /output/ |
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 |
---|---|---|
@@ -1 +1,40 @@ | ||
# libass-alpine | ||
# libass-alpine | ||
|
||
Docker image with [libass](https://github.com/libass/libass) built in alpine. | ||
|
||
If you find any outdated package, please report in [issues](https://github.com/kyori19/libass-alpine/issues). | ||
|
||
## Tags | ||
|
||
* `latest`: Latest stable version | ||
|
||
## Usage | ||
|
||
```Dockerfile | ||
FROM kyori/libass-alpine:latest AS libass | ||
|
||
FROM alpine:3.13.2 | ||
|
||
COPY --from=libass /output/ / | ||
|
||
# If you placed files to other than `/`, add this line | ||
ENV PKG_CONFIG_PATH=${YOUR_INSTALL_PATH}/lib/pkgconfig | ||
``` | ||
|
||
## License | ||
|
||
```LICENSE | ||
Copyright 2021 kyori19 | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
``` |
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,8 @@ | ||
services: | ||
libass: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
args: | ||
version: 0.15.0 | ||
image: kyori/libass-alpine |
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,3 @@ | ||
#!/bin/sh | ||
|
||
docker build --build-arg version=${DOCKER_TAG} -f ${DOCKERFILE_PATH} -t ${IMAGE_NAME} . |
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,4 @@ | ||
#!/bin/sh | ||
|
||
docker tag ${IMAGE_NAME} ${DOCKER_REPO}:latest | ||
docker push ${DOCKER_REPO}:latest |