Magellan Linux

Contents of /branches/R11-stable/core/pciutils/pciutils-3.2.1-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 20126 - (show annotations) (download)
Tue Nov 26 10:21:04 2013 UTC (10 years, 5 months ago) by niro
File size: 1665 byte(s)
-release branches/R11-stable
1 # $Id$
2
3 PNAME="pciutils"
4 PVER="3.2.1"
5 PBUILD="r1"
6
7 PCAT="sys-apps"
8
9 DESCRIPTION="Various utilities dealing with the PCI bus."
10 HOMEPAGE="http://atrey.karlin.mff.cuni.cz/~mj/pciutils.html"
11
12 DEPEND=">= net-misc/wget-1.12
13 >= sys-apps/which-2.20
14 >= virtual/glibc"
15
16 SDEPEND=">= virtual/sed"
17
18 PROVIDE="virtual/pciutils"
19
20 SRCFILE="${PNAME}-${PVER}.tar.bz2"
21 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
22
23 sminclude mtools
24
25 SRC_URI=(
26 http://www.kernel.org/pub/software/utils/${PNAME}/${SRCFILE}
27 mirror://${PNAME}/${SRCFILE}
28 mirror://${PNAME}/${PNAME}-2.2.0-scan.patch
29 mirror://${PNAME}/${PNAME}-2.2.0-havepread.patch
30 )
31
32 UP2DATE="updatecmd http://www.kernel.org/pub/software/utils/${PNAME}/ | lasttarball"
33
34 src_prepare()
35 {
36 munpack ${SRCFILE} || die
37 cd ${SRCDIR}
38
39 # fix segfaults
40 mpatch ${PNAME}-2.2.0-scan.patch || die
41
42 # always assume that pread exist; all newer glibc support this
43 mpatch ${PNAME}-2.2.0-havepread.patch || die
44
45 # fix pathes
46 sed -i -e '/^PREFIX=/s:=.*:=/usr:' \
47 -e '/^IDSDIR=/s:=.*:=$(PREFIX)/share/misc:' \
48 -e "/^LIBDIR=/s:/lib:/$(mlibdir):" \
49 Makefile || die
50
51 # update pci-ids via internet (needs wget)
52 ./update-pciids.sh || die
53 }
54
55 src_compile()
56 {
57 cd ${SRCDIR}
58 # disable zlib support, or it breaks hal-0.5.10 pci support
59 mmake ZLIB=no DNS=yes OPT="${CFLAGS} -fPIC" || die
60 }
61
62 src_install()
63 {
64 cd ${SRCDIR}
65
66 # needed directories
67 minstalldir /usr/$(mlibdir) || die
68 minstalldir /usr/{include/pci,share/man} || die
69
70 mmake PREFIX=${BINDIR}/usr install || die
71
72 # our lib
73 minstallfile lib/libpci.\* /usr/$(mlibdir) || die
74
75 # missing header
76 minstallfile lib/\*.h /usr/include/pci || die
77
78 # docs
79 minstalldocs ChangeLog README TODO || die
80 }