void-packages/srcpkgs/distcc/template

71 lines
1.9 KiB
Bash

# Template file for 'distcc'
pkgname=distcc
version=3.4
revision=2
build_style=gnu-configure
configure_args="--disable-Werror"
conf_files="
/etc/distcc/hosts
/etc/distcc/clients.allow"
hostmakedepends="automake libtool pkg-config which"
makedepends="binutils-devel popt-devel avahi-libs-devel"
checkdepends="procps-ng"
short_desc="Distributed compilation for faster C/C++ builds"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://distcc.github.io"
distfiles="https://github.com/distcc/distcc/releases/download/v${version}/distcc-${version}.tar.gz"
checksum=2b99edda9dad9dbf283933a02eace6de7423fe5650daa4a728c950e5cd37bd7d
disable_parallel_check=yes
subpackages=" "
if [ "$CROSS_BUILD" ]; then
configure_args+=" --disable-pump-mode"
else
hostmakedepends+=" python3-setuptools"
makedepends+=" python3-devel"
subpackages+=" distcc-pump"
fi
pre_configure() {
./autogen.sh
}
post_install() {
local f x
# Remove useless files.
rm -f ${DESTDIR}/etc/default/distcc
rm -f ${DESTDIR}/etc/distcc/commands.allow.sh
rm -rf ${DESTDIR}/usr/share/doc/distcc/example
vsv distccd
# cc wrappers
vmkdir usr/lib/distcc/bin
for f in gcc cc c++ g++ clang clang++ cpp; do
ln -sfr ${DESTDIR}/usr/bin/distcc ${DESTDIR}/usr/lib/distcc/bin/${f}
done
# cross-gcc wrappers
for x in arm-linux-gnueabi arm-linux-gnueabihf armv7l-linux-gnueabihf \
arm-linux-musleabihf armv7l-linux-musleabihf aarch64-linux-gnu aarch64-linux-musl; do
for f in gcc cc c++ g++ cpp; do
ln -sfr ${DESTDIR}/usr/bin/distcc ${DESTDIR}/usr/lib/distcc/bin/${x}-${f}
done
done
}
distcc-pump_package() {
depends="distcc-${version}_${revision}"
short_desc+=" - Pump mode support files"
depends="python3"
pkg_install() {
vmove usr/bin/pump
vmove usr/share/man/man1/pump.1.gz
vmove usr/share/man/man1/include_server.1.gz
vmove usr/lib/python$py3_ver
vmove usr/share/doc/distcc/README.pump
}
}