mirror of
https://github.com/archlinux/aur.git
synced 2026-02-11 07:34:23 +01:00
[pdfsizeopt,multivalent-pdf-tools] Tool to optimise the size of PDFs, and
missing dependency git-svn-id: svn+ssh://scm.narf.ssji.net/svn/archlinux-packages@314 df209809-8e4a-0410-9a64-c169741eb0fc
This commit is contained in:
commit
06d0c4ede6
3 changed files with 97 additions and 0 deletions
20
.SRCINFO
Normal file
20
.SRCINFO
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
pkgbase = pdfsizeopt-svn
|
||||
pkgdesc = PDF file size optimizer
|
||||
pkgver = 221
|
||||
pkgrel = 2
|
||||
url = https://code.google.com/p/pdfsizeopt
|
||||
arch = any
|
||||
license = GPL2
|
||||
makedepends = subversion
|
||||
depends = python2>=2.4
|
||||
depends = ghostscript>=8.61
|
||||
depends = sam2p
|
||||
depends = tif22pnm
|
||||
optdepends = multivalent-pdf-tools: to optimise cross reference table and object serialisation [use --use-multivalent=true]
|
||||
optdepends = pngout: to optimise the size of PNG parts [use --use-jbig2=true]
|
||||
optdepends = jbig2enc: to manage JBIG2 parts [use --use-pngout=true]
|
||||
source = archpackage.patch
|
||||
md5sums = ee0d8cd8232c42592791f470301252a1
|
||||
|
||||
pkgname = pdfsizeopt-svn
|
||||
|
||||
41
PKGBUILD
Normal file
41
PKGBUILD
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
# Maintainer: Olivier Mehani <shtrom-aur@ssji.net>
|
||||
# $Id$
|
||||
pkgname=pdfsizeopt-svn
|
||||
pkgver=171
|
||||
pkgrel=1
|
||||
pkgdesc="PDF file size optimizer"
|
||||
arch=(any)
|
||||
url="https://code.google.com/p/pdfsizeopt"
|
||||
license=('GPL2')
|
||||
groups=()
|
||||
depends=("python2>=2.4" "ghostscript>=8.61" "sam2p" "tif22pnm")
|
||||
makedepends=('subversion')
|
||||
optdepends=("multivalent-pdf-tools: to optimise cross reference table and object serialisation [use --use-multivalent=true]"
|
||||
"pngout: to optimise the size of PNG parts [use --use-jbig2=true]"
|
||||
"jbig2enc: to manage JBIG2 parts [use --use-pngout=true]")
|
||||
source=("archpackage.patch")
|
||||
|
||||
_svntrunk=http://pdfsizeopt.googlecode.com/svn/trunk/
|
||||
_svnmod=pdfsizeopt
|
||||
|
||||
build() {
|
||||
cd "$srcdir"
|
||||
msg "Connecting to SVN server...."
|
||||
|
||||
if [[ -d "$_svnmod/.svn" ]]; then
|
||||
(cd "$_svnmod" && svn up -r "$pkgver")
|
||||
else
|
||||
svn co "$_svntrunk" --config-dir ./ -r "$pkgver" "$_svnmod"
|
||||
fi
|
||||
|
||||
msg "SVN checkout done or server timeout"
|
||||
cd $_svnmod
|
||||
patch -p0 < $srcdir/archpackage.patch
|
||||
}
|
||||
|
||||
package() {
|
||||
install -D -m 755 $srcdir/pdfsizeopt/pdfsizeopt.py $pkgdir/usr/bin/pdfsizeopt
|
||||
}
|
||||
|
||||
# vim:set ts=2 sw=2 et:
|
||||
md5sums=('0c2bfe7f87cfcdc6774015c0d6fa15f7')
|
||||
36
archpackage.patch
Normal file
36
archpackage.patch
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
Index: pdfsizeopt.py
|
||||
===================================================================
|
||||
--- pdfsizeopt.py (revision 171)
|
||||
+++ pdfsizeopt.py (working copy)
|
||||
@@ -1,4 +1,4 @@
|
||||
-#! /usr/bin/python2.4
|
||||
+#! /usr/bin/python2
|
||||
#
|
||||
# pdfsizeopt.py: do various PDF size optimizations
|
||||
# by pts@fazekas.hu at Sun Mar 29 13:42:05 CEST 2009
|
||||
@@ -6712,7 +6712,11 @@
|
||||
Pathname to Multivalent.jar or None.
|
||||
"""
|
||||
assert os.sep not in file_name
|
||||
- multivalent_jar = FindOnPath(file_name)
|
||||
+ # XXX ArchLinux packaging-specific
|
||||
+ multivalent_jar = "/usr/share/java/multivalent/%s" % file_name
|
||||
+ if not os.path.isfile(multivalent_jar):
|
||||
+ # XXX resume normal operation
|
||||
+ multivalent_jar = FindOnPath(file_name)
|
||||
if multivalent_jar is None:
|
||||
slash_file_name = os.sep + file_name
|
||||
for item in os.getenv('CLASSPATH', '').split(os.pathsep):
|
||||
@@ -6865,9 +6869,9 @@
|
||||
argv.append('--help')
|
||||
|
||||
try:
|
||||
- use_pngout = True
|
||||
- use_jbig2 = True
|
||||
- use_multivalent = True
|
||||
+ use_pngout = False
|
||||
+ use_jbig2 = False
|
||||
+ use_multivalent = False
|
||||
do_optimize_images = True
|
||||
do_optimize_objs = True
|
||||
do_unify_fonts = True
|
||||
Loading…
Add table
Reference in a new issue