Magellan Linux

Annotation of /branches/magellan-next/core/pciutils/pciutils-3.1.7-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 6024 - (hide annotations) (download)
Wed Aug 18 00:49:45 2010 UTC (13 years, 9 months ago) by niro
File size: 1827 byte(s)
auto added: ver bump to 3.1.7-r1
1 niro 6024 # $Id: pciutils-3.1.4-r1.smage2 3118 2009-10-13 14:29:09Z niro $
2    
3     PNAME="pciutils"
4     PVER="3.1.7"
5     PBUILD="r1"
6    
7     PCATEGORIE="sys-apps"
8     STATE="unstable"
9    
10     DESCRIPTION="Various utilities dealing with the PCI bus."
11     HOMEPAGE="http://atrey.karlin.mff.cuni.cz/~mj/pciutils.html"
12    
13     DEPEND=">= net-misc/wget-1.12
14     >= sys-apps/which-2.20
15     >= virtual/glibc"
16    
17     SDEPEND=">= sys-apps/sed-4"
18    
19     SRCFILE="${PNAME}-${PVER}.tar.gz"
20     SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
21    
22     sminclude mtools
23    
24     SRC_URI=(
25     ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci/${SRCFILE}
26     mirror://${PNAME}/${SRCFILE}
27     mirror://${PNAME}/${PNAME}-2.2.0-scan.patch
28     mirror://${PNAME}/${PNAME}-2.2.0-havepread.patch
29     mirror://${PNAME}/${PNAME}-2.2.4-buf.patch
30     )
31    
32     UP2DATE="updatecmd ftp://atrey.karlin.mff.cuni.cz/pub/linux/pci | lasttarball gz"
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     # truncate long device names
46     mpatch ${PNAME}-2.2.4-buf.patch || die
47    
48     # fix pathes
49     sed -i -e '/^PREFIX=/s:=.*:=/usr:' \
50     -e '/^IDSDIR=/s:=.*:=$(PREFIX)/share/misc:' \
51     -e "/^LIBDIR=/s:/lib:/$(mlibdir):" \
52     Makefile || die
53    
54     # update pci-ids via internet (needs wget)
55     ./update-pciids.sh || die
56     }
57    
58     src_compile()
59     {
60     cd ${SRCDIR}
61     # disable zlib support, or it breaks hal-0.5.10 pci support
62     mmake ZLIB=no DNS=yes OPT="${CFLAGS} -fPIC" || die
63     }
64    
65     src_install()
66     {
67     cd ${SRCDIR}
68    
69     # needed directories
70     minstalldir /usr/$(mlibdir) || die
71     minstalldir /usr/{include/pci,share/man} || die
72    
73     mmake PREFIX=${BINDIR}/usr install || die
74    
75     # our lib
76     minstallfile lib/libpci.\* /usr/$(mlibdir) || die
77    
78     # missing header
79     minstallfile lib/\*.h /usr/include/pci || die
80    
81     # docs
82     minstalldocs ChangeLog README TODO || die
83     }