git » scons.git » main » tree

[main] / PKGBUILD

# Maintainer: David Runge <dvzrv@archlinux.org>
# Contributor: Ray Rashif <schiv@archlinux.org>
# Contributor: damir <damir@archlinux.org>
# Contributor: Lukas Sabota <punkrockguy318@comcast.net>
# Contributor: Brice Carpentier <brice@dlfp.org>

_name=SCons
pkgname=scons
pkgver=4.7.0
pkgrel=2
pkgdesc="Extensible Python-based build utility"
arch=(any)
url="https://scons.org"
license=(MIT)
depends=(
  python
)
makedepends=(
  python-build
  python-installer
  python-setuptools
  python-wheel
)
#checkdepends=(
#  python-psutil
#  python-pytest
#)
optdepends=(
  'python-psutil: to wait for processes to exit'
)
source=(
  https://github.com/$pkgname/$pkgname/archive/$pkgver/$pkgname-$pkgver.tar.gz
  https://downloads.sourceforge.net/project/scons/scons/$pkgver/$_name-$pkgver.tar.gz
  $pkgname-4.4.0-dont_install_manpages.patch
)
sha512sums=('8be4d611c375c13467a1a437e0d47873f973584d9a1be0d1cbbd345685a8f477fc19fa59ab01bca1ab7be8af0034d5cfda360090ee4b347c41f7bfea363bfe6c'
            'd08fba3e7f058eb2eeee4a129d10b55affada6b192932f069271fcbc28fd8216b2bf7e94285d9c448235a3965a789d3a91db9ebae1945aa73306788009dd2e77'
            '97fb0e54274753b8c94a184a8b811371d314a371abb933b0380b2f990962c341d4d896050501c6889f0568b6d45867dc854ce16d23e9a8540cf4957df7af15a1')
b2sums=('1ce9041ad1e2891da92a9bd50e07e29a5e23c7c9432adb120d6610956a2ea4a5125fb6bfa1f8b944797d589cfdbe036a1b9b1eae271ae51abb826c6ee5a3ee1c'
        '0fe8cdbaef46ca6571de35fb6544afe992e8a509cf52a8078133584e3af63919d2e0fb83ad646e042290fc47ca5a8932435946df9d40a099ccb2105b54bfd5cd'
        'b7b611138f0c672d29f9f56a46802289fed7daac25b12822e60c3d8e076aae3b1b88f144e7b9b1fea3a5092ca80f75ed02480250de65e664e18ec9b8ab5f120e')

prepare() {
  # don't try to install the (non-existent) man pages
  # we'll use them from prebuilt sources, because building them drags in a lot of dependencies, is very brittle and painful
  patch -Np1 -d $pkgname-$pkgver -i ../$pkgname-4.4.0-dont_install_manpages.patch
}

build() {
  cd $pkgname-$pkgver
  python -m build --wheel --no-isolation
}

#check() {
#  cd $pkgname-$pkgver
#  python runtest.py --all --unit-only
#}

package() {
  # install man pages from prebuilt sources
  install -vDm 644 $_name-$pkgver/*.1 -t "$pkgdir/usr/share/man/man1/"

  cd $pkgname-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
  install -vDm 644 {{CHANGES,RELEASE}.txt,README.rst} -t "$pkgdir/usr/share/doc/$pkgname/"

  # remove docbook dirs
  find "$pkgdir" -name 'docbook' -type d -exec rm -frv {} +
}