contrib/distcc/Pkgfile

68 lines
1.7 KiB
Plaintext
Raw Normal View History

2023-08-18 21:13:57 +02:00
# Description: A tool to distribute compilations
# URL: https://github.com/distcc/distcc
2023-08-18 21:13:57 +02:00
# Maintainer: Tim Biermann, tbier at posteo dot de
# Optional: avahi gtk3 krb5 popt
2007-04-10 21:56:44 +02:00
name=distcc
2021-05-16 09:17:30 +02:00
version=3.4
2023-08-18 21:13:57 +02:00
release=4
2019-08-19 15:29:14 +02:00
source=(https://github.com/distcc/distcc/releases/download/v$version/$name-$version.tar.gz
2023-08-18 21:13:57 +02:00
python-3.9.patch
distccd.service
distccd.conf)
2007-04-10 21:56:44 +02:00
build() {
2023-08-18 21:13:57 +02:00
cd $name-$version
2016-06-12 08:03:48 +02:00
2023-08-18 21:13:57 +02:00
patch -Np1 -i $SRC/python-3.9.patch
2020-07-15 15:29:49 +02:00
2023-08-18 21:13:57 +02:00
prt-get isinst avahi && PKGMK_DISTCC+=' --with-avahi'
prt-get isinst gtk3 || PKGMK_DISTCC+=' --without-gtk'
prt-get isinst krb5 && PKGMK_DISTCC+=' --with-auth'
prt-get isinst popt || PKGMK_DISTCC+=' --with-included-popt'
2023-08-18 21:13:57 +02:00
export CFLAGS+=' -fno-strict-aliasing'
export CPPFLAGS="$CFLAGS"
2022-02-28 15:27:20 +01:00
2023-08-18 21:13:57 +02:00
./autogen.sh
2007-04-10 21:56:44 +02:00
2023-08-18 21:13:57 +02:00
./configure ${PKGMK_DISTCC} \
--prefix=/usr \
--sysconfdir=/etc \
--runstatedir=/run \
--enable-rfc2553 \
--without-gnome \
--disable-Werror
2009-01-09 09:04:37 +01:00
2023-08-18 21:13:57 +02:00
make INCLUDESERVER_PYTHON=/usr/bin/python3
make DESTDIR=$PKG \
INCLUDESERVER_PYTHON=/usr/bin/python3 \
GZIP_BIN=false \
install
2009-01-09 09:04:37 +01:00
2023-08-18 21:13:57 +02:00
# distccd should be in sbin
mv $PKG/usr/bin/distccd $PKG/usr/sbin/distccd
2023-08-18 21:13:57 +02:00
# install service
install -m 0755 -D $SRC/distccd.service $PKG/etc/rc.d/distccd
2013-04-28 05:17:34 +02:00
2023-08-18 21:13:57 +02:00
# 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 -
2023-08-18 21:13:57 +02:00
# install config file
install -D -m 0644 $SRC/distccd.conf $PKG/etc/distccd.conf
# cleanup
rm -r $PKG/usr/share/doc $PKG/etc/distcc $PKG/etc/default
rm $PKG/usr/sbin/update-distcc-symlinks
/usr/bin/python3 -m compileall -d $SRC/$name-$version $PKG
/usr/bin/python3 -O -m compileall -d $SRC/$name-$version $PKG
/usr/bin/python3 -OO -m compileall -d $SRC/$name-$version $PKG
2007-04-10 21:56:44 +02:00
}