Files
linamh/app-text/pdfsam/pdfsam-6.0.1.ebuild
T
2026-06-29 21:18:48 +02:00

65 lines
1.4 KiB
Bash

# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit desktop xdg
MY_PN="${PN}-basic"
MY_P="${MY_PN}-${PV}-linux-x64"
DESCRIPTION="Free open source tool to split and merge PDF documents"
HOMEPAGE="https://pdfsam.org/ https://github.com/torakiki/pdfsam"
SRC_URI="https://github.com/torakiki/${PN}/releases/download/v${PV}/${MY_P}.tar.gz"
S="${WORKDIR}/${MY_P}"
LICENSE="AGPL-3"
SLOT="0"
KEYWORDS="-* ~amd64"
RESTRICT="strip"
RDEPEND="
dev-java/java-config
dev-java/openjfx-bin:25
dev-libs/glib:2
media-libs/alsa-lib
virtual/jre:25
x11-libs/cairo
x11-libs/gdk-pixbuf
x11-libs/gtk+:3
x11-libs/libX11
x11-libs/libXext
x11-libs/libXi
x11-libs/libXrender
x11-libs/libXtst
x11-libs/pango
"
src_compile() { :; }
src_prepare() {
default
sed -i \
-e 's|^MODULEPATH=.*|MODULEPATH="${PDFSAM_JAVAFX_PATH:-/usr/share/openjfx-bin-25/lib}:$BASEDIR/lib"|' \
bin/pdfsam.sh || die
}
src_install() {
local dir="/opt/${MY_PN}"
insinto "${dir}"
doins -r bin doc lib splash.png LICENSE.txt
fperms +x "${dir}/bin/pdfsam.sh"
dosym "../..${dir}/bin/pdfsam.sh" "/usr/bin/${MY_PN}"
newicon splash.png "${MY_PN}.png"
make_desktop_entry "${MY_PN}" "PDFsam Basic" "${MY_PN}" "Office;Viewer;"
}
pkg_postinst() {
elog "PDFsam Basic now uses the system Java selected by java-config."
elog "JavaFX is provided by dev-java/openjfx-bin:25."
}