blob: 3d306aa1ee122728d52cd1db67d6073294e4d4c2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
# Contributor: Der Tiger <der.tiger.alpine@arcor.de>
# Maintainer: wener <wenermail@gmail.com>
pkgname=usbip-utils
pkgver=4.16
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="GPL-2.0"
depends="glib sysfsutils usbutils"
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://cdn.kernel.org/pub/linux/kernel/v4.x/linux-$pkgver.tar.gz
usbip.initd
usbip.confd"
_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() {
local i
cd "$builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i;;
esac
done
}
build() {
cd "$builddir"
export CFLAGS=$(echo $CFLAGS | sed 's|-Os|-O2|')
export CPPFLAGS="$CFLAGS"
/bin/sh autogen.sh
./configure --prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--libdir=/usr/lib \
--datarootdir=/usr/share
make
}
check() {
cd "$builddir"
./src/usbip version
./src/usbipd --version
}
package() {
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
}
sha512sums="01d3322d2226d39a76aded6ffd0cf40098e0e5532b6780183b0ae9868454d7560da65095c44f056f6e2c086c46104070f2bd987010b75cae003235cb4f0192ce linux-4.16.tar.gz
fcbd64d844c9bc187d08cef5995e91a46c0df78deb24e96ac9210c0e2c730eca0301970d9b8ffbf003df274682d05072431a26b59d8c491f396618268a12ec92 usbip.initd
eb8de617e27c4d5fdfee9c442e8f74b0afb4d0fe7b59eca3a19629eb70fea7e09b3c125bc968aa8810d845ce661c829bd0f3fdb2288664f2cccf423bc0ae6ae8 usbip.confd"
|