build_emelfm2(){ HERE=`pwd` . ./file-sc.inc 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 emelfm2-0.8.0.tar.bz2 ]; then wget http://emelfm2.net/rel/emelfm2-0.8.0.tar.bz2 || exit 1 fi if [ ! -f "$TMPDIR"/file ]; then build_file "$PKGPATH" || exit 1 fi cp /apps/emelfm2/include/magic.h /usr/include/ tar xvf emelfm2-0.8.0.tar.bz2 cd emelfm2-0.8.0 make PREFIX="$PKGPATH" make install PREFIX="$PKGPATH" export EMELFM2=DONE mv "$PKGPATH"/bin/emelfm2 "$PKGPATH"/bin/emelfm2-bin echo "#!/bin/sh" > "$PKGPATH"/bin/emelfm2 echo " " >> "$PKGPATH"/bin/emelfm2 echo "export LD_LIBRARY_PATH="$PKGPATH/lib:$LD_LIBRARY_PATH"" >> "$PKGPATH"/bin/emelfm2 echo "export PATH="$PKGPATH/bin:$PATH"" >> "$PKGPATH"/bin/emelfm2 echo " " >> "$PKGPATH"/bin/emelfm2 echo "$PKGPATH/bin/emelfm2-bin \"\$@\"" >> "$PKGPATH"/bin/emelfm2 echo " " >> "$PKGPATH"/bin/emelfm2 chmod +x "$PKGPATH"/bin/emelfm2 touch "$TMPDIR"/emelfm2 }