aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2020-04-13 02:17:01 -0300
committerLeo <thinkabit.ukim@gmail.com>2020-04-13 02:17:07 -0300
commit6cdb170d62b4f4e8f95c63b8911bac461ee11aa6 (patch)
tree3105995cc23bb715dc6c7fea01a7236831a0addb
parent00de6b35842e286a6a8c409836966e30f774e171 (diff)
downloadaports-6cdb170d62b4f4e8f95c63b8911bac461ee11aa6.tar.gz
aports-6cdb170d62b4f4e8f95c63b8911bac461ee11aa6.tar.bz2
aports-6cdb170d62b4f4e8f95c63b8911bac461ee11aa6.tar.xz
main/open-lldp: modernize
-rw-r--r--main/open-lldp/APKBUILD56
1 files changed, 29 insertions, 27 deletions
diff --git a/main/open-lldp/APKBUILD b/main/open-lldp/APKBUILD
index 55b5df7d09..3e6dce7921 100644
--- a/main/open-lldp/APKBUILD
+++ b/main/open-lldp/APKBUILD
@@ -3,59 +3,61 @@
pkgname=open-lldp
_realname=lldpad
pkgver=0.9.46
-pkgrel=4
+pkgrel=5
pkgdesc="Open Source implementation of the IEEE standard 802.1AB Link Layer Discovery Protocol (LLDP)"
url="http://www.open-lldp.org"
arch="all"
-license="GPL"
-depends=
+license="GPL-2.0-only"
makedepends="autoconf automake bash flex libtool libconfig-dev libnl-dev
readline-dev linux-headers bsd-compat-headers"
-install=
-subpackages="$pkgname-dev $pkgname-doc"
-source="http://ftp-osl.osuosl.org/pub/${pkgname}/${pkgname}-${pkgver}.tar.gz
- clif.h.patch
+subpackages="
+ $pkgname-dev
+ $pkgname-doc
+ $pkgname-bash-completion:bashcomp:noarch
+ "
+source="http://ftp-osl.osuosl.org/pub/open-lldp/open-lldp-$pkgver.tar.gz
+ clif.h.patch
$pkgname.initd
- $pkgname.confd"
-
-_builddir="$srcdir/${pkgname}-${pkgver}"
+ $pkgname.confd
+ "
prepare() {
- local i
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
- sed -i 's/ln -T -s/ln -s/' Makefile.am || return 1
- sed -i -e 's/-Werror//' Makefile.am configure.ac || return 1
- libtoolize --force && aclocal && autoconf --force && automake --add-missing
+ default_prepare
+ sed -i 's/ln -T -s/ln -s/' Makefile.am
+ sed -i -e 's/-Werror//' Makefile.am configure.ac
+ ./bootstrap.sh
}
build() {
- cd "$_builddir"
- ./bootstrap.sh || return 1
- export CFLAGS="${CFLAGS} -fgnu89-inline"
+ export CFLAGS="$CFLAGS -fgnu89-inline"
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
- --infodir=/usr/share/info \
- || return 1
- make || return 1
+ --infodir=/usr/share/info
+ make
}
package() {
- cd "$_builddir"
make DESTDIR="$pkgdir" install
mkdir -p "$pkgdir"/usr/include/dcbd
# ln -s /usr/include/lldpad "$pkgdir"/usr/include/dcbd
ln -s /usr/include/lldpad/lldp_dcbx_cmds.h "$pkgdir"/usr/include/dcbd/clif_cmds.h
install -m755 -D ../../$pkgname.initd "$pkgdir"/etc/init.d/$_realname
install -m644 -D ../../$pkgname.confd "$pkgdir"/etc/conf.d/$_realname
+
+ mkdir -p "$pkgdir"/usr/share/bash-completion
+ mv "$pkgdir"/etc/bash_completion.d "$pkgdir"/usr/share/bash-completion/completions
+}
+
+bashcomp() {
+ depends=""
+ pkgdesc="Bash completions for $pkgname"
+ install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
+
+ amove usr/share/bash-completion/completions
}
sha512sums="45982ba69c159ca386970d49de8cee70b654e762b60d95c96a4794ee696e6c889694bb12eb1454e6c176152c949e67af38974a431838c3788d9bc42751c60878 open-lldp-0.9.46.tar.gz