mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
127 lines
6.4 KiB
YAML
127 lines
6.4 KiB
YAML
app-id: com.yacreader.YACReader
|
|
runtime: org.kde.Platform
|
|
runtime-version: "5.15-21.08"
|
|
sdk: org.kde.Sdk
|
|
command: YACReader
|
|
finish-args:
|
|
- --share=ipc
|
|
- --socket=fallback-x11
|
|
- --socket=wayland
|
|
- --share=network
|
|
- --device=dri
|
|
- --filesystem=xdg-documents
|
|
- --filesystem=xdg-pictures
|
|
cleanup:
|
|
- /bin/gn
|
|
- /include
|
|
- /lib/cmake
|
|
- /lib/pkgconfig
|
|
- /lib/systemd
|
|
- /share/doc
|
|
- /share/man
|
|
- "*.a"
|
|
- "*.la"
|
|
modules:
|
|
- name: yacreader
|
|
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=yacreader
|
|
buildsystem: qmake
|
|
config-opts:
|
|
- CONFIG+=unarr pdfium server_bundled
|
|
install-rule: null
|
|
make-install-args:
|
|
- sub-YACReader-install_subtargets
|
|
- sub-YACReaderLibrary-install_subtargets
|
|
post-install:
|
|
- mv "$FLATPAK_DEST"/share/applications/{YACReader,com.yacreader.YACReader}.desktop
|
|
- mv "$FLATPAK_DEST"/share/applications/{YACReaderLibrary,com.yacreader.YACReader.YACReaderLibrary}.desktop
|
|
- mv "$FLATPAK_DEST"/share/icons/hicolor/scalable/apps/{YACReader,com.yacreader.YACReader}.svg
|
|
- mv "$FLATPAK_DEST"/share/icons/hicolor/scalable/apps/{YACReaderLibrary,com.yacreader.YACReader.YACReaderLibrary}.svg
|
|
- sed -i -e 's/^Categories=\(.*\)$/Categories=Office;\1/' -e 's/^Icon=.*$/Icon=com.yacreader.YACReader/' "$FLATPAK_DEST"/share/applications/com.yacreader.YACReader.desktop
|
|
- sed -i -e 's/^Categories=\(.*\)$/Categories=Office;\1/' -e 's/^Icon=.*$/Icon=com.yacreader.YACReader.YACReaderLibrary/' "$FLATPAK_DEST"/share/applications/com.yacreader.YACReader.YACReaderLibrary.desktop
|
|
- install -D -m644 com.yacreader.YACReader.appdata.xml "$FLATPAK_DEST"/share/metainfo/com.yacreader.YACReader.appdata.xml
|
|
sources:
|
|
- type: git
|
|
url: https://github.com/YACReader/yacreader.git
|
|
tag: 9.8.2.2106204
|
|
commit: 7394944dccd1ee1f9dd8247e878f6ff8a055b7b8
|
|
- type: file
|
|
path: com.yacreader.YACReader.appdata.xml
|
|
modules:
|
|
- name: unarr
|
|
buildsystem: cmake
|
|
sources:
|
|
- type: git
|
|
url: https://github.com/selmf/unarr.git
|
|
commit: cf4deedfdd2b815ae2ad0f24cfda72c3d8083d14
|
|
- name: pdfium
|
|
buildsystem: simple
|
|
build-commands:
|
|
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=libpdfium-nojs
|
|
# Fix visibilty for system Freetype
|
|
- git -C pdfium/build cherry-pick -n bfd6ff0
|
|
# Patch abseil build to be static
|
|
- cd "$FLATPAK_BUILDER_BUILDDIR/pdfium/third_party/abseil-cpp"
|
|
- sed -i -e 's/component(/static_library(/' -e 's/is_component_build(/false/' pdfium/third_party/abseil-cpp/BUILD.gn
|
|
# Use system provided icu library (unbundling)
|
|
- mkdir -p pdfium/third_party/icu
|
|
- ln -sf ../../build/linux/unbundle/icu.gn pdfium/third_party/icu/BUILD.gn
|
|
# Download and decode shim header script needed to unbundle icu (gittiles is weird)
|
|
- mkdir -p pdfium/tools/generate_shim_headers
|
|
- base64 --decode generate_shim_headers.py > pdfium/tools/generate_shim_headers/generate_shim_headers.py
|
|
# Create fake gclient_args.gni file to satisfy include list for build/config/compiler/compiler.gni
|
|
- touch pdfium/build/config/gclient_args.gni
|
|
# Exclude test fonts from build
|
|
- sed -i '/"\/\/third_party\/test_fonts",/s/^/#/g' pdfium/testing/BUILD.gn
|
|
# Build
|
|
- gn --root=pdfium gen pdfium/out/Release --args="is_clang=false use_sysroot=false is_debug=false symbol_level=0 pdf_enable_v8=false pdf_enable_xfa=false treat_warnings_as_errors=false use_system_libjpeg=true use_system_zlib=true pdf_bundle_freetype=false use_system_freetype=true use_system_lcms2=true use_system_libpng=true use_custom_libcxx=false pdf_is_standalone=true use_system_libopenjpeg2=true is_component_build=true use_gold=false"
|
|
- ninja -C pdfium/out/Release pdfium
|
|
- sed -e 's/@VERSION@/5005/g' -e 's#^\s*prefix\s*=.*$#prefix='"$FLATPAK_DEST"'#' -i libpdfium.pc
|
|
# Install
|
|
- install -D -m644 pdfium/LICENSE "$FLATPAK_DEST/share/licenses/pdfium/LICENSE"
|
|
- install -D pdfium/public/*.h --target-directory="$FLATPAK_DEST/include/pdfium"
|
|
- install -D pdfium/public/cpp/* --target-directory="$FLATPAK_DEST/include/pdfium/cpp"
|
|
- install -D pdfium/docs/* --target-directory="$FLATPAK_DEST/share/doc/pdfium"
|
|
- install -Dm755 pdfium/out/Release/libpdfium.so --target-directory="$FLATPAK_DEST/lib"
|
|
- install -Dm644 libpdfium.pc --target-directory="$FLATPAK_DEST/lib/pkgconfig"
|
|
sources:
|
|
- type: git
|
|
url: https://pdfium.googlesource.com/pdfium
|
|
# curl 'https://omahaproxy.appspot.com/linux?channel=stable' | cut -d'.' -f 3
|
|
branch: chromium/5005
|
|
commit: 62ad9af8a9f9494645b659674b64bb51775cde05
|
|
dest: pdfium
|
|
- type: git
|
|
url: https://chromium.googlesource.com/chromium/src/build.git
|
|
# awk '/build_revision/ {print substr($2,2,40)}' pdfium/DEPS
|
|
commit: ee10d9605d3bc45e72defd25ce97562e80693655
|
|
dest: pdfium/build
|
|
- type: git
|
|
url: https://chromium.googlesource.com/chromium/src/third_party/abseil-cpp
|
|
# awk '/abseil_revision/ {print substr($2,2,40)}' pdfium/DEPS
|
|
branch: a13888fac08a45c938255c7d9d59b1640f1940e0
|
|
dest: pdfium/third_party/abseil-cpp
|
|
- type: file
|
|
url: https://chromium.googlesource.com/chromium/src/+/master/tools/generate_shim_headers/generate_shim_headers.py?format=TEXT
|
|
dest-filename: generate_shim_headers.py
|
|
sha256: f95f0d29e3e12b22a7b86455265c87bc0219a25c09a7fa160d34b608992ea6da
|
|
- type: file
|
|
url: https://aur.archlinux.org/cgit/aur.git/plain/libpdfium.pc?h=libpdfium-nojs
|
|
dest-filename: libpdfium.pc
|
|
sha256: 4e8cf32c09568ae4c59244f0a221eee8f87ea4a31ddb31f796a1d818c967d477
|
|
modules:
|
|
- name: gn
|
|
buildsystem: simple
|
|
build-options:
|
|
env:
|
|
CC: gcc
|
|
CXX: g++
|
|
build-commands:
|
|
- ./build/gen.py
|
|
- ninja -C out
|
|
- install -D out/gn "$FLATPAK_DEST/bin/gn"
|
|
sources:
|
|
- type: git
|
|
url: https://gn.googlesource.com/gn
|
|
commit: 80a40b07305373617eba2d5878d353532af77da3
|
|
disable-shallow-clone: true
|