diff options
author | Eric Hameleers <alien@slackware.com> | 2007-10-13 22:14:06 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2007-10-13 22:14:06 +0000 |
commit | 9f8c85b3f9400504459b8727e8f6637da075e541 (patch) | |
tree | af7ef4928cc21bc04bcad6103763830bce2c1f0c /dosemu | |
parent | 500aed7b49c0f5edf811ee210a0168d45e122245 (diff) | |
download | asb-9f8c85b3f9400504459b8727e8f6637da075e541.tar.gz asb-9f8c85b3f9400504459b8727e8f6637da075e541.tar.xz |
Update - and a script cleanup. Add freedos sources to the download list (even though I don't use them) for completeness' sake
Diffstat (limited to 'dosemu')
-rwxr-xr-x | dosemu/build/dosemu.SlackBuild | 76 |
1 files changed, 23 insertions, 53 deletions
diff --git a/dosemu/build/dosemu.SlackBuild b/dosemu/build/dosemu.SlackBuild index 972466df..385b8ebe 100755 --- a/dosemu/build/dosemu.SlackBuild +++ b/dosemu/build/dosemu.SlackBuild @@ -33,6 +33,8 @@ # * Initial build. # 1.3.5-1: 29/apr/2007 by Eric Hameleers <alien@slackware.com> # * Update. +# 1.4.0-1: 14/oct/2007 by Eric Hameleers <alien@slackware.com> +# * Update. # # Run 'sh dosemu.SlackBuild --cleanup' to build a Slackware package. # The package (.tgz) plus descriptive .txt file are created in /tmp . @@ -40,11 +42,10 @@ # # ----------------------------------------------------------------------------- -# --- INIT --- # Set initial variables: PRGNAM=dosemu -VERSION=${VERSION:-"1.3.5"} +VERSION=${VERSION:-"1.4.0"} FDVERSION=${FDVERSION:-"1.0"} ARCH=${ARCH:-"i486"} BUILD=${BUILD:-1} @@ -69,6 +70,11 @@ SRCURL[0]="http://dl.sourceforge.net/${PRGNAM}/${PRGNAM}-${VERSION}.tgz" SOURCE[1]="$SRCDIR/${PRGNAM}-freedos-${FDVERSION}-bin.tgz" SRCURL[1]="http://dl.sourceforge.net/${PRGNAM}/${PRGNAM}-freedos-${FDVERSION}-bin.tgz" +# For completeness sake, the sources for the freedos-bin package (even though +# we will not use them: +SOURCE[2]="$SRCDIR/${PRGNAM}-freedos-${FDVERSION}-sources.tgz" +SRCURL[2]="http://dl.sourceforge.net/${PRGNAM}/${PRGNAM}-freedos-${FDVERSION}-sources.tgz" + ## ## --- with a little luck, you won't have to edit below this point --- ## ## @@ -108,28 +114,14 @@ case "$ARCH" in ;; esac -if [ ! -d $TMP/tmp-$PRGNAM ]; then - mkdir -p $TMP/tmp-$PRGNAM # location to build the source -elif [ "$P1" != "--oldbuild" ]; then - # If the "--oldbuild" parameter is present, we keep - # the old build files and continue; - # By default we remove the remnants of previous build and continue: - rm -rf $TMP/tmp-$PRGNAM/* -fi - -if [ ! -d $PKG ]; then - mkdir -p $PKG # place for the package to be built -else - rm -rf $PKG/* # We always erase old package's contents: -fi - -if [ ! -d $OUTPUT ]; then - mkdir -p $OUTPUT # place for the package to be saved -fi - - -# --- SOURCE FILE AVAILABILITY --- +# Prepare build environment: +mkdir -p $TMP/tmp-$PRGNAM # location to build the source +rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build +mkdir -p $PKG # place for the package to be built +rm -rf $PKG/* # we always erase old package's contents: +mkdir -p $OUTPUT # place for the package to be saved +# Source file availability: for (( i = 0; i < ${#SOURCE[*]}; i++ )) ; do if ! [ -f ${SOURCE[$i]} ]; then if ! [ "x${SRCURL[$i]}" == "x" ]; then @@ -138,7 +130,7 @@ for (( i = 0; i < ${#SOURCE[*]}; i++ )) ; do echo "Source '`basename ${SOURCE[$i]}`' not available yet..." echo "Will download file to `dirname $SOURCE[$i]`" wget -nv --connect-timeout=20 -O "${SOURCE[$i]}" "${SRCURL[$i]}" || true - if [ $? -ne 0 ]; then + if [ $? -ne 0 -o ! -s "${SOURCE[$i]}" ]; then echo "Downloading '`basename ${SOURCE[$i]}`' failed.. aborting the build." mv -f "${SOURCE[$i]}" "${SOURCE[$i]}".FAIL exit 1 @@ -170,21 +162,15 @@ else tar -xvf ${SOURCE[0]} fi cd ${PRGNAM}-${VERSION} - chown -R root:root . chmod -R u+w,go+r-w,a-s . - -# --- BUILDING --- - echo Building ... - LDFLAGS="$SLKLDFLAGS" \ CFLAGS="$SLKCFLAGS" \ ./configure --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ - --datarootdir=/usr \ - --datadir=/usr/share \ + --mandir=/usr/man \ --localstatedir=/var \ --with-docdir=/usr/doc/$PRGNAM-$VERSION \ --sysconfdir=/etc/dosemu \ @@ -195,13 +181,12 @@ CFLAGS="$SLKCFLAGS" \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}.log -# # Install all the needed stuff to the package dir mkdir -p $PKG/usr/bin # Use installwatch if available, to produce a logfile of the installation # process that is more easily readable: -if `which installwatch > /dev/null 2>&1`; then +if `which installwatch > /dev/null 2>&1`; then installwatch -o $OUTPUT/install-${PRGNAM}.log make DESTDIR=$PKG install else make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log @@ -257,47 +242,35 @@ config etc/dosemu/global.conf.new # Update the desktop database (makes the menu entry appear without reboot) if [ -x usr/bin/update-desktop-database ]; then - ./usr/bin/update-desktop-database ./usr/share/applications >/dev/null 2>&1 + chroot . /usr/bin/update-desktop-database /usr/share/applications >/dev/null 2>&1 fi EOINS - -# --- DOCUMENTATION --- - +# Add some documentation: mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true chmod -R a-w $PKG/usr/doc/$PRGNAM-$VERSION/* -# Compress the man page(s) +# Compress the man page(s): if [ -d $PKG/usr/man ]; then find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \; for i in `find $PKG/usr/man -type l -name "*.?"` ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done fi -# Strip binaries +# Strip binaries: ( cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null ) - -# --- OWNERSHIP, RIGHTS --- - -chmod -R o-w $PKG - - -# --- PACKAGE DESCRIPTION --- - +# Add a package description: mkdir -p $PKG/install cat $SRCDIR/slack-desc > $PKG/install/slack-desc if [ -f $SRCDIR/doinst.sh ]; then cat $SRCDIR/doinst.sh >> $PKG/install/doinst.sh fi - -# --- BUILDING --- - # Build the package: cd $PKG makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log @@ -306,9 +279,6 @@ md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz > ${PRGNAM}-${VERSION}-${ARCH}- cd - cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.txt - -# --- CLEANUP --- - # Clean up the extra stuff: if [ "$P1" = "--cleanup" ]; then rm -rf $TMP/tmp-$PRGNAM |