#!/bin/bash ## src2pkg script for: ncurses ## Auto-generated by src2pkg-1.9.9 ## src2pkg - Copyright 2005-2009 Gilbert Ashley ## This script is based on ncurses.SlackBuild # Copyright 2000-2009 Patrick J. Volkerding, Sebeka, MN, USA ## See the end of this file for the full Copyright/License SOURCE_NAME='ncurses-5.7.tar.gz' NAME='ncurses' # Use ALT_NAME to override guessed value VERSION='5.7' # Use ALT_VERSION to override guessed value # ARCH='' BUILD='2' PRE_FIX='usr' # Any extra options go here: # EXTRA_CONFIGS="" PATCHLIST='ncurses.mkhashsize.diff.gz' # Optional function replaces configure_source, compile_source, fake_install if [[ "$MACHINE" = "64" ]] ; then X86_64OPTS=" --with-chtype=long --with-mmask-t=long " fi ncurses_configure() { ./configure \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --with-gpm \ --disable-termcap \ --with-normal \ --with-shared \ --with-normal \ --enable-symlinks \ --without-debug \ --without-profile \ --without-develop \ --without-ada \ --disable-overwrite \ --enable-getcap \ --enable-symlinks \ $X86_64OPTS \ --program-suffix="" \ --program-prefix="" \ $WIDEC \ $HOST_OS # don't build tests sed -i -e 's,cd test && ${MAKE} ${CF_MFLAGS} $@,# cd test && ${MAKE} ${CF_MFLAGS} $@,' Makefile } build() { ncurses_configure # don't build the test-suite sed -i -e 's,cd test && ${MAKE} ${CF_MFLAGS} $@,#cd test && ${MAKE} ${CF_MFLAGS} $@,' Makefile make -j${NUMJOBS} || exit 1 make install DESTDIR=$PKG_DIR # Build/install again with wide character support: make clean WIDEC='--enable-widec' ncurses_configure make -j${NUMJOBS} || exit 1 #make install make install DESTDIR=$PKG_DIR if [ ! -d $PKG_DIR/usr/include/ncursesw -a ! -L $PKG_DIR/usr/include/ncursesw ]; then ( cd $PKG_DIR/usr/include ; ln -sf ncurses ncursesw ) fi # Move the include files from /usr/include into # /usr/include/ncurses, then make symlinks back # into /usr/include. ( cd $PKG_DIR/usr/include rm -rf ncurses mv ncursesw ncurses ln -sf ncurses ncursesw # This shouldn't clobber the real one: mv ncurses/termcap.h ncurses/termcap-ncurses.h for FILE in $( ls ncurses/* ) ; do ln -sf $FILE ${FILE##*/} done ) # Move the ncurses libraries into /lib, since they're important: mkdir -p $PKG_DIR/lib${LIBDIRSUFFIX} ( cd $PKG_DIR && \ { chmod 755 usr/lib${LIBDIRSUFFIX}*.so chmod 644 usr/lib${LIBDIRSUFFIX}*.a mv usr/lib${LIBDIRSUFFIX}/libncurses.so.5* lib${LIBDIRSUFFIX} mv usr/lib${LIBDIRSUFFIX}/libncursesw.so.5* lib${LIBDIRSUFFIX} ( cd usr/lib${LIBDIRSUFFIX} && rm -f libncurses.so ) ( cd usr/lib${LIBDIRSUFFIX} && ln -sf ../../lib/libncurses.so.5 libncurses.so ) ( cd usr/lib${LIBDIRSUFFIX} && rm -f libncursesw.so ) ( cd usr/lib${LIBDIRSUFFIX} && ln -sf ../../lib/libncursesw.so.5 libncursesw.so ) } ) # Set TERMINFO to point to the package: export TERMINFO=$PKG_DIR/usr/share/terminfo # Fix the xterm, screen, rxvt, and Eterm entries: for tfile in $CWD/xterm.terminfo $CWD/screeninfo.src $CWD/rxvt.terminfo $CWD/Eterm.ti ; do if [ -r $tfile ]; then progs/tic -v $tfile fi done unset TERMINFO ( cd $PKG_DIR/usr/share/terminfo && \ { for DIR in $(ls -1) ; do case $DIR in 'E'|'l'|'s'|'v'|'x') : ;; *) rm -rf $DIR esac done ( cd l && find -type f ! -name "linux*" -exec rm -f {} \; ) ( cd s && find -type f ! -name "screen*" -exec rm -f {} \; ) ( cd v && find -type f ! -name "vt100*" -exec rm -f {} \; ) ( cd x && find -type f ! -name "xterm*" -exec rm -f {} \; ) # get rid of dead links for FILE in $(find . -type l) ; do if [[ "$(readlink -e $FILE)" = "" ]] ; then rm -f $FILE fi done } ) } # Get the functions and configs . /usr/libexec/src2pkg/FUNCTIONS ; # Execute the named packaging steps: pre_process find_source make_dirs unpack_source fix_source_perms configure_source # compile_source # If used, the 'build' function replaces these 3 fake_install # fix_pkg_perms strip_bins create_docs compress_man_pages make_description make_doinst make_package post_process ## See the documentation for more help and examples. Below are some of # the most common Extras and Options for easy cut-and-paste use. # DOCLIST='' PATCHLIST='' INSTALL_TYPE='' # CONFIG_COMMAND='' MAKE_COMMAND='' INSTALL_LINE='' # When editing src2pkg scripts to add custom code, use these variables # to refer to the current directory, the sources or the package tree: # $CWD (current directory), $SRC_DIR (sources), $PKG_DIR (package tree) # Other commonly-used directories include: $DOC_DIR (document directory) # $MAN_DIR (man-page directory) $DATA_DIR (shared-data directory) ## Original ncurses.SlackBuild Copyright & License: # Copyright 2000-2009 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is # permitted provided that the following conditions are met: # # 1. Redistributions of this script must retain the above copyright # notice, this list of conditions and the following disclaimer. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR AS IS'' AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.