[arch-commits] Commit in (7 files)
Sébastien Luttringer
seblu at archlinux.org
Thu Jul 24 00:44:49 UTC 2014
Date: Thursday, July 24, 2014 @ 02:44:48
Author: seblu
Revision: 116273
Add lldpd
Added:
lldpd/
lldpd/repos/
lldpd/trunk/
lldpd/trunk/LICENSE
lldpd/trunk/PKGBUILD
lldpd/trunk/lldpd.install
lldpd/trunk/lldpd.service
---------------+
LICENSE | 11 ++++++++++
PKGBUILD | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
lldpd.install | 19 +++++++++++++++++
lldpd.service | 12 +++++++++++
4 files changed, 103 insertions(+)
Added: lldpd/trunk/LICENSE
===================================================================
--- lldpd/trunk/LICENSE (rev 0)
+++ lldpd/trunk/LICENSE 2014-07-24 00:44:48 UTC (rev 116273)
@@ -0,0 +1,11 @@
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Added: lldpd/trunk/PKGBUILD
===================================================================
--- lldpd/trunk/PKGBUILD (rev 0)
+++ lldpd/trunk/PKGBUILD 2014-07-24 00:44:48 UTC (rev 116273)
@@ -0,0 +1,61 @@
+# $Id$
+# Maintainer: Sébastien "Seblu" Luttringer
+
+pkgname=lldpd
+pkgver=0.7.10
+pkgrel=1
+pkgdesc='802.1ab implementation (LLDP) to help you locate neighbors'
+arch=('i686' 'x86_64')
+url='http://vincentbernat.github.io/lldpd/'
+license=('custom:ISC' 'GPL')
+depends=('glibc' 'libevent' 'libbsd' 'zlib' 'openssl' 'pciutils' 'perl'
+ 'libxml2' 'net-snmp' 'jansson')
+backup=('etc/lldpd.conf')
+install=$pkgname.install
+source=("http://media.luffy.cx/files/lldpd/lldpd-$pkgver.tar.gz"
+ 'LICENSE'
+ 'lldpd.service')
+md5sums=('508f2e76703abf8420d9223aae3db548'
+ '8ae98663bac55afe5d989919d296f28a'
+ 'c1e74da766b9605b1a39ca477a5db291')
+
+build() {
+ cd $pkgname-$pkgver
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --sbindir=/usr/bin \
+ --with-snmp \
+ --with-xml \
+ --with-json \
+ --with-readline \
+ --with-privsep-user=lldpd \
+ --with-privsep-group=lldpd \
+ --with-privsep-chroot=/run/lldpd/chroot \
+ --with-lldpd-ctl-socket=/run/lldpd/socket \
+ --with-lldpd-pid-file=/run/lldpd/pid
+ make
+}
+
+check() {
+ cd $pkgname-$pkgver
+ make check
+}
+
+package() {
+ # config stuff
+ install -D -m 644 /dev/null "$pkgdir/etc/lldpd.conf"
+ install -d -m 755 "$pkgdir/etc/lldpd.d"
+ # systemd stuff
+ install -D -m 644 lldpd.service "$pkgdir/usr/lib/systemd/system/lldpd.service"
+ install -D -m 644 /dev/null "$pkgdir/usr/lib/tmpfiles.d/lldpd.conf"
+ printf 'd /run/lldpd 0750 lldpd lldpd\nd /run/lldpd 0750 lldpd lldpd\n' > \
+ "$pkgdir/usr/lib/tmpfiles.d/lldpd.conf"
+ # license
+ install -D -m 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ cd $pkgname-$pkgver
+ make DESTDIR="$pkgdir" install
+}
+
+# vim:set ts=2 sw=2 et:
Property changes on: lldpd/trunk/PKGBUILD
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property
Added: lldpd/trunk/lldpd.install
===================================================================
--- lldpd/trunk/lldpd.install (rev 0)
+++ lldpd/trunk/lldpd.install 2014-07-24 00:44:48 UTC (rev 116273)
@@ -0,0 +1,19 @@
+#/bin/bash
+
+# arg 1: the new package version
+post_install() {
+ # https://wiki.archlinux.org/index.php/DeveloperWiki:UID_/_GID_Database
+ getent group lldpd >/dev/null || groupadd -g 127 lldpd
+ getent passwd lldpd >/dev/null || useradd -d /run/lldpd -u 127 -g 127 lldpd
+ systemd-tmpfiles --create lldpd.conf
+ true
+}
+
+# arg 1: the old package version
+post_remove() {
+ userdel -f lldpd &>/dev/null
+ groupdel lldpd &>/dev/null
+ true
+}
+
+# vim:set ts=2 sw=2 ft=sh et:
Added: lldpd/trunk/lldpd.service
===================================================================
--- lldpd/trunk/lldpd.service (rev 0)
+++ lldpd/trunk/lldpd.service 2014-07-24 00:44:48 UTC (rev 116273)
@@ -0,0 +1,12 @@
+[Unit]
+Description=LLDP daemon
+Documentation=man:lldpd(8)
+After=network.target
+
+[Service]
+Type=notify
+NotifyAccess=main
+ExecStart=/usr/bin/lldpd -c -s -e -f -r
+
+[Install]
+WantedBy=multi-user.target
More information about the arch-commits
mailing list