archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / distcc / trunk / PKGBUILD
blob44a31b0c370d00c8a65aa6464fa51558ed86f879
1 # Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
2 # Contributor: John <graysky@archlinux.us>
3 # Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
4 # Contributor: Judd Vinet <jvinet@zeroflux.org>
5 # Contributor: Giovanni Scafora <giovanni@archlinux.org>
7 pkgname=distcc
8 pkgver=3.4
9 pkgrel=7
10 _gccver=13.1.1 # Current GCC version, used for symlinks. See FS#69044
11 pkgdesc='Distributed compilation service for C, C++ and Objective-C'
12 arch=(x86_64)
13 url='https://github.com/distcc/distcc'
14 license=(GPL)
15 depends=(avahi popt python 'gcc=13.1.1')
16 makedepends=(git gtk3)
17 optdepends=("gcc=$_gccver"
18             'gtk3: for distccmon')
19 backup=(etc/conf.d/distccd
20         etc/distcc/hosts)
21 source=("git+$url?signed#tag=v$pkgver"
22         distccd.conf.d
23         distccd.service
24         sysusers.conf)
25 b2sums=('SKIP'
26         'c48a6daea2cae5e5865c488e612c819e6f9bf4a1b205e2cd264b795de3450d40b0fe05264fbd8a3fe861f03e38d91e7e791ad67e22da5b5d0b43bcb380b8b4c9'
27         '9b6ffc02e9360fd92f7595e96ef2d69b5f6d72acf343009375fa081f86b26f51960b139c4f6e0e3c8befa37eba4894d61351bbfab6386389c262db0cc01a8b8e'
28         'd1b057ce49994ac61e9d5a861c1c770452102300d47a9c396b3272d7f5afbd3fe3e865e6db11c046e73ae3b6886bc8970a10624650731d55132362436904f989')
29 validpgpkeys=(30782E2BE4EB9FD5B293D3DA6D100BF096B8A005) # Shawn Landden
31 prepare() {
32   cd $pkgname
33   ./autogen.sh
34   sed -i 's/ install-gnome-data//g' Makefile.in
37 build() {
38   cd $pkgname
40   # ref: https://github.com/distcc/distcc/issues/454#issuecomment-1087865811
41   export CFLAGS+=' -DPY_SSIZE_T_CLEAN -fcommon'
43   # ref: https://bugs.archlinux.org/task/78400
44   export NATIVE_COMPILER_TRIPLE=x86_64-pc-linux-gnu-gcc
46   ./configure \
47     --enable-rfc2553 \
48     --mandir=/usr/share/man \
49     --prefix=/usr \
50     --sbindir=/usr/bin \
51     --sysconfdir=/etc \
52     --with-gtk
54   make WERROR_CFLAGS= INCLUDESERVER_PYTHON=/usr/bin/python
57 package() {
58   make -C $pkgname \
59     DESTDIR="$pkgdir" \
60     INCLUDESERVER_PYTHON=/usr/bin/python \
61     install
63   install -Dm644 distccd.conf.d "$pkgdir/etc/conf.d/distccd"
64   install -Dm644 distccd.service \
65     "$pkgdir/usr/lib/systemd/system/distccd.service"
67   # Package symlinks
68   _targets=(c++ c89 c99 cc clang clang++ cpp g++ gcc $CARCH-pc-linux-gnu-g++
69             $CARCH-pc-linux-gnu-gcc $CARCH-pc-linux-gnu-gcc-$_gccver)
70   install -d "$pkgdir/usr/lib/$pkgname/bin"
71   for bin in "${_targets[@]}"; do
72     # For whitelist since version 3.3, see FS#57978
73     ln -sf ../../bin/$pkgname "$pkgdir/usr/lib/$pkgname/$bin"
74     # Needed for makepkg to work
75     ln -sf ../../../bin/$pkgname "$pkgdir/usr/lib/$pkgname/bin/$bin"
76   done
78   # FS#67629
79   install -Dm644 sysusers.conf "$pkgdir/usr/lib/sysusers.d/distccd.conf"