diff options
-rw-r--r-- | PKGBUILD | 12 | ||||
-rwxr-xr-x | update.sh | 64 |
2 files changed, 72 insertions, 4 deletions
@@ -5,15 +5,19 @@ pkgname=('python-pdfkit') _module='pdfkit' pkgver='0.6.1' pkgrel=1 -pkgdesc="Wkhtmltopdf python wrapper to convert html to pdf using the webkit rendering engine and qt" -url="https://github.com/JazzCore/python-pdfkit" -depends=('python' 'wkhtmltopdf') +pkgdesc='Wkhtmltopdf python wrapper to convert html to pdf using the webkit rendering engine and qt' +url='https://github.com/JazzCore/python-pdfkit' +depends=( + 'python' + 'wkhtmltopdf' +) makedepends=('python-setuptools') license=('MIT') arch=('any') -source=("https://files.pythonhosted.org/packages/source/p/pdfkit/pdfkit-${pkgver}.tar.gz") +source=('https://files.pythonhosted.org/packages/source/p/pdfkit/pdfkit-0.6.1.tar.gz') sha256sums=('ef1da35b78d534197e7ce4a604a4a190e9aa769e56634957535f3479a50d8cd1') + build() { cd "${srcdir}/${_module}-${pkgver}" python setup.py build diff --git a/update.sh b/update.sh new file mode 100755 index 000000000000..f29cefd9c46c --- /dev/null +++ b/update.sh @@ -0,0 +1,64 @@ +#! /bin/sh + +AUR_NAME=python-pdfkit +PROJ_NAME=pdfkit +DESCRIPTION="Wkhtmltopdf python wrapper to convert html to pdf using the webkit rendering engine and qt" +URL='https://github.com/JazzCore/python-pdfkit' +DEPENDS=(wkhtmltopdf) +LICENSE='MIT' +ADDITIONAL= + +if [[ $# == 0 ]]; then + echo 'Usage: ./update.sh VERSION_NUMBER' + exit 1 +fi + +src=https://files.pythonhosted.org/packages/source/${PROJ_NAME:0:1}/${PROJ_NAME}/${PROJ_NAME}-$1.tar.gz + +# Get the sha256sum sum of the package. +mkdir -p dist +pushd dist +wget $src +sha=$(sha256sum "${PROJ_NAME}-$1.tar.gz" | cut -d ' ' -f 1) +popd + +echo "# Maintainer: Sumner Evans <sumner.evans98 at gmail dot com> + +pkgbase=('${AUR_NAME}') +pkgname=('${AUR_NAME}') +_module='${PROJ_NAME}' +pkgver='$1' +pkgrel=1 +pkgdesc='${DESCRIPTION}' +url='${URL}' +depends=( + 'python'" > PKGBUILD + +# Include the dependencies. +for d in ${DEPENDS[*]}; do + echo " '$d'" >> PKGBUILD +done + +echo ") +makedepends=('python-setuptools') +license=('${LICENSE}') +arch=('any') +source=('${src}') +sha256sums=('${sha}') +${ADDITIONAL} + +build() { + cd \"\${srcdir}/\${_module}-\${pkgver}\" + python setup.py build +} + +package() { + depends+=() + cd \"\${srcdir}/\${_module}-\${pkgver}\" + python setup.py install --root=\"\${pkgdir}\" --optimize=1 --skip-build +}" >> PKGBUILD + +make + +# Test +makepkg -f |