Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[risolto] ebuilds, SVN e tarball statici
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
syntaxerrormmm
Guru
Guru


Joined: 17 Apr 2005
Posts: 449
Location: Romano di Lombardia - BG - ITALY

PostPosted: Wed Jun 28, 2006 8:09 pm    Post subject: [risolto] ebuilds, SVN e tarball statici Reply with quote

Ho una domanda un po' strana da fare. Sto scrivendo un'ebuild che prende un sw da SVN, se fosse solo questo nessun problema.

Il problema sorge quando, oltre al co dell'SVN, io devo scaricare, scompattare ed installare i files provenienti da un tarball non inserito in SVN, vi posto le righe salienti:
Code:
ESVN_REPO_URI="https://svn.qgis.org/repos/qgis/trunk/qgis"
ESVN_PROJECT="qgis_unstable"
SRC_URI="http://qgis.org/uploadfiles/qgis_sample_data.tar.gz"
Ora, il primo vero problema è l'unpack; se non definisco una funzione src_unpack, di default installa solamente ciò che ha scaricato da SVN e tralascia il tarball.

Ho provato con un
Code:
src_unpack() {
    cd ${S}
    subversion_src_unpack
    epatch ${FILESDIR}/qt4-acinclude.patch
    unpack ${A}
}
ma devo dire che i risultati non ci sono...

Qualcuno mi da' una mano? Grazie mille.
_________________
"Every rule can be broken, but no rule may be ignored."

Last.fm - Gentoo 2006.1 on:
Acer Aspire 1355LC - suspend2-sources-2.6.18-r3
IBM Thinkpad T30 - suspend2-sources-2.6.19-r3


Last edited by syntaxerrormmm on Thu Jun 29, 2006 3:16 pm; edited 1 time in total
Back to top
View user's profile Send private message
Cazzantonio
Bodhisattva
Bodhisattva


Joined: 20 Mar 2004
Posts: 4514
Location: Somewere around the world

PostPosted: Thu Jun 29, 2006 9:33 am    Post subject: Reply with quote

Moved from Forum italiano (Italian) to Forum di discussione italiano.
_________________
Any mans death diminishes me, because I am involved in Mankinde; and therefore never send to know for whom the bell tolls; It tolls for thee.
-John Donne
Back to top
View user's profile Send private message
Scen
Retired Dev
Retired Dev


Joined: 29 Jul 2003
Posts: 2470
Location: Padova, Italy

PostPosted: Thu Jun 29, 2006 12:42 pm    Post subject: Reply with quote

@Cazzantonio: per me questo topic sta benissimo nella sezione principale "Forum italiano", in quanto riguarda direttamente Gentoo, più precisamente una richiesta di aiuto sulla creazione di un ebuild (più Gentoo di così... 8) )

@syntaxerrormmm
Puoi dare qualche dettaglio un più?
Se esegui
Code:

ebuild tuoebuild.ebuild unpack

ti dà qualche errore? oppure fila liscio ma alla fine il tar.gz non viene scompattato correttamente?
_________________
I was born in a deep forest/I wish I could live here all my life/I am made from stones and roots/My home, these woods and roads
All my life I loved this sound/Of the woods all around/Eagles flies where the winds blows free
Journey is my destiny
Back to top
View user's profile Send private message
syntaxerrormmm
Guru
Guru


Joined: 17 Apr 2005
Posts: 449
Location: Romano di Lombardia - BG - ITALY

PostPosted: Thu Jun 29, 2006 2:53 pm    Post subject: Reply with quote

Ciao e grazie della risposta,

devo dire che effettivamente anche io sono rimasto 'toccato' dallo spostamento del topic... ma pazienza, anche qui dove è il post va bene lo stesso :) Come indicazione futura, vorrei sapere da Cazzantonio come mai ha ritenuto che questo thread dovesse essere spostato :)

Tornando IT, non torna errore ma il tarball non è decompresso in nessuna delle cartelle in ${S}; è presente un link al tarball in ${S}/distdir
Code:
# ebuild /usr/local/portage/sci-geosciences/qgis-svn/qgis-svn-20060628.ebuild unpack
>>> checking ebuild checksums ;-)
>>> checking auxfile checksums ;-)
>>> checking miscfile checksums ;-)
>>> checking qgis_sample_data.tar.gz ;-)
 * Mounting /var/tmp/portage/qgis-svn-20060628 of [ 500M ] ...                [ ok ]
 * Please remember that ccache data dir is outside the newly mounted
 * portage temporary directory, to preserve the spool between merges.
>>> Unpacking source...
 * subversion update start -->
 *      repository: https://svn.qgis.org/repos/qgis/trunk/qgis
Errore nella validazione del certificato del server per 'https://svn.qgis.org:443':
 - Il certificato non è stato creato da un'autorità fidata.
   Usa il codice di fingerprint per verificare il certificato manualmente!
Informazioni del certificato:
 - Nome host: svn.qgis.org
 - Valido: dal Apr  1 00:30:47 2006 GMT al Mar 21 00:30:47 2008 GMT
 - Autorità: Developer Team, Quantum GIS, Anchorage, Alaska, US
 - Fingerprint: 2f:cd:f1:5a:c7:64:da:2b:d1:34:a5:20:c6:15:67:28:33:ea:7a:9b
(R)ifiuta, accetta (t)emporaneamente o accetta (p)ermanentemente? t
Alla revisione 5554.
 *    working copy: /usr/portage/distfiles/svn-src/qgis_unstable/qgis

 * Applying qt4-acinclude.patch ...                                           [ ok ]
>>> Unpacking qgis_sample_data.tar.gz to /var/tmp/portage/qgis-svn-20060628/work/qgis-svn-20060628
>>> Source unpacked.
# cd /var/tmp/portage/qgis-svn-20060628/distdir/
# ls -l
totale 0
lrwxrwxrwx 1 root root 46 29 giu 16:44 qgis_sample_data.tar.gz -> /usr/portage/distfiles/qgis_sample_data.tar.gz


Vi incollo anche l'ebuild per maggiore chiarezza:
Code:
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit autotools eutils subversion

DESCRIPTION="Quantum GIS (QGIS) is a Geographic Information System (GIS)"
HOMEPAGE="http://www.qgis.org/"

ESVN_REPO_URI="https://svn.qgis.org/repos/qgis/trunk/qgis"
ESVN_PROJECT="qgis_unstable"
SRC_URI="http://qgis.org/uploadfiles/qgis_sample_data.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
IUSE="postgres grass gps gsl debug"

#need-qt 4

DEPEND="!sci-geosciences/qgis
   >=sci-libs/gdal-1.2.5
   >=dev-db/sqlite-3.2.1
   >=x11-libs/qt-4.1
   sci-libs/geos
   sci-libs/proj
   postgres? ( || (
      >=dev-db/postgresql-8
      dev-db/postgis ) )
   grass? ( || (
      >=sci-geosciences/grass-5.0.2
      sci-geosciences/grass-cvs ) )
   gps? ( sci-geosciences/gpsbabel )
   gsl? ( >=sci-libs/gsl-1.6 )"
RDEPEND=">=sci-libs/gdal-1.2.5
   >=dev-db/sqlite-3.2.1
   sci-libs/geos
   sci-libs/proj
   postgres? ( || (
      >=dev-db/postgresql-8
      dev-db/postgis ) )
   grass? ( || (
      >=sci-geosciences/grass-5.0.2
      sci-geosciences/grass-cvs ) )
   gps? ( sci-geosciences/gpsbabel )
   gsl? ( >=sci-libs/gsl-1.6 )"

src_unpack() {
   subversion_src_unpack
   cd ${S}
   epatch ${FILESDIR}/qt4-acinclude.patch
   unpack ${A}
}

src_compile() {
   cd "${S}"
   epatch ${FILESDIR}/qt4-acinclude-${PV}.patch
   local myconf
   myconf="--with-geos=$(which geos-config)\
      --with-projdir=/usr\
      --with-sqlite3dir=/usr\
      --with-qtdir=/usr\
      --with-gdal=$(which gdal-config)\
      --prefix=/usr"

   if use grass; then
      GRASS_ENVD="/etc/env.d/99grass /etc/env.d/99grass-cvs"
      for file in ${GRASS_ENVD}; do
         if test -r ${file}; then
            GRASS_PATH=$(sed -n 's/LDPATH="\(.*\)\/lib"$/\1/p' ${file});
         fi
      done

      myconf="${myconf} $(use_with grass grass ${GRASS_PATH})"
   fi

   myconf="${myconf}\
      $(use_with postgres postgresql)\
      $(use_enable gsl georef)\
      $(use_enable gps gpx)\
      $(use_enable debug)"
   "./autogen.sh" ${myconf} || die "Bootstrap and configure failed"
      
   emake -j1 || die "emake failed"
}

src_install() {
   cd "${S}"
   make DESTDIR="${D}" install || die "Installation failed"
   dodoc AUTHORS BUGS COPYING ChangeLog INSTALL NEWS README TODO || \
      die "Unable to install doc"
   
   cd "${WORKDIR}"
   insinto /usr/share/doc/${PF}/sample_data
   doins qgis_data/* || die "Unable to install sample data"
}

pkg_postinst() {
   einfo "You could find sample data to use with qgis in /usr/share/doc/${PF}/sample_data/"
}


Ciao e ancora grazie.
_________________
"Every rule can be broken, but no rule may be ignored."

Last.fm - Gentoo 2006.1 on:
Acer Aspire 1355LC - suspend2-sources-2.6.18-r3
IBM Thinkpad T30 - suspend2-sources-2.6.19-r3
Back to top
View user's profile Send private message
randomaze
Bodhisattva
Bodhisattva


Joined: 21 Oct 2003
Posts: 9985

PostPosted: Thu Jun 29, 2006 3:05 pm    Post subject: Reply with quote

syntaxerrormmm wrote:
devo dire che effettivamente anche io sono rimasto 'toccato' dallo spostamento del topic... ma pazienza, anche qui dove è il post va bene lo stesso :) Come indicazione futura, vorrei sapere da Cazzantonio come mai ha ritenuto che questo thread dovesse essere spostato :)


Perché eravamo daccordo che i thread di programmazione andassero nel forum di discussione, e, bene o male, un ebuild é programmazione ;-)
Il problema é che effettivamente é anche supporto a gentoo, quindi siamo un pò indecisi (ovvero stiamo discutendo tra noi...).


Tu sbrigati a finirlo così tagliamo al testa al toro e lo mettiamo nella documentazione :twisted:
_________________
Ciao da me!
Back to top
View user's profile Send private message
syntaxerrormmm
Guru
Guru


Joined: 17 Apr 2005
Posts: 449
Location: Romano di Lombardia - BG - ITALY

PostPosted: Thu Jun 29, 2006 3:09 pm    Post subject: Reply with quote

randomaze wrote:
Tu sbrigati a finirlo così tagliamo al testa al toro e lo mettiamo nella documentazione :twisted:
LOL, detto... fatto. :)

Le avevo provate tutte, ma non questa:
Code:
src_unpack() {
   subversion_src_unpack
   unpack ${A}
   cd ${S}
   epatch ${FILESDIR}/qt4-acinclude.patch
}
Notate l'unpack ${A} subito dopo il subversion_src_unpack... Quando l'ho cambiato credevo fosse solo questione di coerenza nelle azioni che componevano l'unpack, e invece...
Code:
>>> Unpacking qgis_sample_data.tar.gz to /var/tmp/portage/qgis-svn-20060628/work/qgis-svn-20060628

Grazie a tutti.
_________________
"Every rule can be broken, but no rule may be ignored."

Last.fm - Gentoo 2006.1 on:
Acer Aspire 1355LC - suspend2-sources-2.6.18-r3
IBM Thinkpad T30 - suspend2-sources-2.6.19-r3
Back to top
View user's profile Send private message
Cazzantonio
Bodhisattva
Bodhisattva


Joined: 20 Mar 2004
Posts: 4514
Location: Somewere around the world

PostPosted: Fri Jun 30, 2006 11:09 am    Post subject: Reply with quote

Moved from Forum di discussione italiano to Forum italiano (Italian).

scusate il ping-pog di spostamenti ma c'era un po' di indecisione tra i mods :)
_________________
Any mans death diminishes me, because I am involved in Mankinde; and therefore never send to know for whom the bell tolls; It tolls for thee.
-John Donne
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