void-packages/srcpkgs/distcc/template
2020-01-05 13:35:59 +01:00

75 lines
2 KiB
Bash

# Template file for 'distcc'
pkgname=distcc
version=3.3.3
revision=3
build_style=gnu-configure
configure_args="--disable-Werror --with-gtk"
conf_files="
/etc/distcc/hosts
/etc/distcc/clients.allow"
hostmakedepends="automake libtool pkg-config which"
makedepends="binutils-devel popt-devel avahi-libs-devel gtk+-devel"
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/${pkgname}/releases/download/v${version}/${pkgname}-${version}.tar.gz"
checksum=bead25471d5a53ecfdf8f065a6fe48901c14d5008956c318c700e56bc87bf0bc
conflicts="chroot-distcc>=0"
subpackages="distcc-gtk"
if [ "$CROSS_BUILD" ]; then
configure_args+=" --disable-pump-mode"
else
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++; 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; do
for f in gcc cc c++ g++; do
ln -sfr ${DESTDIR}/usr/bin/distcc ${DESTDIR}/usr/lib/distcc/bin/${x}-${f}
done
done
}
distcc-gtk_package() {
depends="distcc-${version}_${revision}"
short_desc+=" - GTK+ monitor"
pkg_install() {
vmove usr/bin/distccmon-gnome
}
}
distcc-pump_package() {
depends="distcc-${version}_${revision}"
short_desc+=" - Pump mode support files"
pycompile_module="include_server"
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
}
}