* [gentoo-commits] dev/dilfridge:ni-experimental commit in: eclass/
@ 2011-06-07 17:18 Andreas Hüttel
0 siblings, 0 replies; 3+ messages in thread
From: Andreas Hüttel @ 2011-06-07 17:18 UTC (permalink / raw
To: gentoo-commits
commit: bc770f5a6bb0796720623fc8b6804382982463ac
Author: Andreas K. Huettel <andreas.huettel <AT> physik <DOT> uni-r <DOT> de>
AuthorDate: Tue Jun 7 17:13:59 2011 +0000
Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Jun 7 17:13:59 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/dilfridge.git;a=commit;h=bc770f5a
[eclass] Started general makeover
---
eclass/ni-driver.eclass | 73 ++++++++++++++++------------------------------
1 files changed, 26 insertions(+), 47 deletions(-)
diff --git a/eclass/ni-driver.eclass b/eclass/ni-driver.eclass
index 65d9037..39a5fd7 100644
--- a/eclass/ni-driver.eclass
+++ b/eclass/ni-driver.eclass
@@ -1,30 +1,31 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header $
+# $Header: $
+
+inherit eutils rpm
# @ECLASS: ni-driver.eclass
# @MAINTAINER:
# mail@akhuettel.de
# @BLURB: Class for handling National Instruments linux device driver packages.
-inherit eutils rpm
+# @ECLASS-VARIABLE: EAPI
+# @DESCRIPTION:
+# Currently the ni-driver eclass supports EAPI 4.
+case ${EAPI:-0} in
+ 4) : ;;
+ *) die "EAPI=${EAPI} is not supported" ;;
+esac
HOMEPAGE="${HOMEPAGE:-http://www.ni.com/}"
RESTRICT="${RESTRICT:-bindist mirror primaryuri}"
LICENSE="${LICENSE:-ni-visa}"
DEPEND="app-cdr/poweriso"
+RDEPEND=""
NI_PREFIX="${NI_PREFIX:-/opt}"
-
-
-
-
-
-
-
-
# @FUNCTION: ni-driver_pkg_setup
# @USAGE:
# @DESCRIPTION:
@@ -47,14 +48,7 @@ ni-driver_pkg_setup() {
fi
}
-
-
-
-
-
-
-
-distiso_unpack() {
+_ni_distiso_unpack() {
local infile=${1}
local outdir=$(basename ${infile}).dir
@@ -65,7 +59,7 @@ distiso_unpack() {
NI_DISTDIRS=( ${NI_DISTDIRS} "${outdir}" )
}
-disttgz_unpack() {
+_ni_disttgz_unpack() {
local infile=${1}
local outdir=$(basename ${1}).dir
@@ -77,12 +71,6 @@ disttgz_unpack() {
NI_DISTDIRS=( ${NI_DISTDIRS} "${outdir}" )
}
-
-
-
-
-
-
# @FUNCTION: ni-drivers_src_unpack
# @USAGE: <isofiles> <targzfiles>
# @DESCRIPTION:
@@ -94,8 +82,8 @@ ni-driver_src_unpack() {
# First, unpack the downloaded iso or tgz files.
for a in ${A} ; do
case ${a} in
- *.iso) distiso_unpack "${a}" ;;
- *.tar.gz) disttgz_unpack "${a}" ;;
+ *.iso) _ni_distiso_unpack "${a}" ;;
+ *.tar.gz) _ni_disttgz_unpack "${a}" ;;
esac
done
@@ -123,35 +111,26 @@ ni-driver_src_unpack() {
fi
einfo rpm file\(s\) for installation found: ${NI_RPMFILES[*]}
- # ... and unpack the rpm files.
+ # ... and unpack the rpm files, all into the default workdir
for a in ${NI_RPMFILES} ; do
- dir=$(basename $a).dir
- mkdir "${S}/${dir}"
- cd "${S}/${dir}"
+ mkdir -p "${S}/unpacked"
+ cd "${S}/unpacked"
rpm_unpack ./../${a}
- NI_RPMDIRS=( ${NI_RPMDIRS} "${dir}" )
done
+
+ # reset S to new value
+ S=${S}/unpacked
}
-
-
-
-
-
-
-
-
# @FUNCTION: ni-driver_pkg_postinst
# @USAGE:
# @DESCRIPTION:
# pkg_setup phase, doing some preparation checks
ni-driver_pkg_postinst() {
- elog
- elog Important - do not try to update this driver installation of ${PN} with the NI installer.
- elog If you want to use the NI installer, first remove all related ebuilds!
- elog
+ echo
+ elog "Important - do not try to update this installation of ${PN} with the NI installer."
+ elog "If you want to use the NI driver installer, first remove all related ebuilds!"
+ echo
}
-
-
EXPORT_FUNCTIONS pkg_setup src_unpack pkg_postinst
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] dev/dilfridge:ni-experimental commit in: eclass/
@ 2011-06-07 18:39 Andreas Hüttel
0 siblings, 0 replies; 3+ messages in thread
From: Andreas Hüttel @ 2011-06-07 18:39 UTC (permalink / raw
To: gentoo-commits
commit: ec2c2d4b8d368dae661b6519823b9a689c83cb3a
Author: Andreas K. Huettel <andreas.huettel <AT> physik <DOT> uni-r <DOT> de>
AuthorDate: Tue Jun 7 18:30:44 2011 +0000
Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Jun 7 18:30:44 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/dilfridge.git;a=commit;h=ec2c2d4b
[eclass] Fix the rpm selection
---
eclass/ni-driver.eclass | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/eclass/ni-driver.eclass b/eclass/ni-driver.eclass
index 39a5fd7..186c96b 100644
--- a/eclass/ni-driver.eclass
+++ b/eclass/ni-driver.eclass
@@ -105,17 +105,26 @@ ni-driver_src_unpack() {
# Then, search for the rpm files that were in there...
if [ ${#NI_RPMFILES[*]} -eq 0 ]; then
+ # no list given - use all
for a in ${NI_TARDIRS} ; do
- NI_RPMFILES=$(find "${S}/${a}" -name "*.rpm"|sed -e "s#^${S}/##")
+ NI_RPMS=$(find "${S}/${a}" -name "*.rpm"|sed -e "s#^${S}/##")
+ done
+ else
+ NI_RPMS=""
+ # find rpms matching the given globs
+ for g in ${NI_RPMFILES[@]} ; do
+ for a in ${NI_TARDIRS} ; do
+ NI_RPMS+="$(find "${S}/${a}" -name "${g}"|sed -e "s#^${S}/##") "
+ done
done
fi
- einfo rpm file\(s\) for installation found: ${NI_RPMFILES[*]}
+ einfo rpm file\(s\) for installation found: ${NI_RPMS[*]}
# ... and unpack the rpm files, all into the default workdir
- for a in ${NI_RPMFILES} ; do
- mkdir -p "${S}/unpacked"
- cd "${S}/unpacked"
- rpm_unpack ./../${a}
+ mkdir -p "${S}/unpacked"
+ cd "${S}/unpacked"
+ for a in ${NI_RPMS} ; do
+ rpm_unpack "./../${a}"
done
# reset S to new value
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] dev/dilfridge:ni-experimental commit in: eclass/
@ 2011-06-07 19:44 Andreas Hüttel
0 siblings, 0 replies; 3+ messages in thread
From: Andreas Hüttel @ 2011-06-07 19:44 UTC (permalink / raw
To: gentoo-commits
commit: 162f46100813558ebaa7f7be4bfcd71a97cdadcf
Author: Andreas K. Huettel <andreas.huettel <AT> physik <DOT> uni-r <DOT> de>
AuthorDate: Tue Jun 7 19:39:35 2011 +0000
Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Tue Jun 7 19:39:35 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/dilfridge.git;a=commit;h=162f4610
[eclass] Add share dir function
---
eclass/ni-driver.eclass | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/eclass/ni-driver.eclass b/eclass/ni-driver.eclass
index 186c96b..9f1ef9e 100644
--- a/eclass/ni-driver.eclass
+++ b/eclass/ni-driver.eclass
@@ -142,4 +142,8 @@ ni-driver_pkg_postinst() {
echo
}
+get-nisharedir() {
+ echo -n "${NI_PREFIX}/natinst/share"
+}
+
EXPORT_FUNCTIONS pkg_setup src_unpack pkg_postinst
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-06-07 19:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-07 17:18 [gentoo-commits] dev/dilfridge:ni-experimental commit in: eclass/ Andreas Hüttel
-- strict thread matches above, loose matches on Subject: below --
2011-06-07 18:39 Andreas Hüttel
2011-06-07 19:44 Andreas Hüttel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox