89aad2d158
build and publish packages / distcc-avahi-aarch64 (push) Successful in 49s
build and publish packages / lmcp-any (push) Failing after 36s
build and publish packages / lmcp-debian (push) Has been skipped
build and publish packages / claude-his-any (push) Has been skipped
build and publish packages / ffmpeg-v4l2-request-aarch64 (push) Has been skipped
build and publish packages / libva-v4l2-request-fourier-aarch64 (push) Has been skipped
build and publish packages / mpv-fourier-aarch64 (push) Has been skipped
build and publish packages / claude-his-debian (push) Has been skipped
Mirror Arch upstream's /usr/lib/$pkgname/bin/<compiler> -> ../../../bin/distcc
symlink farm in package(). Without it, makepkg's buildenv_distcc() check
[[ -d /usr/lib/distcc/bin ]] fails, BUILDENV=(distcc ...) is silently a
no-op, and aarch64 builds compile locally instead of distributing.
Also keeps the legacy /usr/lib/$pkgname/<compiler> -> ../../bin/distcc
flat layout that update-distcc-symlinks(1) used to produce, so distcc
hosts using the Debian-style invocation continue to work.
Drop the post_install/_warn_masq update-distcc-symlinks dance since the
symlinks now ship in the package. Add pre_upgrade hook that strips
untracked legacy symlinks from <= 3.4-18 so pacman can drop the new
tracked ones in their place without a file conflict.
Compiler set matches Arch upstream (c++ c89 c99 cc clang clang++ cpp g++
gcc, plus \$CHOST-{gcc,g++,gcc-\$(gcc -dumpversion)}).
95 lines
3.5 KiB
Bash
95 lines
3.5 KiB
Bash
# Maintainer: Markus Fritsche <mfritsche@reauktion.de>
|
|
# Based on Arch Linux ARM's distcc PKGBUILD, rebuilt with --with-avahi
|
|
# so Zeroconf-announced compile servers are discoverable on the LAN.
|
|
#
|
|
# Why this exists: the ALARM aarch64 distcc binary package is built
|
|
# without --with-avahi, so the distccd --zeroconf flag is a no-op.
|
|
# The Arch x86_64 package is fine. This package replaces distcc on
|
|
# ALARM hosts with an avahi-aware build.
|
|
|
|
pkgname=distcc-avahi
|
|
_pkgname=distcc
|
|
pkgver=3.4
|
|
pkgrel=19
|
|
pkgdesc="Distributed compilation service for C, C++ and Objective-C (with Avahi/Zeroconf support)"
|
|
arch=('x86_64' 'aarch64')
|
|
url="https://github.com/distcc/distcc"
|
|
license=('GPL-2.0-only')
|
|
depends=('popt' 'python' 'avahi')
|
|
makedepends=('autoconf' 'automake' 'libtool' 'pkgconf' 'python-setuptools')
|
|
optdepends=('gtk3: for distccmon')
|
|
provides=("distcc=${pkgver}")
|
|
conflicts=('distcc')
|
|
replaces=('distcc')
|
|
backup=('etc/conf.d/distccd')
|
|
install=${pkgname}.install
|
|
source=(
|
|
"${_pkgname}-${pkgver}.tar.gz::https://github.com/distcc/distcc/archive/refs/tags/v${pkgver}.tar.gz"
|
|
"distccd.conf"
|
|
"distccd.service"
|
|
"distcc.tmpfiles"
|
|
"fix-gcc-rewrite-fqn-overflow.patch"
|
|
"${pkgname}.install"
|
|
)
|
|
sha256sums=(
|
|
'37a34c9555498a1168fea026b292ab07e7bb394715d87d8403e0c33b16d2d008'
|
|
'38cb1912bfa15efd762dd868e049bdbcd58f1a46065255bc4648f821ba516d65'
|
|
'a4f1d1bb21d61d41f22e918b448cfb852a6d95b0d3b922bd82805090cb2ce41a'
|
|
'd8aee2eb895c02a39e0f2b76fd4a5c9dce91405f1c443286ca324628eadbf3f1'
|
|
'7ff56af2ea505bfbf65ceeb0c8f752295f73ffb1173c26a6e978840fad04f651'
|
|
'17141d91a5c80235287d16390a588395ab8fa5fbd129679966721625e604d8f4'
|
|
)
|
|
|
|
prepare() {
|
|
cd "${_pkgname}-${pkgver}"
|
|
patch -p1 -i "${srcdir}/fix-gcc-rewrite-fqn-overflow.patch"
|
|
autoreconf -fiv
|
|
}
|
|
|
|
build() {
|
|
cd "${_pkgname}-${pkgver}"
|
|
# distcc 3.4 has a const-qualifier discard that gcc 15+ flags as error
|
|
# under its own -Werror. Downgrade to a warning.
|
|
export CFLAGS="${CFLAGS} -Wno-error"
|
|
export CXXFLAGS="${CXXFLAGS} -Wno-error"
|
|
./configure \
|
|
--prefix=/usr \
|
|
--sbindir=/usr/bin \
|
|
--sysconfdir=/etc \
|
|
--mandir=/usr/share/man \
|
|
--with-auth \
|
|
--with-avahi \
|
|
--without-libiberty \
|
|
--enable-rfc2553 \
|
|
--with-docdir="/usr/share/doc/${pkgname}"
|
|
make
|
|
# Archive tarball has no doc/ Makefile; skip man/html build.
|
|
[ -f doc/Makefile ] && make -C doc || true
|
|
}
|
|
|
|
check() {
|
|
cd "${_pkgname}-${pkgver}"
|
|
# Upstream test suite is flaky under makepkg; skip unless CHECK=1.
|
|
[ "${CHECK:-0}" = "1" ] && make check || true
|
|
}
|
|
|
|
package() {
|
|
cd "${_pkgname}-${pkgver}"
|
|
make DESTDIR="${pkgdir}" prefix=/usr install
|
|
install -Dm644 ../distccd.conf "${pkgdir}/etc/conf.d/distccd"
|
|
install -Dm644 ../distccd.service "${pkgdir}/usr/lib/systemd/system/distccd.service"
|
|
install -Dm644 ../distcc.tmpfiles "${pkgdir}/usr/lib/tmpfiles.d/distcc.conf"
|
|
|
|
# Compiler symlinks — mirror Arch upstream layout so makepkg's
|
|
# buildenv_distcc() picks /usr/lib/distcc/bin up. Without the bin/
|
|
# subdir the BUILDENV=(distcc ...) hook is silently a no-op.
|
|
local _targets=(c++ c89 c99 cc clang clang++ cpp g++ gcc
|
|
"${CHOST}-g++" "${CHOST}-gcc"
|
|
"${CHOST}-gcc-$(gcc -dumpversion)")
|
|
install -d "${pkgdir}/usr/lib/${_pkgname}/bin"
|
|
for _bin in "${_targets[@]}"; do
|
|
ln -sf "../../bin/${_pkgname}" "${pkgdir}/usr/lib/${_pkgname}/${_bin}"
|
|
ln -sf "../../../bin/${_pkgname}" "${pkgdir}/usr/lib/${_pkgname}/bin/${_bin}"
|
|
done
|
|
}
|