forked from ports/contrib
53 lines
1.3 KiB
Plaintext
53 lines
1.3 KiB
Plaintext
# Description: A tool to distribute compilations.
|
|
# URL: https://github.com/distcc/distcc
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
|
# Optional: gtk avahi
|
|
|
|
name=distcc
|
|
version=3.4
|
|
release=1
|
|
source=(https://github.com/distcc/distcc/releases/download/v$version/$name-$version.tar.gz
|
|
distccd distccd.conf)
|
|
|
|
build() {
|
|
cd $name-$version
|
|
|
|
prt-get isinst gtk3 || PKGMK_DISTCC+=' --without-gtk'
|
|
prt-get isinst popt || PKGMK_DISTCC+=' --with-included-popt'
|
|
|
|
./autogen.sh
|
|
|
|
./configure ${PKGMK_DISTCC} \
|
|
--prefix=/usr \
|
|
--sysconfdir=/etc \
|
|
--enable-rfc2553
|
|
|
|
make WERROR_CFLAGS= INCLUDESERVER_PYTHON=/usr/bin/python3
|
|
make DESTDIR=$PKG INCLUDESERVER_PYTHON=/usr/bin/python3 install
|
|
|
|
# distccd should be in sbin
|
|
mv $PKG/usr/bin/distccd $PKG/usr/sbin/distccd
|
|
|
|
# install service
|
|
install -m 0755 -D $SRC/distccd $PKG/etc/rc.d/distccd
|
|
|
|
# create the masquerade directory
|
|
install -d $PKG/usr/lib/distcc
|
|
cd $PKG/usr/lib/distcc
|
|
for c in cc c++ gcc g++ cpp; do
|
|
ln -s ../../bin/distcc $c
|
|
done
|
|
cd -
|
|
|
|
# install config file
|
|
install -D -m 0644 $SRC/distccd.conf $PKG/etc/distccd.conf
|
|
|
|
# create rundir
|
|
install -d $PKG/var/run/distcc
|
|
chown distcc:distcc $PKG/var/run/distcc
|
|
|
|
# cleanup
|
|
rm -r $PKG/usr/share/doc $PKG/etc/distcc $PKG/etc/default
|
|
rm $PKG/usr/sbin/update-distcc-symlinks
|
|
}
|