forked from marfrit/marfrit-packages
distcc-avahi: 3.4-19 — install /usr/lib/distcc/bin/ symlinks (closes #6)
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)}).
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
pkgname=distcc-avahi
|
||||
_pkgname=distcc
|
||||
pkgver=3.4
|
||||
pkgrel=18
|
||||
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"
|
||||
@@ -37,7 +37,7 @@ sha256sums=(
|
||||
'a4f1d1bb21d61d41f22e918b448cfb852a6d95b0d3b922bd82805090cb2ce41a'
|
||||
'd8aee2eb895c02a39e0f2b76fd4a5c9dce91405f1c443286ca324628eadbf3f1'
|
||||
'7ff56af2ea505bfbf65ceeb0c8f752295f73ffb1173c26a6e978840fad04f651'
|
||||
'f7d5e02298db44f46763b28ca509e9151e8331ce8cc9a732f1b5f49923d03f47'
|
||||
'17141d91a5c80235287d16390a588395ab8fa5fbd129679966721625e604d8f4'
|
||||
)
|
||||
|
||||
prepare() {
|
||||
@@ -79,4 +79,16 @@ package() {
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user