summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Leontiev2013-08-23 16:58:29 +0400
committerAnton Leontiev2015-02-15 07:48:01 +0300
commit45a35169ae73b752954f5d391da2df9c6c75a207 (patch)
tree178073346821b7d3ddbc66b94c8a196d01551a78
downloadaur-45a35169ae73b752954f5d391da2df9c6c75a207.tar.gz
Initial commit
-rw-r--r--.SRCINFO21
-rw-r--r--.gitignore6
-rw-r--r--PKGBUILD31
-rw-r--r--djvubind-1.2.1-compress.patch12
4 files changed, 70 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..d0e2800a5664
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = djvubind
+ pkgdesc = A tool to create highly compressed djvu files with ocr, metadata, and bookmarks
+ pkgver = 1.2.1
+ pkgrel = 1
+ url = http://code.google.com/p/djvubind/
+ arch = any
+ license = GPL3
+ makedepends = python
+ depends = python
+ depends = djvulibre
+ depends = imagemagick
+ depends = tesseract
+ optdepends = minidjvu: for higher black-and-white compression
+ optdepends = cuneiform: an alternative OCR system
+ source = http://djvubind.googlecode.com/files/djvubind-1.2.1.tar.bz2
+ source = djvubind-1.2.1-compress.patch
+ md5sums = 027ee90fec7d6ee5ee921eebfae1dc2d
+ md5sums = 6fb6019bbc7e0171241399a145ef0b25
+
+pkgname = djvubind
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..e6b6b4b8077d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+*.tar.gz
+*.tar.bz2
+*.tar.xz
+*.tar.lz
+src/
+pkg/ \ No newline at end of file
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..48416b914427
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,31 @@
+# Contributor: Anton Leontiev <bunder /at/ t-25.ru>
+pkgname=djvubind
+pkgver=1.2.1
+pkgrel=1
+pkgdesc='A tool to create highly compressed djvu files with ocr, metadata, and bookmarks'
+arch=('any')
+url='http://code.google.com/p/djvubind/'
+license=('GPL3')
+depends=('python' 'djvulibre' 'imagemagick' 'tesseract')
+makedepends=('python')
+optdepends=('minidjvu: for higher black-and-white compression'
+ 'cuneiform: an alternative OCR system')
+source=(http://djvubind.googlecode.com/files/$pkgname-$pkgver.tar.bz2
+ djvubind-1.2.1-compress.patch)
+md5sums=('027ee90fec7d6ee5ee921eebfae1dc2d'
+ '6fb6019bbc7e0171241399a145ef0b25')
+
+check() {
+ cd "$srcdir/$pkgname-$pkgver/unittests"
+ python3 ./unittests.py
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ for i in ../*.patch; do
+ patch -i "$i" -p1
+ done
+
+ python3 ./setup.py install --root "$pkgdir"
+}
diff --git a/djvubind-1.2.1-compress.patch b/djvubind-1.2.1-compress.patch
new file mode 100644
index 000000000000..c7dce8737747
--- /dev/null
+++ b/djvubind-1.2.1-compress.patch
@@ -0,0 +1,12 @@
+diff -aurN djvubind-1.2.1-orig/djvubind/encode.py djvubind-1.2.1/djvubind/encode.py
+--- djvubind-1.2.1-orig/djvubind/encode.py 2013-04-18 03:29:47.880072281 +0000
++++ djvubind-1.2.1/djvubind/encode.py 2013-04-18 03:30:51.219398193 +0000
+@@ -131,7 +131,7 @@
+ #utils.execute('convert -opaque black "{0}" "temp_graphics.tif"'.format(infile))
+ #utils.execute('convert +opaque black "{0}" "temp_textual.tif"'.format(infile))
+ utils.execute('convert "{0}" -opaque black "temp_graphics.tif"'.format(infile))
+- utils.execute('convert "{0}" +opaque black -monochrome "temp_textual.tif"'.format(infile))
++ utils.execute('convert "{0}" +opaque black -monochrome -compress lzw "temp_textual.tif"'.format(infile))
+
+ # Encode the bitonal image.
+ self._cjb2('temp_textual.tif', 'enc_bitonal_out.djvu', dpi)