summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMuflone2017-11-01 22:10:14 +0100
committerMuflone2017-11-01 22:10:14 +0100
commit0ab91e9de08386190bd4ac1dd5a85e94c6bc3a4e (patch)
tree0892b7bb8a5cf420147dd7702797d3e40d49e947
parent31c813fd5dad22dc82f53cbe91ee2b188c486732 (diff)
downloadaur-html2pdf.tar.gz
Updated package html2pdf 1.0-2
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD62
-rw-r--r--missing-app-variable.patch12
-rw-r--r--missing-close-event.patch23
-rw-r--r--python2.patch19
5 files changed, 111 insertions, 18 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 727d946a71f..2f7b996eb28 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,23 @@
+# Generated by mksrcinfo v8
+# Wed Nov 1 21:09:08 UTC 2017
pkgbase = html2pdf
- pkgdesc = An gui HTML to PDF Converter 1.0
+ pkgdesc = A GTK+ HTML to PDF converter
pkgver = 1.0
- pkgrel = 1
+ pkgrel = 2
url = https://code.google.com/archive/p/foxoman/
arch = any
license = GPL3
depends = wkhtmltopdf
- depends = python2
depends = python2-gobject
depends = python2-notify
source = https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/foxoman/html2pdf_1.0-1_all.deb
+ source = python2.patch
+ source = missing-app-variable.patch
+ source = missing-close-event.patch
sha512sums = e7b7903082058d7bc100b97071a51d10def4f4dd13b9d5410d1fbc73a75a91fe578e6be2fa104337f0625960162e5af7b2b030b0c0797c83e15e3965a23a4d03
+ sha512sums = 010146431152bed32596eb0b9ded0453d664338f869307f667fb0cf2fed05c8c80483017dc957a7b069c7d12a4c278582bc225531581e757bda8a0cb55ea18d6
+ sha512sums = 8b5ea7c2fb207771acb07f565b3037107d580a70759a983bcbca3d27b60795dbc5fa03c3817b61ba3e01bc44789f5df41b5ffe479cfb895a515249fa43ecb298
+ sha512sums = afa20239a206ff4b1b41f4bba7a9ec3c54196342ad3c62a42d37fcd3ae9ad746165a8a08931bf4536d2e428b15384dda1dc03a12f285ad5016fa77d159c3f9f2
pkgname = html2pdf
diff --git a/PKGBUILD b/PKGBUILD
index 84de969f7de..8e37a3eb630 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,22 +1,54 @@
-# Maintainer: David Manouchehri
+# Maintainer: Muflone http://www.muflone.com/contacts/english/
+# Contributor: David Manouchehri
pkgname=html2pdf
-pkgdesc="An gui HTML to PDF Converter 1.0 "
-url="https://code.google.com/archive/p/foxoman/"
-license=('GPL3')
pkgver=1.0
-pkgrel=1
-source=("https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/foxoman/${pkgname}_${pkgver}-${pkgrel}_all.deb")
-depends=('wkhtmltopdf' 'python2' 'python2-gobject' 'python2-notify' )
-sha512sums=('e7b7903082058d7bc100b97071a51d10def4f4dd13b9d5410d1fbc73a75a91fe578e6be2fa104337f0625960162e5af7b2b030b0c0797c83e15e3965a23a4d03')
+pkgrel=2
+_filerel=1
+pkgdesc="A GTK+ HTML to PDF converter"
arch=('any')
+url="https://code.google.com/archive/p/foxoman/"
+license=('GPL3')
+depends=('wkhtmltopdf' 'python2-gobject' 'python2-notify')
+source=("https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/foxoman/${pkgname}_${pkgver}-${_filerel}_all.deb"
+ "python2.patch"
+ "missing-app-variable.patch"
+ "missing-close-event.patch")
+sha512sums=('e7b7903082058d7bc100b97071a51d10def4f4dd13b9d5410d1fbc73a75a91fe578e6be2fa104337f0625960162e5af7b2b030b0c0797c83e15e3965a23a4d03'
+ '010146431152bed32596eb0b9ded0453d664338f869307f667fb0cf2fed05c8c80483017dc957a7b069c7d12a4c278582bc225531581e757bda8a0cb55ea18d6'
+ '8b5ea7c2fb207771acb07f565b3037107d580a70759a983bcbca3d27b60795dbc5fa03c3817b61ba3e01bc44789f5df41b5ffe479cfb895a515249fa43ecb298'
+ 'afa20239a206ff4b1b41f4bba7a9ec3c54196342ad3c62a42d37fcd3ae9ad746165a8a08931bf4536d2e428b15384dda1dc03a12f285ad5016fa77d159c3f9f2')
-package() {
- cd "${srcdir}/"
- ar x "${pkgname}_${pkgver}-${pkgrel}_all.deb"
- tar xvf "data.tar.gz"
- sed -i "s/^python /python2 /" "${srcdir}/usr/bin/html2pdf"
- cp -rp usr "${pkgdir}"
+prepare() {
+ ar x "${pkgname}_${pkgver}-${_filerel}_all.deb"
+ tar xvf "data.tar.gz"
+ # Fix python 2.x
+ patch -p0 -i "python2.patch"
+ # Fix for missing APP variable
+ patch -p0 -i "missing-app-variable.patch"
+ # Fix for missing closing handler
+ patch -p0 -i "missing-close-event.patch"
+ # Fix inconsitent spaces and tabs
+ sed -i 's@\t@ @' "usr/share/${pkgname}/${pkgname}.py"
}
-# vim:set et sw=2 sts=2 tw=80:
+package() {
+ cd "usr"
+ # Install executable files
+ install -m 755 -d "${pkgdir}/usr/bin"
+ install -m 755 -t "${pkgdir}/usr/bin" "bin/${pkgname}"
+ # Install launcher file
+ cd "share"
+ install -m 755 -d "${pkgdir}/usr/share/applications"
+ install -m 755 -t "${pkgdir}/usr/share/applications" "applications/${pkgname}.desktop"
+ # Install shared files
+ install -m 755 -d "${pkgdir}/usr/share/${pkgname}"
+ install -m 755 -t "${pkgdir}/usr/share/${pkgname}" \
+ "${pkgname}/about.glade" "${pkgname}/${pkgname}.png" \
+ "${pkgname}/${pkgname}.py" "${pkgname}/ui.glade"
+ # Install icons
+ install -m 755 -d "${pkgdir}/usr/share/icons"
+ ln -s "../${pkgname}/${pkgname}.png" "${pkgdir}/usr/share/icons/${pkgname}.png"
+ install -m 755 -d "${pkgdir}/usr/share/pixmaps"
+ ln -s "../${pkgname}/${pkgname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
+}
diff --git a/missing-app-variable.patch b/missing-app-variable.patch
new file mode 100644
index 00000000000..df295ca1cf3
--- /dev/null
+++ b/missing-app-variable.patch
@@ -0,0 +1,12 @@
+diff -Naur usr.orig/share/html2pdf/html2pdf.py usr/share/html2pdf/html2pdf.py
+--- usr.orig/share/html2pdf/html2pdf.py 2010-01-19 18:26:38.000000000 +0100
++++ usr/share/html2pdf/html2pdf.py 2017-11-01 22:00:38.850860399 +0100
+@@ -27,7 +27,7 @@
+ import urllib
+ import commands
+
+-
++APP = "HTML to PDF Converter"
+ DISTRO = commands.getoutput("lsb_release -is")
+
+ from subprocess import Popen, PIPE
diff --git a/missing-close-event.patch b/missing-close-event.patch
new file mode 100644
index 00000000000..eeb1edd7ac6
--- /dev/null
+++ b/missing-close-event.patch
@@ -0,0 +1,23 @@
+diff -Naur usr.orig/share/html2pdf/html2pdf.py usr/share/html2pdf/html2pdf.py
+--- usr.orig/share/html2pdf/html2pdf.py 2010-01-19 18:26:38.000000000 +0100
++++ usr/share/html2pdf/html2pdf.py 2017-11-01 22:00:38.850860399 +0100
+@@ -72,7 +72,7 @@
+ self.glade.get_widget("combobox2").set_active(1)
+ self.window.show()
+
+- def on_close(self, widget):
++ def on_close(self, widget, event=None):
+ gtk.main_quit()
+ sys.exit(0)
+
+diff -Naur usr.orig/share/html2pdf/ui.glade usr/share/html2pdf/ui.glade
+--- usr.orig/share/html2pdf/ui.glade 2010-01-19 17:49:16.000000000 +0100
++++ usr/share/html2pdf/ui.glade 2017-11-01 22:01:05.460789677 +0100
+@@ -8,6 +8,7 @@
+ <property name="resizable">False</property>
+ <property name="window_position">center</property>
+ <property name="icon">html2pdf.png</property>
++ <signal name="delete_event" handler="on_close"/>
+ <child>
+ <widget class="GtkVBox" id="vbox12">
+ <property name="visible">True</property>
diff --git a/python2.patch b/python2.patch
new file mode 100644
index 00000000000..5ab4f1df4ab
--- /dev/null
+++ b/python2.patch
@@ -0,0 +1,19 @@
+diff -Naur usr.orig/bin/html2pdf usr/bin/html2pdf
+--- usr.orig/bin/html2pdf 2010-01-19 18:20:10.000000000 +0100
++++ usr/bin/html2pdf 2017-11-01 21:57:47.168081047 +0100
+@@ -1,4 +1,3 @@
+-#! /bin/bash
+-echo " "
++#!/bin/bash
+ cd /usr/share/html2pdf/
+-python /usr/share/html2pdf/html2pdf.py
++python2 html2pdf.py
+diff -Naur usr.orig/share/html2pdf/html2pdf.py usr/share/html2pdf/html2pdf.py
+--- usr.orig/share/html2pdf/html2pdf.py 2010-01-19 18:26:38.000000000 +0100
++++ usr/share/html2pdf/html2pdf.py 2017-11-01 22:00:38.850860399 +0100
+@@ -1,4 +1,4 @@
+-#! /usr/bin/env python
++#!/usr/bin/env python2
+ # -*- coding: utf-8 -*-
+ # This program is free software; you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by