Contents of /branches/magellan-next/core/pciutils/pciutils-3.1.8-r1.smage2
Parent Directory | Revision Log
Revision 9043 -
(show annotations)
(download)
Mon Oct 3 13:19:08 2011 UTC (12 years, 11 months ago) by niro
File size: 1637 byte(s)
Mon Oct 3 13:19:08 2011 UTC (12 years, 11 months ago) by niro
File size: 1637 byte(s)
-removed buffer patch
1 | # $Id$ |
2 | |
3 | PNAME="pciutils" |
4 | PVER="3.1.8" |
5 | PBUILD="r1" |
6 | |
7 | PCATEGORIE="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=">= sys-apps/sed-4" |
17 | |
18 | SRCFILE="${PNAME}-${PVER}.tar.gz" |
19 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
20 | |
21 | sminclude mtools |
22 | |
23 | SRC_URI=( |
24 | ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/${SRCFILE} |
25 | mirror://${PNAME}/${SRCFILE} |
26 | mirror://${PNAME}/${PNAME}-2.2.0-scan.patch |
27 | mirror://${PNAME}/${PNAME}-2.2.0-havepread.patch |
28 | ) |
29 | |
30 | UP2DATE="updatecmd ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci | lasttarball gz" |
31 | |
32 | src_prepare() |
33 | { |
34 | munpack ${SRCFILE} || die |
35 | cd ${SRCDIR} |
36 | |
37 | # fix segfaults |
38 | mpatch ${PNAME}-2.2.0-scan.patch || die |
39 | |
40 | # always assume that pread exist; all newer glibc support this |
41 | mpatch ${PNAME}-2.2.0-havepread.patch || die |
42 | |
43 | # fix pathes |
44 | sed -i -e '/^PREFIX=/s:=.*:=/usr:' \ |
45 | -e '/^IDSDIR=/s:=.*:=$(PREFIX)/share/misc:' \ |
46 | -e "/^LIBDIR=/s:/lib:/$(mlibdir):" \ |
47 | Makefile || die |
48 | |
49 | # update pci-ids via internet (needs wget) |
50 | ./update-pciids.sh || die |
51 | } |
52 | |
53 | src_compile() |
54 | { |
55 | cd ${SRCDIR} |
56 | # disable zlib support, or it breaks hal-0.5.10 pci support |
57 | mmake ZLIB=no DNS=yes OPT="${CFLAGS} -fPIC" || die |
58 | } |
59 | |
60 | src_install() |
61 | { |
62 | cd ${SRCDIR} |
63 | |
64 | # needed directories |
65 | minstalldir /usr/$(mlibdir) || die |
66 | minstalldir /usr/{include/pci,share/man} || die |
67 | |
68 | mmake PREFIX=${BINDIR}/usr install || die |
69 | |
70 | # our lib |
71 | minstallfile lib/libpci.\* /usr/$(mlibdir) || die |
72 | |
73 | # missing header |
74 | minstallfile lib/\*.h /usr/include/pci || die |
75 | |
76 | # docs |
77 | minstalldocs ChangeLog README TODO || die |
78 | } |