diff options
author | luis <luis@370017ae-e619-0410-ac65-c121f96126d4> | 2006-12-15 06:08:22 +0000 |
---|---|---|
committer | luis <luis@370017ae-e619-0410-ac65-c121f96126d4> | 2006-12-15 06:08:22 +0000 |
commit | edd2fe21a3f3418948e44fdce0e13ae191bc9060 (patch) | |
tree | 9950dc072d68dc1c475263211bc3550f24e41fc4 /dev/libs/libpth/libpth.SlackBuild | |
parent | e4161bef574d31763eb89596812eea11924da294 (diff) | |
download | slackbuilds-edd2fe21a3f3418948e44fdce0e13ae191bc9060.tar.gz slackbuilds-edd2fe21a3f3418948e44fdce0e13ae191bc9060.tar.bz2 |
Pequenas modificacoes e correcoes (SlackBuilds testados e funcionando)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@920 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'dev/libs/libpth/libpth.SlackBuild')
-rwxr-xr-x | dev/libs/libpth/libpth.SlackBuild | 56 |
1 files changed, 40 insertions, 16 deletions
diff --git a/dev/libs/libpth/libpth.SlackBuild b/dev/libs/libpth/libpth.SlackBuild index 5f4af385..68257c1e 100755 --- a/dev/libs/libpth/libpth.SlackBuild +++ b/dev/libs/libpth/libpth.SlackBuild @@ -1,6 +1,6 @@ #!/bin/bash # -# SlackBuild for pth (GNU Portable Threads): +# SlackBuild for pth (GNU Portable Threads) # http://www.gnu.org/software/pth/ # # Author: Luis ( luis at riseup d0t net ) @@ -25,15 +25,16 @@ SRC_DIR=${SRC_DIR:=$CWD} TMP=${TMP:=/tmp} PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} -PREFIX=${PREFIX:=/usr} +PREFIX=${PREFIX:=/usr/local} +PKG_SRC=$SRC_NAME-$VERSION # Set system libraries' path and optmization flags based on $ARCH LIBDIR=$PREFIX/lib if [ "$ARCH" = "i386" ]; then - SLKCFLAGS="-O2 -march=i386 -mtune=i686" + SLKCFLAGS="-O2 -march=i386 -mcpu=i686" elif [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" + SLKCFLAGS="-O2 -march=i486 -mcpu=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686" elif [ "$ARCH" = "s390" ]; then @@ -50,15 +51,17 @@ ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 # Clean up any leftovers of previous builds -rm -rf $SRC_NAME-$VERSION 2> /dev/null +rm -rf $PKG_SRC 2> /dev/null rm -rf $PKG 2> /dev/null + +# Create directories, if necessary mkdir -p $SRC_DIR || exit $ERROR_MKDIR mkdir -p $PKG || exit $ERROR_MKDIR mkdir -p $REPOS || exit $ERROR_MKDIR # Import (minimized) signing key from # ftp://ftp.gnu.org/gnu/gnu-keyring.gpg -gpg --import << EOGPG || exit $ERROR_GPG +gpg --import << EOKEY || exit $ERROR_GPG -----BEGIN PGP PUBLIC KEY BLOCK----- mQGiBDxKtR0RBACh9cmwVQjGuRAH9zEIV6s5ZhNRjG0Mk9sGjwkP1bXRHhRq64Dp @@ -88,10 +91,10 @@ EgkQbnRKy6nAnjAHZUdQRwABASWPAJoCqfTDhzFQOngPku+kWHdajWj1pgCeIIKl ZKGPGjkCEUGma0qd+GUAh4A= =rGe0 -----END PGP PUBLIC KEY BLOCK----- -EOGPG +EOKEY # Dowload source and its signature, if necessary -SRC="$SRC_NAME-$VERSION.tar.gz" +SRC="$PKG_SRC.tar.gz" URL="ftp://ftp.gnu.org/gnu/pth/$SRC" if [ ! -f "$SRC_DIR/$SRC" ]; then @@ -106,8 +109,9 @@ gpg --verify $SRC_DIR/$SRC.sig $SRC_DIR/$SRC || exit $ERROR_GPG # Untar, configure, compile and install tar --no-same-owner --no-same-permissions -xvf $SRC_DIR/$SRC || exit $ERROR_TAR -cd $SRC_NAME-$VERSION +cd $PKG_SRC CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=$PREFIX --libdir=$LIBDIR || exit $ERROR_CONF make || exit $ERROR_MAKE @@ -122,8 +126,28 @@ make install DESTDIR=$PKG || exit $ERROR_INSTALL xargs strip --strip-unneeded 2> /dev/null ) -# Compress man pages -gzip -9 $PKG/$PREFIX/man/*/* +# Compress and link manpages, if any +if [ -d $PKG/$PREFIX/man ]; then + ( cd $PKG/$PREFIX/man + for manpagedir in $(find . -type d -name "man*") ; do + ( cd $manpagedir + for eachpage in $( find . -type l -maxdepth 1) ; do + ln -s $( readlink $eachpage ).gz $eachpage.gz + rm $eachpage + done + gzip -9 *.? + ) + done + ) +fi + +# Compress info files, if any +if [ -d $PKG/$PREFIX/info ]; then + ( cd $PKG/$PREFIX/info + rm -f dir + gzip -9 * + ) +fi # Install documentation DOCS="ANNOUNCE AUTHORS COPYING ChangeLog HACKING HISTORY INSTALL NEWS PORTING \ @@ -131,9 +155,9 @@ DOCS="ANNOUNCE AUTHORS COPYING ChangeLog HACKING HISTORY INSTALL NEWS PORTING \ mkdir -p $PKG/$PREFIX/doc/$PKG_NAME-$VERSION || exit $ERROR_MKDIR cp -a $DOCS $PKG/$PREFIX/doc/$PKG_NAME-$VERSION -# Add slack-desc file +# Add package description (slack-desc) mkdir -p $PKG/install || exit $ERROR_MKDIR -cat << EOF > $PKG/install/slack-desc +cat << EODESC > $PKG/install/slack-desc # HOW TO EDIT THIS FILE: # The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' @@ -153,13 +177,13 @@ libpth: stack, signal mask and errno variable. libpth: libpth: For more information, http://www.gnu.org/software/pth/ libpth: -EOF +EODESC # Build the package cd $PKG makepkg -l y -c n $REPOS/$PKG_NAME-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG -# Delete build directory, if requested +# Delete source and build directories, if requested if [ "$CLEANUP" == "yes" ]; then - rm -rf $PKG $CWD/$PACKAGE-$VERSION + rm -rf $CWD/$PKG_SRC $PKG fi |