summaryrefslogtreecommitdiff
path: root/pcr-testing/beanstalkd/PKGBUILD
blob: b6feff46a4c4ea99836e1044cd2cd94971bcd51a (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
# Maintainer: bill-auger <bill-auger@programmer.net>


pkgname=beanstalkd
pkgver=1.11
pkgrel=1
pkgdesc="simple, fast work-queue server"
arch=('armv7h' 'i686' 'x86_64')
url=https://beanstalkd.github.io/
license=('MIT')

backup=(etc/conf.d/beanstalkd)
source=($pkgname-$pkgver::https://github.com/beanstalkd/beanstalkd/archive/v${pkgver}.tar.gz
        beanstalkd@.service
        beanstalkd.service
        beanstalkd.conf
        fix-warnings.patch)
sha256sums=('5e3414e49d00e9ef9530897983e56bdba98da6f8f1f30f5fe7e6064b2f68c544'
            '57004d06ed38973e4bba47c92d1461e77e58027818c1899352ace95fb400f937'
            'ef0393098d6df9afb21ef8d1bc331b3843fcecf6c56498136df1aa38e08f6fbf'
            'ae29f7566e0ac475051a29852e62dbb1ee2b59e2ab03f01676c5b5513ada0e3c'
            'fcb9eaba50bd2bc78e8be9fc05a99501fa38bbe35e7e4568cf8363afe0ee4ac4')


prepare()
{
  cd "$srcdir"/$pkgname-$pkgver

  # https://github.com/beanstalkd/beanstalkd/pull/575
  patch -p1 < "$srcdir"/fix-warnings.patch
}

build()
{
  cd "$srcdir"/$pkgname-$pkgver

  make CFLAGS="${CFLAGS}"
}

check()
{
  cd "$srcdir"/$pkgname-$pkgver

  # check requires network
#   make check
}

package()
{
  cd "$srcdir"/$pkgname-$pkgver

  make DESTDIR="$pkgdir"/ PREFIX=/usr install

  install -Dm644 "${srcdir}"/beanstalkd.conf     "${pkgdir}"/etc/conf.d/beanstalkd
  install -Dm644 "${srcdir}"/beanstalkd.service  "${pkgdir}"/usr/lib/systemd/system/beanstalkd.service
  install -Dm644 "${srcdir}"/beanstalkd@.service "${pkgdir}"/usr/lib/systemd/system/beanstalkd@.service
  install -Dm644 adm/systemd/beanstalkd.socket   "${pkgdir}"/usr/lib/systemd/system/beanstalkd.socket
  install -Dm644 doc/beanstalkd.1                "${pkgdir}"/usr/share/man/man1/beanstalkd.1
}