Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3244 - (show annotations) (download)
Mon Sep 19 19:07:56 2011 UTC (12 years, 8 months ago) by niro
File size: 1662 byte(s)
-fixed src_dir handling
1 # $Id$
2
3 PNAME="usbip"
4 PVER="0.1.7"
5 PBUILD="r2"
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}"
20
21 ALX_ONLY_KEEP="etc usr/bin usr/sbin 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 mirror://${PNAME}/${PNAME}-${PVER}-bind-parseable-output.patch
32 )
33
34 UP2DATE="updatecmd_sourceforge ${PNAME}"
35
36 # TODO: obsolete dev daemon with a udev rule
37
38 src_prepare()
39 {
40 munpack ${SRCFILE} || die
41 cd ${SRCDIR}
42
43 # add support for parseable output cmd '--list2'
44 mpatch ${PNAME}-${PVER}-bind-parseable-output.patch || die
45
46 mautoreconf || die
47 }
48
49 src_compile()
50 {
51 cd ${SRCDIR}/src
52 mconfigure --with-usbids-dir=/usr/share/misc || die
53 }
54
55 alx_generic_src_install()
56 {
57 cd ${SRCDIR}/src
58 mmake DESTDIR=${BINDIR} install || die
59
60 # install daemons, rc scripts and configuration
61 minstallrc usbipd.rc usbipd || die
62 minstallrc usbipdevd.rc usbipdevd || die
63 minstallconf usbipdevd2.confd usbipdevd || die
64 minstalldir /usr/sbin || die
65 minstallexec -s usbipdevd2 /usr/sbin/usbipdevd || die
66 }
67
68 preinstall()
69 {
70 add_conf_prot_mask /etc/rc.d/init.d
71 add_conf_prot_ignore /etc/conf.d/usbipdevd
72 }
73
74 postinstall()
75 {
76 mstartservice usbipd
77 mstartservice usbipdevd
78 }
79
80 postremove()
81 {
82 mstopservice usbipd
83 mstopservice usbipdevd
84 }