[gobolinux-users] Recipe-fu
Jonas Karlsson
jonka750 at student.liu.se
Fri Jan 26 22:57:13 UTC 2007
2007/1/26, Benjamin Bruheim <grolgh at gmail.com>:
> Hi,
>
> I'm trying to create some recipes. However I have no clue where to
> start. First for j2re, which is a bit complicated since the setup is
> entirely non standard. Secondly for wxpython which is multistep.
>
> First, j2re install is like this:
>
> PrepareProgram JRE 1.5.0_10
> cd to the created dir, execute the binary download.
> create symlinks (bin, man, lib)
> SymlinkProgram JRE
>
> .... however how would I create a recipe for this?
>
I've looked at creating a JDK recipe some time ago, but I got busy
with schoolwork, so I did never finish. You can look at my draft at
http://karlsson.sytes.net/~jonas/JDK_Recipe
What I was trying to do was basically, as we don't have a good way to
make the user agree to a license I wanted the user to download the
file manually and by that agreeing to the license there. And the
executable is really a shell script with payload. You can look at the
file in a text editor yourself and you can get some hints on how to
unpack it without having to be interactive.
In my recipe the "line_number=" row to look for an unique string that
was located just above the payload and then use that to extract the
payload (which actually is a zip archive). Then unzipped it and
installed it all as a manifest type recipe.
> And second, wxPython which was REALLY A CHORE. Geez. But it works. The
> steps follows (for CVS-build, but any >= 2.6 is the same anyway):
>
> """
> mkdir bld
> cd bld
> ../configure --prefix=/Programs/WxPython/CVS \
> --with-gtk \
> --with-gnomeprint \
> --with-opengl \
> --enable-debug \
> --enable-geometry \
> --enable-graphics_ctx \
> --enable-sound --with-sdl \
> --enable-mediactrl \
> --enable-display \
> --disable-debugreport \
> --with-libjpeg=builtin \
> --with-libpng=builtin \
> --with-libtiff=builtin \
> --with-zlib=builtin \
> --enable-unicode
>
> make \
> && make -C contrib/src/gizmos \
> && make -C contrib/src/stc
>
>
> make install \
> && make -C contrib/src/gizmos install \
> && make -C contrib/src/stc install
>
> SymlinkProgram WxPython CVS
>
> cd ../wxPython
>
> python setup.py install --prefix /Programs/WxPython/CVS
> """
>
> But I'm confused on how I would create such a recipe since it
> obviously breaks the design principle of Scripts.
>
That's actually easier than the JRE/JDK recipe.
For a separate build directory you need to specify
"needs_build_directory=yes". To use multiple make commands I'd use
some hooks, like pre_install(). So a rough recipe (without
compile_version and url et.c.) would look like
-----%<------------------------------------
needs_build_directory=yes
configure_options=(
"--with-gtk"
"--with-gnomeprint"
"--with-opengl"
"--enable-debug"
"--enable-geometry"
"--enable-graphics_ctx"
"--enable-sound"
"--with-sdl"
"--enable-mediactrl"
"--enable-display"
"--disable-debugreport"
"--with-libjpeg=builtin"
"--with-libpng=builtin"
"--with-libtiff=builtin"
"--with-zlib=builtin"
"--enable-unicode"
)
pre_install() {
make -C contrib/src/gizmos \
&& make -C contrib/src/stc
}
pre_link() {
make -C contrib/src/gizmos install \
&& make -C contrib/src/stc install
}
--->%-----------------------------
I'm not sure why you called "python setup.py install --prefix
/Programs/WxPython/CVS" last but if that was intentionally, it should
be added to "post_install()":
post_install() {
pushd ../wxPython &> /dev/null
python setup.py install --prefix /Programs/WxPython/CVS
popd &> /dev/null
}
Another question I had was: do you really want to enable debug
(--enable-debug)? And why are you using built in libraries? You should
use system libraries when possible.
--
/Jonas
More information about the gobolinux-users
mailing list