summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0f0fac24d8f8912e97f8d786d7cfe042af5641da (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: Christian Hesse <mail@eworm.de>
# Contributor: sh0 <mee@sh0.org>

pkgname=ladvd
pkgver=1.1.0
pkgrel=1
pkgdesc='LLDP daemon for Unix'
arch=('i686' 'x86_64')
url='http://ladvd.googlecode.com/'
license=('BSD')
install='ladvd.install'
depends=('pciutils' 'libcap-ng' 'libpcap' 'libevent')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/sspans/ladvd/archive/v1.1.0.tar.gz")
sha256sums=('6db4b3270d90469e7081695f62ed13b88ac15bd41b8467c81eec5d035742ae57')

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

	sed -i 's/-Werror//' configure.ac

	autoreconf -fi
	./configure --prefix=/usr \
		--sbindir=/usr/bin \
		--mandir=/usr/share/man \
		--with-user=ladvd \
		--with-pid-dir=/run \
		--with-chroot-dir=/var/run/ladvd
	make
}

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

	make DESTDIR="${pkgdir}/" install

	install -D -m0644 doc/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
	rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE"

	install -D -m0644 "systemd/ladvd.conf" "${pkgdir}/usr/lib/tmpfiles.d/ladvd.conf"

	install -d -m0755 "${pkgdir}/run/ladvd"
}