Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Risolto] ebuild per pacchetto rpm
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
antonellocaroli
Guru
Guru


Joined: 11 Aug 2016
Posts: 509

PostPosted: Fri Feb 26, 2021 6:18 pm    Post subject: [Risolto] ebuild per pacchetto rpm Reply with quote

Ho due domande per come fare a creare una ebuild per installare un file .rpm

la prima é:

prima usavo, per lo stesso pacchetto, una ebuild che installava da file .deb
adesso mi serve la stessa ebuild ma che installa de file rpm...
cambiando la ebuild da pacchetto deb a rpm, prima di eseguire con l'istallazione devo rimuovere l'installazione precedente fatta con il pacchetto deb? o portage sa giá cosa fare?


la seconda é:

ho creato la ebuild, ma sembra che non installi niente, anche se sembra che finisca senza errori.

facendo a mano il comando che funziona é questo

rpm -i --nodeps nomepacchetto


la ebuild l avevo impostata cosi:


Code:
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=6

inherit eapi7-ver rpm

MY_PN=${PN/-bin/}

DESCRIPTION="HQPlayer - upsampling multichannel audio player"
HOMEPAGE="http://www.signalyst.com/consumer.html"
SRC_URI="https://www.signalyst.eu/bins/hqplayer/fc33/${MY_PN}-${PV}-16.fc33.x86_64.rpm"
#        https://www.signalyst.eu/bins/hqplayer/fc33/hqplayer4client-4.8.0-16.fc33.x86_64.rpm

LICENSE="Signalyst"
SLOT="0"
KEYWORDS="amd64"
RESTRICT="mirror bindist"

RDEPEND=">=sys-devel/gcc-5.1.0[openmp]
  >=app-arch/rpm-4.16.0
   >=dev-qt/qtcore-5.5.0
   >=dev-qt/qtgui-5.5.0
   >=dev-qt/qtnetwork-5.5.0
   >=dev-qt/qtdeclarative-5.5.0
   >=dev-qt/qtquickcontrols2-5.11.3"

DEPEND="${RDEPEND}"

S="${WORKDIR}"
QA_PREBUILT="usr/bin/hqplayer4client"

src_unpack() {
   rpm_src_unpack ${A}
}



Last edited by antonellocaroli on Sat Feb 27, 2021 1:48 am; edited 1 time in total
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30881
Location: here

PostPosted: Fri Feb 26, 2021 7:10 pm    Post subject: Reply with quote

Per installare un file rpm dovresti installare "manualmente" in src_install (con le funzione per l'installazione) i vari file estratti dal rpm.
Se erediti l'eclass unpacker puoi rimuovere la funzione src_unpack.

-- edit --
non serve ereditare unpacker basta rpm come hai gia' e rimuovere la funzione src_unpack.
Ho provato a creare l'ebuild e il risultato e' questo
hqplayer4client-bin-4.8.0.ebuild:
# Copyright 2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit desktop rpm

MY_PN=${PN/-bin/}

DESCRIPTION="HQPlayer - upsampling multichannel audio player"
HOMEPAGE="http://www.signalyst.com/consumer.html"
SRC_URI="https://www.signalyst.eu/bins/hqplayer/fc33/${MY_PN}-${PV}-16.fc33.x86_64.rpm"

LICENSE="Signalyst"
SLOT="0"
KEYWORDS="amd64"
RESTRICT="mirror bindist"

RDEPEND="
    sys-devel/gcc[openmp]
    dev-qt/qtcore:5
    dev-qt/qtgui:5
    dev-qt/qtnetwork:5
    dev-qt/qtdeclarative:5
    dev-qt/qtquickcontrols2:5
"

S="${WORKDIR}"
QA_PREBUILT="usr/bin/hqplayer4client"

src_install() {
    dobin usr/bin/hqplayer4client
    domenu usr/share/applications/hqplayer4-client.desktop
    doicon usr/share/pixmaps/hqplayer4-client.png
}

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
antonellocaroli
Guru
Guru


Joined: 11 Aug 2016
Posts: 509

PostPosted: Fri Feb 26, 2021 8:01 pm    Post subject: Reply with quote

fedeliallalinea wrote:
Per installare un file rpm dovresti installare "manualmente" in src_install (con le funzione per l'installazione) i vari file estratti dal rpm.
Se erediti l'eclass unpacker puoi rimuovere la funzione src_unpack.

-- edit --
non serve ereditare unpacker basta rpm come hai gia' e rimuovere la funzione src_unpack.
Ho provato a creare l'ebuild e il risultato e' questo
hqplayer4client-bin-4.8.0.ebuild:
# Copyright 2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit desktop rpm

MY_PN=${PN/-bin/}

DESCRIPTION="HQPlayer - upsampling multichannel audio player"
HOMEPAGE="http://www.signalyst.com/consumer.html"
SRC_URI="https://www.signalyst.eu/bins/hqplayer/fc33/${MY_PN}-${PV}-16.fc33.x86_64.rpm"

LICENSE="Signalyst"
SLOT="0"
KEYWORDS="amd64"
RESTRICT="mirror bindist"

RDEPEND="
    sys-devel/gcc[openmp]
    dev-qt/qtcore:5
    dev-qt/qtgui:5
    dev-qt/qtnetwork:5
    dev-qt/qtdeclarative:5
    dev-qt/qtquickcontrols2:5
"

S="${WORKDIR}"
QA_PREBUILT="usr/bin/hqplayer4client"

src_install() {
    dobin usr/bin/hqplayer4client
    domenu usr/share/applications/hqplayer4-client.desktop
    doicon usr/share/pixmaps/hqplayer4-client.png
}


Grazie fedeliallalinea!!!!

una domanda ma come fai a capire che nell rpm esiste

usr/bin/hqplayer4client
usr/share/applications/hqplayer4-client.desktop
usr/share/pixmaps/hqplayer4-client.png


hai scompattato prima l'rpm? come?
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30881
Location: here

PostPosted: Fri Feb 26, 2021 8:15 pm    Post subject: Reply with quote

Si lo scopatti prima oppure esegui l'ebuild con ebuild /path/to/hqplayer4client-bin-4.8.0.ebuild unpack e poi guardi in /var/tmp/portage/media-sound/hqplayer4client-bin-4.8.0/work
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
antonellocaroli
Guru
Guru


Joined: 11 Aug 2016
Posts: 509

PostPosted: Sat Feb 27, 2021 2:37 am    Post subject: Reply with quote

fedeliallalinea wrote:
Si lo scopatti prima oppure esegui l'ebuild con ebuild /path/to/hqplayer4client-bin-4.8.0.ebuild unpack e poi guardi in /var/tmp/portage/media-sound/hqplayer4client-bin-4.8.0/work


Grazie!!!

in alcune ebuild ho usato in src_install la funzione

Code:
mv etc usr var "${D}" || die


é sbagliato? sarebbe meglio tipo

insinto /var
dodir /var/blabla

ecc
?
Back to top
View user's profile Send private message
fedeliallalinea
Administrator
Administrator


Joined: 08 Mar 2003
Posts: 30881
Location: here

PostPosted: Sat Feb 27, 2021 7:26 am    Post subject: Reply with quote

Non e' sbagliato ma si tende a fare usare le funzione di installazione gentoo che fanno diversi controlli oltre al semplice spostare/copiare.
Inoltre fare un mv di una cartella root come /usr senza sapere cosa ci sia dentro non e' il massimo (anche se installazione viene fatta prima in una sandbox).
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum