#!/ffp/bin/sh # # ncurses build script for funplug # # We have leftovers due to funpkg reading the # fun_pkg* database. Leftovers that more than # likely aren't going to be worth anything due # to our new libncurses.so symlink.... set -e CWD=`pwd` PKGNAME=ncurses PKG=$CWD/package-$PKGNAME VERSION=5.7 BUILD=1 TAG=jag PKGDIR=/ffp/var/cache/packages URL=http://ftp.gnu.org/pub/gnu/ncurses CLEANUP=yes # Make the package directory if not found: if [ ! -d $PKGDIR ]; then mkdir -p $PKGDIR fi # Grab the source: ( mkdir -p source && cd source wget -N $URL/$PKGNAME-$VERSION.tar.gz ) rm -rf $PKG mkdir -p $PKG echo echo "$PKGNAME-$VERSION source is now extracting..." rm -rf $PKGNAME-$VERSION tar xf $CWD/source/$PKGNAME-$VERSION.tar.gz cd $PKGNAME-$VERSION chown -R root:root . CFLAGS="-march=armv5te -O2" \ ./configure --prefix=/ffp \ --mandir=/ffp/share/man \ --disable-termcap \ --with-normal \ --with-shared \ --with-termlib \ --enable-symlinks \ --without-debug \ --without-profile \ --without-ada \ --program-prefix="" \ --with-manpage-format=normal,formatted make make install DESTDIR=$PKG ( cd $PKG/ffp/lib chmod 755 *.so chmod 644 *.a # Olde obsolete names, just in case ln -sf libncurses.so libcurses.so ln -sf libncurses.a libcurses.a # Some things cant find the headers in ncurses/ # and some things specifically look for them in ncurses/. # So..... cd ../include for file in ncurses/* ; do ln -sf $file . done ) rm -rf $PKG/ffp/share/man/cat* # Strip: find $PKG | xargs file | grep -e "executable" -e "shared object" \ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null \ | true # Build the package: cd $PKG echo && echo "Making funplug package..." && echo tar czvf $PKGDIR/$PKGNAME-$VERSION-$BUILD$TAG.tgz * echo && echo "Your $PKGNAME package is in $PKGDIR" && echo # Clean up: [[ $CLEANUP == yes ]] && \ rm -rf $CWD/$PKGNAME-$VERSION $CWD/package-$PKGNAME exit 1