[Gelistirici] gentoo ebuild make_wrapper script nedir?
Emre Erenoglu
erenoglu at gmail.com
13 Haz 2010 Paz 11:44:56 EEST
2010/6/12 Burak Sezer <bburaksezer at gmail.com>
> Selam,
>
> make_wrapper eutils eclass'ı içinde tanımlanmış bir fonksiyon. Aşağıdaki
> gibi bir kodu var.
>
> # @FUNCTION: make_wrapper
> # @USAGE: <wrapper> <target> [chdir] [libpaths] [installpath]
> # @DESCRIPTION:
> # Create a shell wrapper script named wrapper in installpath
> # (defaults to the bindir) to execute target (default of wrapper) by
> # first optionally setting LD_LIBRARY_PATH to the colon-delimited
> # libpaths followed by optionally changing directory to chdir.
> make_wrapper() {
> local wrapper=$1 bin=$2 chdir=$3 libdir=$4 path=$5
> local tmpwrapper=$(emktemp)
> # We don't want to quote ${bin} so that people can pass complex
> # things as $bin ... "./someprog --args"
> cat << EOF > "${tmpwrapper}"
> #!/bin/sh
> cd "${chdir:-.}"
> if [ -n "${libdir}" ] ; then
> if [ "\${LD_LIBRARY_PATH+set}" = "set" ] ; then
> export LD_LIBRARY_PATH="\${LD_LIBRARY_PATH}:${libdir}"
> else
> export LD_LIBRARY_PATH="${libdir}"
> fi
> fi
> exec ${bin} "\$@"
> EOF
> chmod go+rx "${tmpwrapper}"
> if [[ -n ${path} ]] ; then
> (
> exeinto "${path}"
> newexe "${tmpwrapper}" "${wrapper}"
> ) || die
> else
> newbin "${tmpwrapper}" "${wrapper}" || die
> fi
> }
>
> eutils'in tüm koduna Portage'ın SVN deposunu kurcalayarak ya da doğuran
> Portage ağacını edinerek erişebilirsiniz.
>
> Not: eclass'lar Portage ağacı içindeki eclass dizini içinde bulunan,
> Python'daki kitaplıklara benzer kitaplıklardır.
>
Tesekkurler Burak,
Sen ve diger Burak'imiz Burak Caliskan sayesinde bu wrapper olayini anlamis
oldum. Neyse ki mandriva'da bir patch buldum, bu wrapper olayina gerek
kalmadi, dogrudan /usr/lib ve /usr/bin altina atabiliyorum su anda kutuphane
ve calistirilabilir dosyalari.
nx paketini playground'uma koydum, vaktin olursa bir goz atabilirsen
sevinirim, ayrica review'a da gondericem zaten.
Tekrar tesekkurler,
Emre
-------------- sonraki bölüm --------------
Bir HTML eklentisi temizlendi...
URL: <http://liste.pardus.org.tr/gelistirici/attachments/20100613/4b904aeb/attachment-0002.htm>
Gelistirici mesaj listesiyle ilgili
daha fazla bilgi