summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPlaton Ryzhikov2018-12-23 20:43:12 +0300
committerPlaton Ryzhikov2018-12-23 20:43:12 +0300
commit07734c600520cb46c8f93b903322a411564756d9 (patch)
treed7062eaa81c81f3e6703ad83dd32dfe0c2c88b95
downloadaur-07734c600520cb46c8f93b903322a411564756d9.tar.gz
Add nldev
-rw-r--r--.SRCINFO18
-rw-r--r--0000-change_shell.patch16
-rw-r--r--0001-increase_buffer.patch20
-rw-r--r--PKGBUILD31
4 files changed, 85 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..890bd386af8
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = nldev-phkr
+ pkgdesc = frontend for mdev, replacing the over-engineered udevd
+ pkgver = 0.3
+ pkgrel = 1
+ url = http://git.r-36.net/nldev/
+ arch = i686
+ arch = x86_64
+ license = MIT
+ makedepends = git
+ source = git://git.r-36.net/nldev#commit=9971105
+ source = 0000-change_shell.patch
+ source = 0001-increase_buffer.patch
+ md5sums = SKIP
+ md5sums = f96e7f40e2f4c5378c93c5cc97d4185d
+ md5sums = 508367c15bf5117870c7dc0765cba2b9
+
+pkgname = nldev
+
diff --git a/0000-change_shell.patch b/0000-change_shell.patch
new file mode 100644
index 00000000000..f69117dafe3
--- /dev/null
+++ b/0000-change_shell.patch
@@ -0,0 +1,16 @@
+---
+ nltrigger | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/nltrigger b/nltrigger
+index b591d32..e09598b 100755
+--- a/nltrigger
++++ b/nltrigger
+@@ -1,4 +1,4 @@
+-#!/bin/busybox ash
++#!/bin/sh
+
+ usage() {
+ printf "usage: %s [add|list|del|action] [subsystem]\n" "$(basename $1)" >&2
+--
+2.20.1
diff --git a/0001-increase_buffer.patch b/0001-increase_buffer.patch
new file mode 100644
index 00000000000..ee78010868b
--- /dev/null
+++ b/0001-increase_buffer.patch
@@ -0,0 +1,20 @@
+---
+ nldev.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/nldev.c b/nldev.c
+index 018ed86..9efe6d1 100644
+--- a/nldev.c
++++ b/nldev.c
+@@ -161,7 +161,7 @@ init_netlink_socket(void)
+ if (fd < 0)
+ edie("socket");
+
+- slen = 16*1024;
++ slen = 1024*1024;
+ if (setsockopt(fd, SOL_SOCKET, SO_RCVBUFFORCE, &slen,
+ sizeof(slen)) < 0) {
+ edie("setsockopt");
+--
+2.20.1
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..f5b23b64df5
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,31 @@
+# Maintainer: Platon Ryzhikov <ihummer63@yandex.ru>
+
+pkgbase=nldev-phkr
+pkgname=nldev
+pkgver=0.3
+pkgrel=1
+pkgdesc="frontend for mdev, replacing the over-engineered udevd"
+url="http://git.r-36.net/nldev/"
+arch=('i686' 'x86_64')
+makedepends=(git)
+license=('MIT')
+_commit=9971105
+source=("git://git.r-36.net/nldev#commit=$_commit"
+ "0000-change_shell.patch"
+ "0001-increase_buffer.patch")
+md5sums=('SKIP'
+ 'f96e7f40e2f4c5378c93c5cc97d4185d'
+ '508367c15bf5117870c7dc0765cba2b9')
+
+build() {
+ cd "$srcdir/$pkgname"
+ make
+}
+
+package() {
+ cd "$srcdir/$pkgname"
+ make DESTDIR="$pkgdir" PREFIX=/usr install
+ mkdir -p "$pkgdir/etc"
+ mkdir -p "$pkgdir/usr/lib"
+ install -m644 -D LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}