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/libassuan/libassuan.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/libassuan/libassuan.SlackBuild')
-rwxr-xr-x | dev/libs/libassuan/libassuan.SlackBuild | 70 |
1 files changed, 47 insertions, 23 deletions
diff --git a/dev/libs/libassuan/libassuan.SlackBuild b/dev/libs/libassuan/libassuan.SlackBuild index c0a6634b..f312d401 100755 --- a/dev/libs/libassuan/libassuan.SlackBuild +++ b/dev/libs/libassuan/libassuan.SlackBuild @@ -1,6 +1,6 @@ #!/bin/bash # -# SlackBuild for libassuan: +# SlackBuild for libassuan # http://www.gnupg.org/(en)/related_software/libassuan/ # # Author: Luis ( luis at riseup d0t net ) @@ -16,23 +16,25 @@ elif [ -f /etc/slackbuildrc ]; then fi # Set variables -PACKAGE="libassuan" +SRC_NAME="libassuan" +PKG_NAME="libassuan" ARCH=${ARCH:=i486} VERSION=${VERSION:=1.0.1} BUILD=${BUILD:=1ls} SRC_DIR=${SRC_DIR:=$CWD} TMP=${TMP:=/tmp} -PKG=${PKG:=$TMP/package-$PACKAGE} +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 @@ -49,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 $PACKAGE-$VERSION 2>/dev/null -rm -rf $PKG 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 # http://www.gnupg.org/(en)/signature_key.html -gpg --import << EOGPG || exit $ERROR_GPG +gpg --import << EOKEY || exit $ERROR_GPG -----BEGIN PGP PUBLIC KEY BLOCK----- mI4EQ7f6xwEEANCZGXorXMkDKpNsRnf+ZhqHOPmDcEKPDkplcCL2PFACN7QaK4Re @@ -70,10 +74,10 @@ FFTgKHHzBz39bzeStyQgTm5plGaOEJcJayIr07DaeBtcC/dMoVUJswybKMFtP7fU z05PRKjChvxrWzhe/Yn6BAmPF+6YxQo2W98rzq0THS5wKJjXmHw= =3fgc -----END PGP PUBLIC KEY BLOCK----- -EOGPG +EOKEY # Dowload source and its signature, if necessary -SRC="$PACKAGE-$VERSION.tar.bz2" +SRC="$PKG_SRC.tar.bz2" URL="ftp://ftp.gnupg.org/gcrypt/libassuan/$SRC" if [ ! -f "$SRC_DIR/$SRC" ]; then @@ -88,8 +92,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 $PACKAGE-$VERSION +cd $PKG_SRC CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=$PREFIX --libdir=$LIBDIR \ --infodir=$PREFIX/info --mandir=$PREFIX/man || exit $ERROR_CONF @@ -104,18 +109,37 @@ make install DESTDIR=$PKG || exit $ERROR_INSTALL xargs strip --strip-unneeded 2> /dev/null ) -# Compress info pages -rm -f $PKG/$PREFIX/info/dir -gzip -9 $PKG/$PREFIX/info/* +# 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="AUTHORS COPYING* ChangeLog INSTALL NEWS README* THANKS TODO VERSION" -mkdir -p $PKG/$PREFIX/doc/$PACKAGE-$VERSION || exit $ERROR_MKDIR -cp -a $DOCS $PKG/$PREFIX/doc/$PACKAGE-$VERSION +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 '|' @@ -135,13 +159,13 @@ libassuan: http://www.gnupg.org/(en)/related_software/libassuan/ libassuan: libassuan: libassuan: -EOF +EODESC # Build the package cd $PKG -makepkg -l y -c n $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz || exit $ERROR_MKPKG +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 |