summaryrefslogtreecommitdiff
path: root/distcc/PKGBUILD
blob: c0d6bad09d6cfb291ed0976fb6cb20ee3f565206 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: John <graysky@archlinux.us>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Judd Vinet <jvinet@zeroflux.org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>

pkgname=distcc
pkgver=3.3.5
pkgrel=102
_gccver=10.2.0 # Current GCC version, used for symlinks. See FS#69044
pkgdesc='Distcc w/o python, popt and avahi deps'
arch=(x86_64)
url='https://github.com/distcc/distcc'
license=(GPL)
#depends=(popt python)
#makedepends=(git)
optdepends=("gcc=$_gccver")
backup=(etc/conf.d/distccd
        etc/distcc/hosts)
#source=("git+$url#commit=8d2a5709d249949e8177dcf08b56dbe7857daa7f" # tag: v3.3.5
source=("https://github.com/distcc/distcc/archive/v${pkgver}.tar.gz"
        distccd.conf.d
        distccd.service
				sysusers.conf)
        #gtk3.patch::https://github.com/distcc/distcc/commit/ff0a09f9e335d26265d8955176df1009ce40f518.patch)
sha256sums=('13a4b3ce49dfc853a3de550f6ccac583413946b3a2fa778ddf503a9edc8059b0'
            '43e02b461841ca2976816c244a0eca8b24820ca143f73cc0924403d75a8c012f'
            '360493245590d8c1480ff93cd30c9e81cb86efebacd78e45f37e7d6cdbcc2136'
						'4e037a6225f498b51d6902d117be979454ac78ec5fd2f65f1d5a38e10859612a')
            #'fa931b9e0356878469a10c647573d8b20ce45a21d77cffbdd56a36983923bcb5')

prepare() {
  cd ${pkgname}-${pkgver}
  #patch -p1 -i "$srcdir/gtk3.patch"
  ./autogen.sh
  #sed -i 's/ install-gnome-data//g' Makefile.in
  # FS#66418, support Python 3.9
  #find . -name '*.py' -type f -exec sed -i 's,e.clock(,e.perf_counter(,g' {} \;
}

build() {
  cd ${pkgname}-${pkgver}
  export CFLAGS+=' -fcommon'
  ./configure \
    --enable-rfc2553 \
    --mandir=/usr/share/man \
    --prefix=/usr \
    --sbindir=/usr/bin \
    --sysconfdir=/etc \
		--disable-pump-mode \
    --with-included-popt \
    --without-avahi
  #make WERROR_CFLAGS= INCLUDESERVER_PYTHON=/usr/bin/python
  make
}

package() {
  make -C ${pkgname}-${pkgver} \
    DESTDIR="$pkgdir" \
    install
    #INCLUDESERVER_PYTHON=/usr/bin/python \

  install -Dm644 distccd.conf.d "$pkgdir/etc/conf.d/distccd"
  install -Dm644 distccd.service \
    "$pkgdir/usr/lib/systemd/system/distccd.service"

  # Package symlinks
  _targets=(c++ c89 c99 cc clang clang++ cpp g++ gcc $CARCH-pc-linux-gnu-g++
            $CARCH-pc-linux-gnu-gcc $CARCH-pc-linux-gnu-gcc-$_gccver)
  install -d "$pkgdir/usr/lib/${pkgname}-${pkgver}/bin"
  for bin in "${_targets[@]}"; do
    # For whitelist since version 3.3, see FS#57978
    ln -sf ../../bin/${pkgname}-${pkgver} "$pkgdir/usr/lib/${pkgname}-${pkgver}/$bin"
    # Needed for makepkg to work
    ln -sf ../../../bin/${pkgname}-${pkgver} "$pkgdir/usr/lib/${pkgname}-${pkgver}/bin/$bin"
  done

  # FS#67629
  install -Dm644 sysusers.conf "$pkgdir/usr/lib/sysusers.d/distccd.conf"
}