diff options
author | Henrik Riomar <henrik.riomar@gmail.com> | 2017-05-22 21:32:44 +0200 |
---|---|---|
committer | Shiz <hi@shiz.me> | 2017-06-03 19:45:21 +0200 |
commit | 31a5976bda72f92c0f63c753df06b1b737045304 (patch) | |
tree | 22736655e2d20dcdb340c23ce5e9d899528c2fd6 /unmaintained | |
parent | c6a00feb33e5a54d667baa2a925bacfc447107f1 (diff) | |
download | aports-31a5976bda72f92c0f63c753df06b1b737045304.zip |
unmaintained/usbip-utils: make buildable
modernize and change kernel version to v4.9
Diffstat (limited to 'unmaintained')
-rw-r--r-- | unmaintained/usbip-utils/APKBUILD | 51 | ||||
-rw-r--r-- | unmaintained/usbip-utils/sigcld.patch | 9 | ||||
-rw-r--r-- | unmaintained/usbip-utils/usbip.initd | 8 |
3 files changed, 34 insertions, 34 deletions
diff --git a/unmaintained/usbip-utils/APKBUILD b/unmaintained/usbip-utils/APKBUILD index 77788850266..fd904f048c4 100644 --- a/unmaintained/usbip-utils/APKBUILD +++ b/unmaintained/usbip-utils/APKBUILD @@ -1,41 +1,44 @@ # Contributor: Der Tiger <der.tiger.alpine@arcor.de> # Maintainer: Francesco Colista <fcolista@alpinelinux.org> pkgname=usbip-utils -pkgver=3.14 +pkgver=4.9 pkgrel=0 pkgdesc="Utilities for USB device sharing over IP network" url="https://kernel.org/doc/readme/drivers-staging-usbip-userspace-README" arch="all" license="GPLv2" depends="glib sysfsutils usbutils" -depends_dev="gcc automake autoconf libtool sysfsutils-dev glib-dev" +depends_dev="gcc automake autoconf eudev-dev libtool linux-headers sysfsutils-dev glib-dev" makedepends="$depends_dev tar" install="" subpackages="$pkgname-dev $pkgname-doc" -source="https://kernel.org/pub/linux/kernel/v3.x/linux-$pkgver.tar.gz +source="https://kernel.org/pub/linux/kernel/v4.x/linux-$pkgver.tar.gz sigcld.patch usbip.initd usbip.confd" -_baseurl="linux-$pkgver/drivers/staging/usbip/userspace" -_builddir="$srcdir"/userspace +_baseurl="linux-$pkgver/tools/usb/usbip" +builddir="$srcdir/usbip" + +unpack() { + cd "$srcdir" + + mkdir "$builddir" + tar -C $builddir --strip-components=4 -zxv -f $srcdir/linux-$pkgver.tar.gz $_baseurl +} prepare() { - mkdir -p "$srcdir" - mkdir -p "$_builddir" - tar -zxvf $srcdir/linux-$pkgver.tar.gz $_baseurl --strip-components=4 -C $_builddir - local i - cd "$_builddir" + cd "$builddir" for i in $source; do case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + *.patch) msg $i; patch -p1 -i "$srcdir"/$i;; esac done } build() { - cd "$_builddir" + cd "$builddir" export CFLAGS=$(echo $CFLAGS | sed 's|-Os|-O2|') export CPPFLAGS="$CFLAGS" /bin/sh autogen.sh @@ -45,25 +48,23 @@ build() { --infodir=/usr/share/info \ --libdir=/usr/lib \ --datarootdir=/usr/share - make || return 1 + make +} + +check() { + cd "$builddir" + ./src/usbip version + ./src/usbipd --version } package() { - cd "$_builddir" - make DESTDIR="$pkgdir" install || return 1 + cd "$builddir" + make DESTDIR="$pkgdir" install install -m755 -D "$srcdir"/usbip.initd "$pkgdir"/etc/init.d/usbip install -m755 -D "$srcdir"/usbip.confd "$pkgdir"/etc/conf.d/usbip } -md5sums="47dbb96b400c694d52ac61f2149aadfd linux-3.14.tar.gz -5d8ecbdfd0757538e59db7ea80b278a8 sigcld.patch -c3f342cdda80901668dd5c437899a9af usbip.initd -cc863a7da6390319cefa20297b35dd58 usbip.confd" -sha256sums="967fe34abb97456bd2484bc7fdae8240e696aa00c4b0079f8e1e4382ebada2ce linux-3.14.tar.gz -70b0a78cca949a5a834e0195676577a44461219056b5a9aab9ff329eb1425c3f sigcld.patch -bcb4ea61ddeb7e1ecb9abf7890c0e98ba11042dd2b7409c8f1823ffae3b26fd8 usbip.initd -f649eba29178dbaf903b938111f51994eb0e50a8fc004a1e85cc11fb598d5ecf usbip.confd" -sha512sums="5d00fc3808ac0896c8009f41471e29d60ba5912a2e9dc4da2464e690d8f66442f00f14189bd90d556293ca111aba33097f4df06606eeca0c857d1e25fb80ff07 linux-3.14.tar.gz +sha512sums="598696c4babb575a01796eb7ae618861a1292ef9be708e833131cefda8338622ce4e3d8584a4ecaa15529408f9c640d9a5bf8166c8cf8d116627b4c79f0bf0a6 linux-4.9.tar.gz 9572bcc378523cca337324b8519d87813310ae08a358811f8075d54f1e741eb68c8027f9073452e6e942178b46d2f2942d54e68f97f96665fcd6285cfebe07a7 sigcld.patch -102f03eca0d4fea382cb6ded11c3c432ee211659a21cd2a03cb0ec3d02ea9f5c9684360db5799b706e61ba1eb63c305815364a8b663372e905273ab441a07c6b usbip.initd +fcbd64d844c9bc187d08cef5995e91a46c0df78deb24e96ac9210c0e2c730eca0301970d9b8ffbf003df274682d05072431a26b59d8c491f396618268a12ec92 usbip.initd eb8de617e27c4d5fdfee9c442e8f74b0afb4d0fe7b59eca3a19629eb70fea7e09b3c125bc968aa8810d845ce661c829bd0f3fdb2288664f2cccf423bc0ae6ae8 usbip.confd" diff --git a/unmaintained/usbip-utils/sigcld.patch b/unmaintained/usbip-utils/sigcld.patch index 8616faec357..a2b6911a6a4 100644 --- a/unmaintained/usbip-utils/sigcld.patch +++ b/unmaintained/usbip-utils/sigcld.patch @@ -1,8 +1,7 @@ -diff --git a/src/usbipd.c b/src/usbipd.c -index 7980f8b..3ccf94f 100644 ---- a/src/usbipd.c -+++ b/src/usbipd.c -@@ -451,7 +451,7 @@ static void set_signal(void) +diff -urN a/usbip/src/usbipd.c b/usbip/src/usbipd.c +--- a/src/usbipd.c 2017-05-22 21:37:14.800713048 +0200 ++++ b/src/usbipd.c 2017-05-22 21:37:51.500808963 +0200 +@@ -463,7 +463,7 @@ sigaction(SIGTERM, &act, NULL); sigaction(SIGINT, &act, NULL); act.sa_handler = SIG_IGN; diff --git a/unmaintained/usbip-utils/usbip.initd b/unmaintained/usbip-utils/usbip.initd index 58e2358c31c..f0e908c721e 100644 --- a/unmaintained/usbip-utils/usbip.initd +++ b/unmaintained/usbip-utils/usbip.initd @@ -1,4 +1,4 @@ -#!/sbin/runscript +#!/sbin/openrc-run description="Load USBIP kernel modules and run daemon" @@ -18,12 +18,12 @@ LoadKernelModule () result= if [ -z "$(/sbin/lsmod | grep "^$(basename $module)")" ] then - local filename=$(/sbin/modprobe -l $module) + local filename=$(find lib/modules/`uname -r`/kernel -type f -name $module.ko -printf '%f\n') if [ -n "$filename" ] then - if ! /sbin/modprobe $filename + if ! /sbin/modprobe $module then - eerror "Cannot load kernel module '$filename'." + eerror "Cannot load kernel module '$module'." result=failed fi else |