diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2014-09-22 13:32:08 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-09-22 13:32:36 +0000 |
commit | 31e6b0a3853f55eb7a997c57d2dd212ff9f1b980 (patch) | |
tree | 60d56e27e21cb18f7d41b4af7e4bca327d686838 /testing/neard | |
parent | ab9f2d8a3f313d0f2cbb620c9b4e31a5baf36754 (diff) | |
download | aports-31e6b0a3853f55eb7a997c57d2dd212ff9f1b980.tar.bz2 aports-31e6b0a3853f55eb7a997c57d2dd212ff9f1b980.tar.xz |
testing/neard: new aport
Near Field Communication manager
https://01.org/linux-nfc/
fixes #3366
Diffstat (limited to 'testing/neard')
-rw-r--r-- | testing/neard/APKBUILD | 62 | ||||
-rw-r--r-- | testing/neard/neard.initd | 23 |
2 files changed, 85 insertions, 0 deletions
diff --git a/testing/neard/APKBUILD b/testing/neard/APKBUILD new file mode 100644 index 0000000000..d9f8762c29 --- /dev/null +++ b/testing/neard/APKBUILD @@ -0,0 +1,62 @@ +# Maintainer: Natanael Copa <ncopa@alpinelinux.org> +pkgname=neard +pkgver=0.14 +pkgrel=0 +pkgdesc="Near Field Communication manager" +url="https://01.org/linux-nfc/" +arch="all" +license="GPLv2" +depends="" +depends_dev="" +makedepends="$depends_dev glib-dev dbus-dev libnl3-dev" +install="" +subpackages="$pkgname-dev $pkgname-doc" +source="https://www.kernel.org/pub/linux/network/nfc/neard-$pkgver.tar.xz + neard.initd + " + +_builddir="$srcdir"/neard-$pkgver +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 + update_config_sub || return 1 +} + +build() { + cd "$_builddir" + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + || return 1 + make || return 1 +} + +package() { + cd "$_builddir" + make DESTDIR="$pkgdir" install || return 1 + rm -f "$pkgdir"/usr/lib/*.la + + install -d "$pkgdir"/etc/conf.d "$pkgdir"/etc/init.d + echo 'NEARD_OPTS=""' > "$pkgdir"/etc/conf.d/neard + + install -m755 "$srcdir"/neard.initd "$pkgdir"/etc/init.d/neard \ + || return 1 + +} + +md5sums="692ba2653d60155255244c87396c486b neard-0.14.tar.xz +ae70699a277238d9b64f2c457e987996 neard.initd" +sha256sums="6ea724b443d39d679168fc7776a965d1f64727c3735391df2c01469ee7cd8cca neard-0.14.tar.xz +df6f500b1e4eb113dc1d0a4c18c62c4007c8559ef5206d1425d88d1079b653f6 neard.initd" +sha512sums="e5a3caac5be088047f18f6998ce6a13ae50f671c864d658237310abd8c587a0b34cc11a81e7d1e69223458215eac583e3935c799bdc0b301ee41bbfd27e28cac neard-0.14.tar.xz +fb461dc3b8173ea6282357e39f3c4639784b7221fddda8c9b50799ded85ec60eb2fa1ccd516558e97a9e7840beab29b9c613950f7ee872c7ab0433207409bbc1 neard.initd" diff --git a/testing/neard/neard.initd b/testing/neard/neard.initd new file mode 100644 index 0000000000..37cc40e280 --- /dev/null +++ b/testing/neard/neard.initd @@ -0,0 +1,23 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Purpose License v2 +# $Header: /var/cvsroot/gentoo-x86/net-wireless/neard/files/neard.rc,v 1.1 2013/06/21 19:39:06 vapier Exp $ + +name="NFC daemon" + +command="/usr/libexec/nfc/neard" +command_args="${NEARD_OPTS}" + +start_stop_daemon_args="--exec /usr/libexec/nfc/neard" + +depend() { + need dbus +} + +start_pre() { + if [ -e /proc/modules ] ; then + if ! grep -qs NFC_RAW /proc/net/protocols ; then + modprobe -q nfc + fi + fi +} |