Magellan Linux

Contents of /smage/trunk/extras/usbip/usbip-0.1.7-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3235 - (show annotations) (download)
Mon Sep 19 16:10:21 2011 UTC (12 years, 8 months ago) by niro
File size: 1474 byte(s)
-added devdaemon and rc scripts
1 # $Id$
2
3 PNAME="usbip"
4 PVER="0.1.7"
5 PBUILD="r1"
6
7 PCATEGORIE="net-misc"
8
9 DESCRIPTION="USB Enumerator over TCP/IP."
10 HOMEPAGE="http://usbip.sourceforge.net/"
11
12 DEPEND="dev-libs/glib2-2.8
13 >= sys-fs/sysfsutils-2.1"
14
15 SDEPEND=">= sys-dev/autoconf-9
16 >= sys-dev/automake-4"
17
18 SRCFILE="${PNAME}-${PVER}.tar.gz"
19 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}/src"
20
21 ALX_ONLY_KEEP="etc usr/bin usr/$(mlibdir)/*.so usr/$(mlibdir)/*.so.*"
22 sminclude mtools alx-split
23
24 SRC_URI=(
25 sourceforge://${PNAME}/${SRCFILE}
26 mirror://${PNAME}/${SRCFILE}
27 mirror://${PNAME}/usbipd.rc
28 mirror://${PNAME}/usbipdevd2
29 mirror://${PNAME}/usbipdevd2.confd
30 mirror://${PNAME}/usbipdevd.rc
31 )
32
33 UP2DATE="updatecmd_sourceforge ${PNAME}"
34
35 # TODO: obsolete dev daemon with a udev rule
36
37 src_prepare()
38 {
39 munpack ${SRCFILE} || die
40 cd ${SRCDIR}
41
42 mautoreconf || die
43 }
44
45 src_compile()
46 {
47 cd ${SRCDIR}
48 mconfigure --with-usbids-dir=/usr/share/misc || die
49 }
50
51 alx_generic_src_install()
52 {
53 cd ${SRCDIR}
54 mmake DESTDIR=${BINDIR} install || die
55
56 # install daemons, rc scripts and configuration
57 minstallrc usbipd.rc usbipd || die
58 minstallrc usbipdevd.rc usbipdevd || die
59 minstallconf usbipdevd2.confd usbipdevd || die
60 minstalldir /usr/sbin || die
61 minstallexec -s usbipdevd2 /usr/sbin/usbipdevd || die
62 }
63
64 preinstall()
65 {
66 add_conf_prot_mask /etc/rc.d/init.d
67 add_conf_prot_ignore /etc/conf.d/usbipdevd
68 }
69
70 postinstall()
71 {
72 mstartservice usbipd
73 mstartservice usbipdevd
74 }
75
76 postremove()
77 {
78 mstopservice usbipd
79 mstopservice usbipdevd
80 }