Gentoo Archives: gentoo-commits

From: "Andreas HAttel (dilfridge)" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-libs/linux-gpib: metadata.xml ChangeLog linux-gpib-3.2.15.ebuild
Date: Mon, 31 Jan 2011 22:29:49
Message-Id: 20110131222939.5502620057@flycatcher.gentoo.org
1 dilfridge 11/01/31 22:29:39
2
3 Added: metadata.xml ChangeLog linux-gpib-3.2.15.ebuild
4 Log:
5 New package, fixes bug 165399. Thanks to antonmx and Ben Schwartz for their work. Initially
6 pmasked since the ebuild still needs a lot of QA cleanup (especially concerning the language
7 bindings) and requires exotic hardware for testing.
8
9 (Portage version: 2.1.9.35/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.1 sci-libs/linux-gpib/metadata.xml
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/linux-gpib/metadata.xml?rev=1.1&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/linux-gpib/metadata.xml?rev=1.1&content-type=text/plain
16
17 Index: metadata.xml
18 ===================================================================
19 <?xml version="1.0" encoding="UTF-8"?>
20 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
21 <pkgmetadata>
22 <herd>sci-electronics</herd>
23 <maintainer>
24 <email>dilfridge@g.o</email>
25 <name>Andreas K. Huettel</name>
26 </maintainer>
27 <use>
28 <flag name='firmware'>Install firmware</flag>
29 </use>
30 </pkgmetadata>
31
32
33
34 1.1 sci-libs/linux-gpib/ChangeLog
35
36 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/linux-gpib/ChangeLog?rev=1.1&view=markup
37 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/linux-gpib/ChangeLog?rev=1.1&content-type=text/plain
38
39 Index: ChangeLog
40 ===================================================================
41 # ChangeLog for sci-libs/linux-gpib
42 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
43 # $Header: /var/cvsroot/gentoo-x86/sci-libs/linux-gpib/ChangeLog,v 1.1 2011/01/31 22:29:39 dilfridge Exp $
44
45 *linux-gpib-3.2.15 (31 Jan 2011)
46
47 31 Jan 2011; Andreas K. Huettel <dilfridge@g.o>
48 +linux-gpib-3.2.15.ebuild, +files/linux-gpib-3.2.15-build.patch,
49 +metadata.xml:
50 New package, fixes bug 165399. Thanks to antonmx and Ben Schwartz for
51 their work. Initially pmasked since the ebuild still needs a lot of QA
52 cleanup (especially concerning the language bindings) and requires exotic
53 hardware for testing.
54
55
56
57
58 1.1 sci-libs/linux-gpib/linux-gpib-3.2.15.ebuild
59
60 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/linux-gpib/linux-gpib-3.2.15.ebuild?rev=1.1&view=markup
61 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/linux-gpib/linux-gpib-3.2.15.ebuild?rev=1.1&content-type=text/plain
62
63 Index: linux-gpib-3.2.15.ebuild
64 ===================================================================
65 # Copyright 1999-2011 Gentoo Foundation
66 # Distributed under the terms of the GNU General Public License v2
67 # $Header: /var/cvsroot/gentoo-x86/sci-libs/linux-gpib/linux-gpib-3.2.15.ebuild,v 1.1 2011/01/31 22:29:39 dilfridge Exp $
68
69 EAPI=3
70
71 inherit base linux-mod autotools
72
73 DESCRIPTION="Kernel module and driver library for GPIB (IEEE 488.2) hardware"
74 HOMEPAGE="http://linux-gpib.sourceforge.net/"
75 SRC_URI="mirror://sourceforge/linux-gpib/${P}.tar.gz
76 firmware? ( http://linux-gpib.sourceforge.net/firmware/gpib_firmware-2006-11-12.tar.gz )"
77
78 LICENSE="GPL-2"
79 SLOT="0"
80 KEYWORDS="~amd64 ~x86"
81 IUSE="pcmcia static debug guile perl php python tcl doc firmware"
82
83 RDEPEND="
84 tcl? ( dev-lang/tcl )
85 guile? ( dev-scheme/guile )
86 perl? ( dev-lang/perl )
87 php? ( dev-lang/php )
88 python? ( dev-lang/python )
89 firmware? ( sys-apps/fxload )
90 "
91
92 DEPEND="${RDEPEND}
93 sys-kernel/module-rebuild
94 doc? ( app-text/docbook-sgml-utils )
95 "
96
97 PATCHES=( "${FILESDIR}/${P}-build.patch" )
98
99 pkg_setup () {
100 linux-mod_pkg_setup
101
102 case ${KV_MINOR} in
103 4) die "This version of Linux-GPIB requires a version 2.6.x of the Linux kernel. 2.4.x kernels are supported by Linux-GPIB versions 3.1.x." ;;
104 6) ;;
105 *) die "Unsupported kernel version '${KV}'." ;;
106 esac
107
108 if [ ${KV_PATCH} -lt 8 ] ; then
109 die "Kernel versions older than 2.6.8 are not supported."
110 fi
111 }
112
113 src_prepare () {
114 base_src_prepare
115 eautoreconf
116 }
117
118 src_configure() {
119 set_arch_to_kernel
120 econf \
121 $(use_enable pcmcia) \
122 $(use_enable static) \
123 $(use_enable debug driver-debug) \
124 $(use_enable guile guile-binding) \
125 $(use_enable perl perl-binding) \
126 $(use_enable php php-binding) \
127 $(use_enable python python-binding) \
128 $(use_enable tcl tcl-binding) \
129 $(use_enable doc documentation) \
130 --with-linux-srcdir=${KV_DIR} \
131 || die
132 }
133
134 src_compile() {
135 emake || die
136 }
137
138 src_install () {
139
140 FIRM_DIR=/usr/share/usb
141
142 # Here I changed the sbindir in order to install the gpib_config to /sbin,
143 # not /usr/sbin. This is done to enable running gpib_config from
144 # the modprobe.conf file: if /usr is not in the root file system,
145 # but a mounted partition then gpib_congig cannot be found in the moment when
146 # modprobe is run.
147 make \
148 DESTDIR=${D} \
149 INSTALL_MOD_PATH=${D} \
150 HOTPLUG_USB_CONF_DIR=${D}/etc/hotplug/usb \
151 USB_FIRMWARE_DIR=${D}${FIRM_DIR} \
152 docdir=/usr/share/doc/${PF}/html \
153 install || die "install problem"
154
155 echo "KERNEL==\"gpib[0-9]*\", MODE=\"0660\", GROUP=\"gpib\"" >> 99-gpib.rules
156 insinto /etc/udev/rules.d/
157 doins 99-gpib.rules
158
159 dodoc doc/linux-gpib.pdf ChangeLog AUTHORS README* NEWS
160
161 insinto /etc
162 newins util/templates/gpib.conf gpib.conf
163 newins util/templates/gpib.conf gpib.conf.example
164
165 if use pcmcia ; then
166 dodir /etc/pcmcia
167 insinto /etc/pcmcia
168 doins "${S}"/etc/pcmcia/*
169 fi
170
171 if use firmware ; then
172
173 dodir "${FIRM_DIR}/agilent_8237a"
174 insinto "${FIRM_DIR}/agilent_8237a"
175 doins "${WORKDIR}"/gpib_firmware-2006-11-12/agilent_8237a/*
176
177 dodir "${FIRM_DIR}/ni_gpib_usb_b"
178 insinto "${FIRM_DIR}/ni_gpib_usb_b"
179 doins "${WORKDIR}"/gpib_firmware-2006-11-12/ni_gpib_usb_b/*
180
181 dodir "/usr/share/linux-gpib/hp_82341"
182 insinto "/usr/share/linux-gpib/hp_82341"
183 doins "${WORKDIR}"/gpib_firmware-2006-11-12/hp_82341/*
184
185 fi
186 }
187
188 pkg_preinst () {
189 linux-mod_pkg_preinst
190 enewgroup gpib
191 }
192
193 pkg_postinst () {
194 linux-mod_pkg_postinst
195
196 einfo "You need to run the 'gpib_config' utility to setup the driver before"
197 einfo "you can use it. In order to do it automatically you can add to your"
198 einfo "start script something like this (supposing the appropriate driver"
199 einfo "is loaded on the startup):"
200 einfo " gpib_config --minor 0"
201 einfo ""
202 einfo "To give a user access to the computer's gpib board you will have to add"
203 einfo "them to the group 'gpib' or, you could change the permissions on the device"
204 einfo "files /dev/gpib[0-15] to something you like better, using 'chmod'."
205 einfo ""
206 einfo "Edit /etc/gpib.conf to match your interface board, and any devices you wish"
207 einfo "to open via ibfind(). See the documentation in /usr/share/linux-gpib/html for"
208 einfo "more information."
209 einfo ""
210
211 if use pcmcia ; then
212 einfo "For PCMCIA cards:"
213 einfo "All files needed for a PCMCIA board were copied to /etc/pcmcia."
214 einfo "You may wish to edit the options passed to the gpib_config call in the"
215 einfo "/etc/pcmcia/linux-gpib-pcmcia script."
216 einfo "You may need to send a SIGHUP signal to the cardmgr daemon to force it"
217 einfo "to reload the files in /etc/pcmcia (alternatively you could use your"
218 einfo "pcmcia init.d script to restart the cardmgr, or you could just reboot)."
219 einfo "The driver module will be loaded as needed by the cardmgr."
220 einfo ""
221 fi
222
223 if use firmware ; then
224 einfo "For Agilent (HP) 82341C and 82341D cards:"
225 einfo "The firmware for these boards is uploaded by passing the appropriate"
226 einfo "firmware file from /usr/share/linux-gpib/hp_82341 directory to"
227 einfo "gpib_config using the -I or --init-data command line option. Example:"
228 einfo "gpib_config --minor 0 --init-data \\"
229 einfo "/usr/share/linux-gpib/hp_82341/hp_82341c_fw.bin"
230 einfo ""
231 fi
232
233 }