Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index International Gentoo Users Polskie forum (Polish) Instalacja i sprzęt
  • Search

Ebuild - pakiet z 2 plików źródłowych

Pytania i problemy związane z instalacją Gentoo oraz sprzętem

Moderator: SlashBeast

Post Reply
  • Print view
Advanced search
4 posts • Page 1 of 1
Author
Message
gexcite
Tux's lil' helper
Tux's lil' helper
Posts: 116
Joined: Sat Sep 24, 2005 7:01 am

Ebuild - pakiet z 2 plików źródłowych

  • Quote

Post by gexcite » Tue May 31, 2016 1:14 pm

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.
Top
sebas86
Guru
Guru
User avatar
Posts: 571
Joined: Sun May 01, 2005 8:22 am
Location: Szczecinek / Szczecin
Contact:
Contact sebas86
Website

  • Quote

Post by sebas86 » Sat Jun 18, 2016 10:13 pm

Napisz dwa ebuildy i wykorzystaj mechanizm zależności.
Nieważne jaka dystrybucja, ważne, że Linux!
Top
gexcite
Tux's lil' helper
Tux's lil' helper
Posts: 116
Joined: Sat Sep 24, 2005 7:01 am

  • Quote

Post by gexcite » Sun Jun 19, 2016 7:44 am

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źć.
Top
Jacekalex
Guru
Guru
User avatar
Posts: 554
Joined: Thu Sep 17, 2009 5:18 am

  • Quote

Post by Jacekalex » Sun Feb 26, 2017 7:35 pm

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: Select all

/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: Select all

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)
Top
Post Reply
  • Print view

4 posts • Page 1 of 1

Return to “Instalacja i sprzęt”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy