Package Details: pdf4qt-bin 1.3.6-2

Git Clone URL: https://aur.archlinux.org/pdf4qt-bin.git (read-only, click to copy)
Package Base: pdf4qt-bin
Description: Open source PDF editor
Upstream URL: https://jakubmelka.github.io/
Licenses: LGPL3
Conflicts: pdf4qt, pdf4qt-bin, pdf4qt-git
Provides: pdf4qt
Submitter: raffaem
Maintainer: None
Last Packager: raffaem
Votes: 2
Popularity: 0.001277
First Submitted: 2023-09-21 04:01 (UTC)
Last Updated: 2023-11-28 10:15 (UTC)

Pinned Comments

raffaem commented on 2024-01-20 02:26 (UTC)

Binaries for 1.3.7 have not been released: https://github.com/JakubMelka/PDF4QT/issues/157

Latest Comments

ZorinArch commented on 2024-01-29 16:18 (UTC) (edited on 2024-01-29 16:18 (UTC) by ZorinArch)

@zxp19821005 million thanks, Why package built from AppImage is bigger than package created by pdf4qt. does it need some clean up or what?

zxp19821005 commented on 2024-01-29 10:11 (UTC)

@ZorinArch Notice that,there were for .desktop files,I've just modified one.

zxp19821005 commented on 2024-01-29 09:58 (UTC)

@ZorinArch I've build from the two files,and run well.

PKGBUILD

pkgname=pdf4qt-bin
_pkgname=Pdf4QtViewerProfi
pkgdesc="Open source PDF editor (binary release)"
pkgver=1.3.7
filever="0629a71"
pkgrel=1
arch=('x86_64')
url="https://github.com/JakubMelka/PDF4QT"
license=('LGPL-3.0')
conflicts=("${pkgname%-bin}")
provides=("${pkgname%-bin}")
depends=(
    'openssl'
    'libjpeg-turbo'
    'qt6-speech'
    'qt6-svg'
    'qt6-base'
    'openjpeg2'
    'onetbb'
    'lcms2'
    'freetype2'
)
makedepends=(
    'squashfuse'
)
options=('!strip')
source=(
    "${pkgname%-bin}-${pkgver}.AppImage::$url/releases/download/v$pkgver/PDF4QT_Viewer_Profi-$filever-x86_64.AppImage"
    "${pkgname%-bin}.sh"
)
sha256sums=('1ecb7815bc0182901b6a03b5a97915f666c5d01baf73dab27ccbe2fea5b866f0'
            'd698b38303650c8323cab1eecf30f23b1cd81987e36bb12781c43a04aceff44e')
build() {
    sed -e "s|@appname@|${pkgname%-bin}|g" \
        -e "s|@runname@|${_pkgname}|g" \
        -i "${srcdir}/${pkgname%-bin}.sh"
    chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage"
    "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" --appimage-extract > /dev/null
    sed "s|${_pkgname}|${pkgname%-bin} %U|g;s|io.github.JakubMelka.Pdf4qt|${pkgname%-bin}|g" \
        -i "${srcdir}/squashfs-root/io.github.JakubMelka.Pdf4qt.desktop"
}
package() {
    install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
    install -Dm755 "${srcdir}/squashfs-root/usr/bin/Pdf"* -t "${pkgdir}/opt/${pkgname%-bin}/bin"
    install -Dm755 "${srcdir}/squashfs-root/usr/bin/qt.conf" -t "${pkgdir}/opt/${pkgname%-bin}/bin"
    cp -r "${srcdir}/squashfs-root/usr/"{lib,plugins,share,translations} "${pkgdir}/opt/${pkgname%-bin}"
    install -Dm644 "${srcdir}/squashfs-root/io.github.JakubMelka.Pdf4qt.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"
    install -Dm644 "${srcdir}/squashfs-root/io.github.JakubMelka.Pdf4qt.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/${pkgname%-bin}.svg"
}

pdf4qt.sh

#!/bin/sh
set -e
_APPDIR="/opt/@appname@"
_RUNNAME="${_APPDIR}/bin/@runname@"
export PATH="${_APPDIR}/bin:${PATH}"
export LD_LIBRARY_PATH="${_APPDIR}/lib:${LD_LIBRARY_PATH}"
export QT_PLUGIN_PATH="${_APPDIR}/plugins:${QT_PLUGIN_PATH}"
cd "${_APPDIR}"
exec "${_RUNNAME}" "$@" || exit $?

ZorinArch commented on 2024-01-27 09:15 (UTC)

@raffaem This code will build pdf4qt binary from appimage. I successfully build the package but failed to install. check the code and fix the problem.

_pkgname=pdf4qt
pkgname="${_pkgname}-bin"
pkgdesc="Open source PDF editor (binary release)"
pkgver=1.3.7
filever="0629a71"
pkgrel=1
arch=('x86_64')
url="https://github.com/JakubMelka/PDF4QT"
license=('LGPL3')
depends=('openssl'
    'libjpeg-turbo'
    'qt6-speech'
    'qt6-svg'
    'qt6-base'
    'openjpeg2'
    'onetbb'
    'lcms2'
    'freetype2'
    'zlib'
    'glibc'
    'gcc-libs'
    )
makedepends=('fuse2')
conflicts=("${_pkgname}")
provides=("${_pkgname}")
_appimage="${_pkgname}_linux_$CARCH-$pkgver.AppImage"
source_x86_64=("$_appimage::$url/releases/download/v$pkgver/PDF4QT_Viewer_Profi-$filever-x86_64.AppImage")
sha256sums_x86_64=('1ecb7815bc0182901b6a03b5a97915f666c5d01baf73dab27ccbe2fea5b866f0')

_fix_permissions() (
  target=$1

  if [[ -L "$target" ]]; then
    return 0
  fi

  if [[ -d "$target" || -x "$target" ]]; then
    chmod 755 "$target"
    return 0
  fi

  if [[ -f "$target" ]]; then
    chmod 644 "$target"
    return 0
  fi

  echo "Unrecognizable filesystem entry: $target" >&2
  return 1
)

prepare() {
# Extract the AppImage
  chmod +x "./$_appimage"
  "./$_appimage" --appimage-extract
}

package() {
# Create folders
  mkdir -p "$pkgdir/usr/share" "$pkgdir/usr/bin"

# Install
  cd squashfs-root
  install -Dm644 usr/share/icons/hicolor/128x128/apps/* -t "$pkgdir/usr/share/icons/hicolor/128x128/apps"
  install -Dm644 usr/share/icons/hicolor/scalable/apps/* -t "$pkgdir/usr/share/icons/hicolor/scalable/apps"
  install -Dm644 usr/share/applications/* -t "$pkgdir/usr/share/applications"
  install -Dm644 usr/bin/* -t "$pkgdir/usr/bin"
  install -Dm644 usr/lib/*.so* -t "$pkgdir/usr/lib"
  install -Dm644 usr/lib/pdf4qt/*.so* -t "$pkgdir/usr/lib/pdf4qt"
  rm -dr usr AppRun io.github.JakubMelka.Pdf4qt.desktop io.github.JakubMelka.Pdf4qt.svg

# Fix permissions
  find "$pkgdir"| while read -r target; do
    _fix_permissions "$target"
  done
}

raffaem commented on 2024-01-20 02:26 (UTC)

Binaries for 1.3.7 have not been released: https://github.com/JakubMelka/PDF4QT/issues/157