View previous topic :: View next topic |
Author |
Message |
equinox0r l33t


Joined: 18 Feb 2004 Posts: 614
|
Posted: Wed Mar 16, 2005 1:30 pm Post subject: [solved] ebuild-fragen: inherit rpm |
|
|
hallöle..
ich bastel mir gerade mein erstes ebuild und hab da ne frage zum inherit-kommando.
aktuell hab ich das problem dass *irgendwann* das rpm zu einem tar.gz umgewandelt wird, nur weiss ich weder wann, noch wo das teil dann abgelegt wird und wie ich weiter verfahren kann um das archiv zu entpacken und schliesslich übers / zu kopieren.
das ebuild gibts atm in 2 versionen, einmal mit und nochmal ohne inherit (da funktioniert alles soweit, nur wäre es wohl mit inherit schöner):
alt: Code: | SLOT="0"
MY_P="NeroLINUX-${PV}-6-intel"
DESCRIPTION="NeroReloaded for Linux"
HOMEPAGE="http://www.nero.com/de/NeroLINUX.html"
SRC_URI="${MY_P}.rpm"
LICENSE="ahead-nerolinux"
KEYWORDS="~x86"
IUSE=""
RESTRICT="fetch nostrip"
TGZ_FILE="${MY_P}.tar.gz"
RDEPEND="x11-libs/gtk+
app-arch/rpm2targz"
pkg_nofetch() {
einfo "Please download the appropriate Nero RPM (${SRC_URI})"
einfo "from ${HOMEPAGE} (requires a Nero subscription)"
einfo
einfo "Then put the file in ${DISTDIR}"
}
pkg_setup() {
if [ ! -e ${DISTDIR}/${TGZ_FILE} ]; then
einfo "Converting RPM to .tar.gz..."
cd ${DISTDIR}
[ ! -e ${DISTDIR}/${TGZ_FILE} ] && rpm2targz ${DISTDIR}/${SRC_URI}
fi
}
src_unpack() {
tar -C ${WORKDIR} -xzf ${DISTDIR}/${TGZ_FILE}
}
src_install() {
mv ${WORKDIR}/usr ${D}/
} |
neu: Code: | inherit rpm
SLOT="0"
MY_P="NeroLINUX-${PV}-6-intel"
DESCRIPTION="NeroReloaded for Linux"
HOMEPAGE="http://www.nero.com/de/NeroLINUX.html"
SRC_URI="${MY_P}.rpm"
LICENSE="ahead-nerolinux"
KEYWORDS="~x86"
IUSE=""
RESTRICT="fetch nostrip"
RDEPEND="x11-libs/gtk+"
pkg_nofetch() {
einfo "Please download the appropriate Nero RPM (${SRC_URI})"
einfo "from ${HOMEPAGE} (requires a Nero subscription)"
einfo
einfo "Then put the file in ${DISTDIR}"
}
src_unpack() {
tar -C ${WORKDIR} -xzf /${MY_P}.tar.gz
}
src_install() {
mv ${WORKDIR}/usr ${D}/
} |
thx für alles was mir helfen kann (ja die ebuild howto's und manpages hab ich gelesen, nur steht da relativ wenig zum inherit kommando)  _________________ AMD 2400+ XP | 1024 MB RAM | ATI Radeon 9600Pro
Gentoo Base System version 1.4.16 | Portage 2.0.51.19 | 2.6.11-gentoo-r9 Kernel
Last edited by equinox0r on Wed Mar 16, 2005 2:23 pm; edited 1 time in total |
|
Back to top |
|
 |
Stormkings Guru


Joined: 27 Sep 2002 Posts: 352 Location: Europe
|
Posted: Wed Mar 16, 2005 1:43 pm Post subject: |
|
|
ich denke so könnte es gehen:
Code: |
src_unpack() {
rpm_src_unpack
...
} |
|
|
Back to top |
|
 |
equinox0r l33t


Joined: 18 Feb 2004 Posts: 614
|
Posted: Wed Mar 16, 2005 2:18 pm Post subject: |
|
|
hm... soweit ich das verstanden hatte macht der das schon automatisch?
bleibt noch die frage wohin das .tar.gz hinterher abgelegt wird? _________________ AMD 2400+ XP | 1024 MB RAM | ATI Radeon 9600Pro
Gentoo Base System version 1.4.16 | Portage 2.0.51.19 | 2.6.11-gentoo-r9 Kernel |
|
Back to top |
|
 |
equinox0r l33t


Joined: 18 Feb 2004 Posts: 614
|
Posted: Wed Mar 16, 2005 2:23 pm Post subject: |
|
|
ah ok .. habs jetzt
die eclass ist so nett und entpackt das ganze für mich ins working directory _________________ AMD 2400+ XP | 1024 MB RAM | ATI Radeon 9600Pro
Gentoo Base System version 1.4.16 | Portage 2.0.51.19 | 2.6.11-gentoo-r9 Kernel |
|
Back to top |
|
 |
|