wok-current view ghostscript/receipt @ rev 25672
patch tazpkg, upgrade core pkgs first
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Sun Mar 03 17:58:42 2024 +0000 (5 months ago) |
parents | b826db0e2a51 |
children | 735ee8b10711 |
line source
1 # SliTaz package receipt.
3 PACKAGE="ghostscript"
4 VERSION="9.55.0"
5 CATEGORY="office"
6 SHORT_DESC="Ghostscript tools and utilities."
7 MAINTAINER="jozee@slitaz.org"
8 LICENSE="AGPL"
9 WEB_SITE="https://www.ghostscript.com/"
11 TARBALL="$PACKAGE-$VERSION.tar.xz"
12 WGET_URL="https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${VERSION//./}/$TARBALL"
14 DEPENDS="cups expat fontconfig freetype gnutls gtk+ jasper
15 jbig2dec jpeg libgcrypt libgpg-error libpng tiff xorg-libICE
16 xorg-libSM xorg-libX11 xorg-libXau xorg-libXdmcp xorg-libXext
17 xorg-libXt zlib"
18 # build depends are optional ; ghostscripts still build but does not compile in cups support
19 BUILD_DEPENDS="cairo-dev cups-dev expat-dev fontconfig-dev freetype-dev
20 gnutls-dev gtk+-dev jasper-dev jbig2dec jpeg-dev libgcrypt-dev
21 libgpg-error-dev libpng-dev tiff-dev zlib-dev"
23 # What is the latest version available today?
24 current_version()
25 {
26 wget -O - https://www.ghostscript.com/releases/index.html 2>/dev/null | \
27 sed '/latest release/!d;s|.*script ||;s| .*||;q'
28 }
30 # Rules to configure and make the package.
31 compile_rules()
32 {
33 # force it to use system-libs
34 rm -rf jpeg libpng zlib jasper expat
36 # --disable-compile-inits is needed for linking with system-zlib
37 ./configure \
38 --prefix=/usr \
39 --infodir=/usr/share/info \
40 --mandir=/usr/share/man \
41 --disable-compile-inits \
42 --enable-cups \
43 --enable-dynamic \
44 --enable-gtk \
45 --with-fontpath="/usr/share/fonts/truetype/:/usr/share/fonts" \
46 --with-system-libtiff \
47 $CONFIGURE_ARGS &&
48 make $MAKEFLAGS &&
49 make install soinstall DESTDIR=$DESTDIR
50 }
52 # Rules to gen a SliTaz package suitable for Tazpkg.
53 genpkg_rules()
54 {
55 mkdir -p $fs/usr/share
56 mkdir -p $fs/usr/lib
58 cp -a $install/usr/bin $fs/usr
59 cp -a $install/usr/lib $fs/usr
60 cp -a $install/usr/share/$PACKAGE $fs/usr/share
62 # if cups-dev installed
63 # 9.55.0: not created
64 # cp -a $install/usr/share/cups $fs/usr/share
65 # cp -a $install/etc $fs
67 # Remove documentation and examples
68 rm -rf $fs/usr/share/$PACKAGE/$VERSION/doc
69 rm -rf $fs/usr/share/$PACKAGE/$VERSION/examples
71 # Remove CMAPs (Non-free : not covered under GPL) :
72 # moved to non-free package get-ghostscript-CMAP
73 rm -rf $fs/usr/share/$PACKAGE/$VERSION/Resource/CMap/*
75 # already compiled as a shared lib; gsc is same as gs
76 rm -rf $fs/usr/bin/gs
77 }
79 post_install()
80 {
81 ln -sf /usr/bin/gsc "$1/usr/bin/gs"
82 }