diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 48 |
1 files changed, 34 insertions, 14 deletions
@@ -1,30 +1,50 @@ +# Maintainer: Sam <dev at samarthj dot com> +# Contributor: xantares +# Contributor: ase1590 + +# shellcheck disable=2034,2148,2154 pkgname=pyinstaller-git -_pyname=pyinstaller -pkgver=r6822.e29c0472 +_pkgname=pyinstaller +pkgver=5.0.dev0.r8021.g0c9c07807 pkgrel=1 -pkgdesc="An application to convert python scripts into stand-alone binaries" -arch=('i686' 'x86_64') +pkgdesc="Bundles a Python application and all its dependencies into a single package" +arch=('x86_64' 'i686' 'aarch64' 'ppc64le' 's390x') url="http://www.pyinstaller.org" -license=('GPL2') -depends=('python' 'python-altgraph' 'python-pefile' 'python-macholib') -makedepends=('git' 'python-setuptools') +license=('custom:PyInstaller') +depends=('python-altgraph' 'pyinstaller-hooks-contrib') +depends_i686=('lib32-zlib') +makedepends=('cmocka' 'python>=3.6' 'python-setuptools' 'curl' 'git' 'python-wheel') +optdepends=('python-pycrypto: bytecode encryption support' + 'upx: executable compression support') provides=('pyinstaller') conflicts=('pyinstaller') -source=("git+https://github.com/pyinstaller/pyinstaller.git") -md5sums=('SKIP') +source=("git+https://github.com/$_pkgname/$_pkgname") +sha256sums=('SKIP') pkgver() { - cd "${srcdir}/${_pyname}" - printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + cd "${_pkgname}" || exit + commit=$(printf "r%s.g%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)") + ver=$(grep -E "^__version__" PyInstaller/__init__.py | sed -re "s|.* = '(.*)'$|\1|g") + echo "${ver//-/_}.${commit}" } build() { - cd "${srcdir}/${_pyname}" + cd "$srcdir/$_pkgname" || exit + rm -rvf PyInstaller/bootloader/Darwin* + rm -rvf PyInstaller/bootloader/Windows* + [ "$CARCH" != "i686" ] && rm -rvf PyInstaller/bootloader/Linux-32bit* + export PYTHONHASHSEED=0 + ( + cd bootloader || exit + python ./waf all + ) python setup.py build } package() { - cd "${srcdir}/${_pyname}" - python setup.py install --root="${pkgdir}" --skip-build --optimize=1 + cd "$srcdir/$_pkgname" || exit + export PYTHONHASHSEED=0 + python setup.py install --root="$pkgdir/" --optimize=1 --skip-build + install -Dm644 COPYING.txt "$pkgdir/usr/share/licenses/$_pkgname/COPYING.txt" } |