Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Ebuild - pakiet z 2 plików źródłowych
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) Instalacja i sprzęt
View previous topic :: View next topic  
Author Message
gexcite
Tux's lil' helper
Tux's lil' helper


Joined: 24 Sep 2005
Posts: 116

PostPosted: Tue May 31, 2016 1:14 pm    Post subject: Ebuild - pakiet z 2 plików źródłowych Reply with quote

Nigdzie tego nie znalazłem, dlatego mam do Was zapytanie:

Muszę napisać ebuild, który ściągnie źródła w dwóch częściach. Jedna część to archiwum tar. Druga część to plik mp3. W archiwum też są mp3. I chodzi o to aby obie części zostały połączone w workdir. Potem zmieniam nazwy pikom i instaluję w lokalizacji docelowej. To wiem jak zrobić. Archiwum mi się ściąga, przetwarza i instaluje, ale nie wiem jak dorzucić jeszcze tylko tą jedną nieszczęsną pojedynczą mp3.
Back to top
View user's profile Send private message
sebas86
Guru
Guru


Joined: 01 May 2005
Posts: 568
Location: Szczecinek / Szczecin

PostPosted: Sat Jun 18, 2016 10:13 pm    Post subject: Reply with quote

Napisz dwa ebuildy i wykorzystaj mechanizm zależności.
_________________
Nieważne jaka dystrybucja, ważne, że Linux!
Back to top
View user's profile Send private message
gexcite
Tux's lil' helper
Tux's lil' helper


Joined: 24 Sep 2005
Posts: 116

PostPosted: Sun Jun 19, 2016 7:44 am    Post subject: Reply with quote

Na tą chwilę tak właśnie mam. Chciałem to wpakować w jeden, aby było bardziej elegancko. Mam wrażenie, że takie rozwiązanie widziałem, ale za nic nie mogę go znaleźć.
Back to top
View user's profile Send private message
Jacekalex
Guru
Guru


Joined: 17 Sep 2009
Posts: 553

PostPosted: Sun Feb 26, 2017 7:35 pm    Post subject: Reply with quote

gexcite wrote:
Na tą chwilę tak właśnie mam. Chciałem to wpakować w jeden, aby było bardziej elegancko. Mam wrażenie, że takie rozwiązanie widziałem, ale za nic nie mogę go znaleźć.


Eblit?

np glibc:
Code:
/var/portage/gentoo/sys-libs/glibc/files/eblits/common.eblit
/var/portage/gentoo/sys-libs/glibc/files/eblits/pkg_postinst.eblit
/var/portage/gentoo/sys-libs/glibc/files/eblits/pkg_preinst.eblit
/var/portage/gentoo/sys-libs/glibc/files/eblits/pkg_pretend.eblit
/var/portage/gentoo/sys-libs/glibc/files/eblits/pkg_setup.eblit
/var/portage/gentoo/sys-libs/glibc/files/eblits/src_compile.eblit
/var/portage/gentoo/sys-libs/glibc/files/eblits/src_configure.eblit
/var/portage/gentoo/sys-libs/glibc/files/eblits/src_install.eblit
/var/portage/gentoo/sys-libs/glibc/files/eblits/src_prepare.eblit
/var/portage/gentoo/sys-libs/glibc/files/eblits/src_test.eblit
/var/portage/gentoo/sys-libs/glibc/files/eblits/src_unpack.eblit


W ebuildzie sys-libs/glibc-2.23-r3:
Code:
eblit-include() {
   local skipable=false
   [[ $1 == "--skip" ]] && skipable=true && shift
   [[ $1 == pkg_* ]] && skipable=true

   local e v func=$1 ver=$2
   [[ -z ${func} ]] && die "Usage: eblit-include <function> [version]"
   for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do
      e="${FILESDIR}/eblits/${func}${v}.eblit"
      if [[ -e ${e} ]] ; then
         source "${e}"
         return 0
      fi
   done
   ${skipable} && return 0
   die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/"
}

# eblit-run-maybe <function>
# run the specified function if it is defined
eblit-run-maybe() {
   [[ $(type -t "$@") == "function" ]] && "$@"
}

# eblit-run <function> [version]
# aka: src_unpack() { eblit-run src_unpack ; }
eblit-run() {
   eblit-include --skip common "${*:2}"
   eblit-include "$@"
   eblit-run-maybe eblit-$1-pre
   eblit-${PN}-$1
   eblit-run-maybe eblit-$1-post
}


Pozdro
8)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) Instalacja i sprzęt 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