2016-06-30 22:26:57 +02:00
|
|
|
#!/bin/sh
|
|
|
|
# Repacks the ghostscript tarball to remove old unmaintained libraries.
|
|
|
|
# The SlackBuild would remove them before building anyway, but this way
|
|
|
|
# we don't waste bandwidth and storage on useless junk.
|
|
|
|
|
|
|
|
VERSION=${VERSION:-$(echo ghostscript-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
|
|
|
|
|
|
|
|
tar xf ghostscript-${VERSION}.tar.xz || exit 1
|
|
|
|
mv ghostscript-${VERSION}.tar.xz ghostscript-${VERSION}.tar.xz.orig
|
2018-05-28 21:12:29 +02:00
|
|
|
( cd ghostscript-${VERSION} && rm -rf freetype jpeg lcms2 lcms2art/doc/* libpng libtiff png tiff zlib )
|
2020-03-13 21:15:29 +01:00
|
|
|
# Dump this huge PDF:
|
|
|
|
( cd ghostscript-${VERSION} && find . -name GS9_Color_Management.pdf -exec rm {} \; )
|
2016-06-30 22:26:57 +02:00
|
|
|
tar cf ghostscript-${VERSION}.tar ghostscript-${VERSION}
|
|
|
|
rm -r ghostscript-${VERSION}
|
2018-05-28 21:12:29 +02:00
|
|
|
plzip -9 -n 6 ghostscript-${VERSION}.tar
|
|
|
|
touch -r ghostscript-${VERSION}.tar.xz.orig ghostscript-${VERSION}.tar.lz
|
2016-06-30 22:26:57 +02:00
|
|
|
rm ghostscript-${VERSION}.tar.xz.orig
|