build_gtk-gnutella-gtk2(){ HERE=`pwd` . ./desktop-file-utils-sc.inc || exit 1 #BUILDDEPS="compiletc.tcz Xorg-7.6-lib.tcz Xorg-7.6-dev.tcz gettext.tcz" PKGPATH=$1 export LDFLAGS="-L$PKGPATH/lib -L/apps/gtk2/lib" export CPPFLAGS="-I$PKGPATH/include -I/apps/gtk2/include" export PATH="$PKGPATH/bin:$PATH" export PKG_CONFIG_PATH="$PKGPATH/lib/pkgconfig:/apps/gtk2/lib/pkgconfig:$PKG_CONFIG_PATH" export LD_LIBRARY_PATH="$PKGPATH/lib:/apps/gtk2/lib" if [ ! -f "$TMPDIR"/desktop-file-utils ]; then build_desktop-file-utils "$PKGPATH" || exit 1 fi tar xvf gtk-gnutella-0.98.2.tar.bz2 || exit 1 cd gtk-gnutella-0.98.2 || exit 1 ./build.sh --prefix="$PKGPATH" || exit 1 make install PREFIX="$PKGPATH" || exit 1 mv "$PKGPATH"/bin/gtk-gnutella "$PKGPATH"/bin/gtk-gnutella-gtk2-bin echo "#!/bin/sh" > "$PKGPATH"/bin/gtk-gnutella-gtk2 echo " " >> "$PKGPATH"/bin/gtk-gnutella-gtk2 echo "export LD_LIBRARY_PATH="$PKGPATH/lib:/apps/gtk2/lib:\$LD_LIBRARY_PATH"" >> "$PKGPATH"/bin/gtk-gnutella-gtk2 echo "export PATH="$PKGPATH/bin:\$PATH"" >> "$PKGPATH"/bin/gtk-gnutella-gtk2 echo " " >> "$PKGPATH"/bin/gtk-gnutella-gtk2 echo "$PKGPATH/bin/gtk-gnutella-gtk2-bin \"\$@\"" >> "$PKGPATH"/bin/gtk-gnutella-gtk2 echo " " >> "$PKGPATH"/bin/gtk-gnutella-gtk2 chmod +x "$PKGPATH"/bin/gtk-gnutella-gtk2 touch "$TMPDIR"/gtk-gnutella-gtk2 }