contrib/distcc/Pkgfile

57 lines
1.4 KiB
Plaintext
Raw Normal View History

# Description: A tool to distribute compilations.
2009-01-09 09:04:37 +01:00
# URL: http://distcc.org/
2014-11-10 13:28:07 +01:00
# Maintainer: Danny Rawlins, crux at romster dot me
2019-08-19 15:29:14 +02:00
# Optional: python3 gtk avahi
2007-04-10 21:56:44 +02:00
name=distcc
2019-08-19 15:29:14 +02:00
version=3.3.3
2020-07-15 15:29:49 +02:00
release=2
2019-08-19 15:29:14 +02:00
source=(https://github.com/distcc/distcc/releases/download/v$version/$name-$version.tar.gz
2020-07-15 15:29:49 +02:00
distccd
distcc-3.3.3-py38.patch
distcc-3.3.3-gcc-10-fix.patch)
2007-04-10 21:56:44 +02:00
build() {
2019-08-19 15:29:14 +02:00
cd $name-$version
2016-06-12 08:03:48 +02:00
2019-08-19 15:29:14 +02:00
[ -e '/usr/lib/pkgconfig/python-3.7.pc' ] || PKGMK_DISTCC+=' --disable-pump-mode'
[ -e '/usr/lib/pkgconfig/gtk+-2.0.pc' ] || PKGMK_DISTCC+=' --without-gtk'
[ -e '/usr/lib/pkgconfig/popt.pc' ] || PKGMK_DISTCC+=' --with-included-popt'
2016-06-12 08:03:48 +02:00
2020-07-15 15:29:49 +02:00
patch -p1 -i $SRC/distcc-3.3.3-py38.patch
patch -p1 -i $SRC/distcc-3.3.3-gcc-10-fix.patch
2019-08-19 15:29:14 +02:00
./autogen.sh
2019-08-19 15:29:14 +02:00
./configure ${PKGMK_DISTCC} \
2007-04-10 21:56:44 +02:00
--prefix=/usr \
2019-08-19 15:29:14 +02:00
--sysconfdir=/etc \
--enable-rfc2553 \
--disable-Werror
2007-04-10 21:56:44 +02:00
make
2013-04-28 05:17:34 +02:00
make DESTDIR=$PKG install
2009-01-09 09:04:37 +01:00
# distccd should be in sbin
mv $PKG/usr/bin/distccd $PKG/usr/sbin/distccd
2013-04-28 05:17:34 +02:00
# install service
2009-01-09 09:04:37 +01:00
install -m 0755 -D $SRC/distccd $PKG/etc/rc.d/distccd
2013-04-28 05:17:34 +02:00
# create the masquerade directory
install -d $PKG/usr/lib/distcc
cd $PKG/usr/lib/distcc
2013-04-28 05:17:34 +02:00
for c in cc c++ gcc g++ cpp; do
ln -s ../../bin/distcc $c
done
cd -
2013-04-28 05:17:34 +02:00
2019-08-19 15:29:14 +02:00
# cleanup
rm -r $PKG/usr/share/doc $PKG/etc/distcc $PKG/etc/default
rm $PKG//usr/sbin/update-distcc-symlinks
# python is required for pump mode
2019-08-19 15:29:14 +02:00
[ -e '/usr/lib/pkgconfig/python-3.7.pc' ] || \
rm $PKG/usr/share/man/man1/{pump,include_server}.1.gz
2007-04-10 21:56:44 +02:00
}