# Contributor: Carlo Landmeter # Maintainer: setglobal pkgname = 'py-img2pdf' setglobal pkgver = '0.2.4' setglobal pkgrel = '0' setglobal pkgdesc = '"Convert images to PDF via direct JPEG inclusion'" setglobal url = '"https://gitlab.mister-muffin.de/josch/img2pdf'" setglobal arch = '"noarch'" setglobal license = '"LGPL'" setglobal depends = '"py-pillow'" setglobal makedepends = '"python2-dev python3-dev py-setuptools'" setglobal install = ''"" setglobal subpackages = ""py2-$(pkgname#py-):_py2 py3-$(pkgname#py-):_py3"" setglobal source = ""https://pypi.python.org/packages/7e/a2/4f06081f674920be757d894b4bab874e6a3b5227e730cb7618430b366e69/img2pdf-$pkgver.tar.gz"" setglobal builddir = ""$srcdir/img2pdf-$pkgver"" proc build { cd $builddir python2 setup.py build python3 setup.py build } proc package { mkdir -p $pkgdir } proc _py2 { setglobal replaces = $pkgname setglobal depends = $(depends//py-/py2-) _py python2 } proc _py3 { setglobal depends = $(depends//py-/py3-) _py python3 } proc _py { local python="$1" setglobal pkgdesc = ""$pkgdesc (for $python)"" setglobal depends = ""$depends $python"" setglobal install_if = ""$pkgname=$pkgver-r$pkgrel $python"" cd $builddir $python setup.py install --prefix=/usr --root="$subpkgdir" } setglobal sha512sums = '"c2d99da7076411cf4acabe8929fc8af4005ef1f3e3d9edc953f2731b8d41159c9e4637a803765e1405c595daebfb3d519d4c7903003ce0118d8b0c6e88f11860 img2pdf-0.2.4.tar.gz'"