summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 096dab06917ecee7942d8c984c7ee453258d09d2 (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
# Maintainer:  Jonathon Fernyhough <jonathon at_manjaro_dot org>
# Contributor: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Romain Bouchaud-Leduc <r0m1.bl@camaris.org>

pkgname=trickle
pkgver=1.07
pkgrel=10
pkgdesc="Lightweight userspace bandwidth shaper"
arch=('i686' 'x86_64')
url="https://github.com/mariusae/trickle"
license=('BSD')
depends=('libevent')
_commit=a2aeb9f30aa3c651580b9be9ba3c9c13bf51a416 # "import of trickle 1.07"
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/mariusae/trickle/archive/${_commit}.tar.gz"
        "fix-crasher.patch")
sha256sums=('b07ffdff831d11972dc802a4fc2d4000af844933b39ad7f88de20a2866a55f37'
            '495aeb95039dcdeb3bfde46c40b3391fe2416ec51678a1ded9bbeced6f6d1349')

prepare() {
  cd "${srcdir}/${pkgname}-${_commit}"
  
  # FS#27549
  sed -i 's|^_select(int|select(int|' trickle-overload.c

  # FS#35872
  patch -Np1 -i "${srcdir}/fix-crasher.patch"
}

build() {
  cd "${srcdir}/${pkgname}-${_commit}"
  
  ./configure --prefix=/usr \
              --mandir=/usr/share/man
  sed -i "s|.*in_addr_t.*||g" config.h
  make -j1
}

package(){
  cd "${srcdir}/${pkgname}-${_commit}"

  make DESTDIR="${pkgdir}" install
  install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}