PKGBUILDs/community/distcc/PKGBUILD

84 lines
2.5 KiB
Bash
Raw Normal View History

2018-10-01 12:17:06 +00:00
# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
2020-09-07 20:58:08 +00:00
# Contributor: John <graysky@archlinux.us>
2018-01-10 13:45:42 +00:00
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Judd Vinet <jvinet@zeroflux.org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
2012-09-05 12:32:30 +00:00
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - added --without-avahi to configure
2011-10-24 17:48:21 +00:00
# - removed gtk2 from deps and --with-gtk from configure
# - patch to allow zero timeout (INT_MAX time to complete)
pkgname=distcc
2019-08-22 12:56:57 +00:00
pkgver=3.3.3
2020-12-21 03:24:57 +00:00
pkgrel=8
2019-08-22 12:56:57 +00:00
pkgdesc='Distributed compilation service for C, C++ and Objective-C'
arch=(x86_64)
2020-04-28 23:21:25 +00:00
url='https://github.com/distcc/distcc'
2019-08-22 12:56:57 +00:00
license=(GPL)
depends=(popt)
2020-01-04 15:09:03 +00:00
makedepends=(git python)
2019-08-22 12:56:57 +00:00
optdepends=(python)
2020-09-07 20:58:08 +00:00
backup=(etc/conf.d/distccd
etc/distcc/hosts)
2020-04-28 23:21:25 +00:00
source=("git+$url#commit=4cde9bcfbda589abd842e3bbc652ce369085eaae" # tag: v3.3.3
2020-09-07 20:58:08 +00:00
distccd.conf.d
distccd.service
sysusers.conf
allow-zero-timeout.patch)
2018-03-26 14:05:42 +00:00
sha256sums=('SKIP'
2018-01-10 13:45:42 +00:00
'43e02b461841ca2976816c244a0eca8b24820ca143f73cc0924403d75a8c012f'
2020-09-07 20:58:08 +00:00
'360493245590d8c1480ff93cd30c9e81cb86efebacd78e45f37e7d6cdbcc2136'
'4e037a6225f498b51d6902d117be979454ac78ec5fd2f65f1d5a38e10859612a'
2018-01-10 13:45:42 +00:00
'73ac95393ee94bcb28f49499e8eec61bfd29a7de38889eaebd237fbbcba6e2c6')
2020-09-07 20:58:08 +00:00
prepare() {
2018-03-26 14:05:42 +00:00
cd "$pkgname"
2020-12-21 03:24:57 +00:00
patch -p1 -i ../allow-zero-timeout.patch
2018-01-10 13:45:42 +00:00
./autogen.sh
2018-03-26 14:05:42 +00:00
sed -i 's/ install-gnome-data//g' Makefile.in
2020-04-28 23:21:25 +00:00
# FS#66418, support Python 3.9
find . -name "*.py" -type f -exec sed -i 's/time.clock()/time.perf_counter()/g' {} \;
}
build() {
2018-03-26 14:05:42 +00:00
cd "$pkgname"
2020-09-07 20:58:08 +00:00
export CFLAGS+=' -fcommon'
2018-03-26 14:05:42 +00:00
./configure \
2018-01-11 13:43:39 +00:00
--enable-rfc2553 \
2018-03-26 14:05:42 +00:00
--mandir=/usr/share/man \
2020-09-07 20:58:08 +00:00
--prefix=/usr \
2018-03-26 14:05:42 +00:00
--sbindir=/usr/bin \
--sysconfdir=/etc \
2018-01-11 13:43:39 +00:00
--without-avahi
2018-03-26 14:05:42 +00:00
make WERROR_CFLAGS= INCLUDESERVER_PYTHON=/usr/bin/python
}
package() {
2018-03-26 14:05:42 +00:00
make -C "$pkgname" \
DESTDIR="$pkgdir" \
INCLUDESERVER_PYTHON=/usr/bin/python \
install
2012-09-05 12:32:30 +00:00
2018-03-26 14:05:42 +00:00
# Configuration
install -Dm644 distccd.conf.d "$pkgdir/etc/conf.d/distccd"
install -Dm644 distccd.service \
2018-01-11 13:43:39 +00:00
"$pkgdir/usr/lib/systemd/system/distccd.service"
2018-03-26 14:05:42 +00:00
# Symlinks
2018-01-10 13:45:42 +00:00
install -d "$pkgdir/usr/lib/$pkgname/bin"
2020-01-04 15:09:03 +00:00
_targets=(c++ c89 c99 cc clang clang++ cpp g++ gcc)
for bin in "${_targets[@]}"; do
# For whitelist since version 3.3, see FS#57978
ln -sf "../../bin/$pkgname" "$pkgdir/usr/lib/$pkgname/$bin"
# Needed for makepkg to work
ln -sf "../../../bin/$pkgname" "$pkgdir/usr/lib/$pkgname/bin/$bin"
2018-01-10 13:45:42 +00:00
done
2020-09-07 20:58:08 +00:00
# FS#67629
install -Dm644 sysusers.conf "$pkgdir/usr/lib/sysusers.d/distccd.conf"
}
2018-01-10 13:45:42 +00:00
2018-10-01 12:17:06 +00:00
# getver: distcc.org