diff options
Diffstat (limited to 'media/sound/lame/lame.SlackBuild')
-rwxr-xr-x | media/sound/lame/lame.SlackBuild | 52 |
1 files changed, 29 insertions, 23 deletions
diff --git a/media/sound/lame/lame.SlackBuild b/media/sound/lame/lame.SlackBuild index 405c3361..4636f078 100755 --- a/media/sound/lame/lame.SlackBuild +++ b/media/sound/lame/lame.SlackBuild @@ -1,21 +1,22 @@ #!/bin/bash # -# lame.SlackBuild is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or any later version. +# lame.SlackBuild is free software; you can redistribute +# it and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2 of the License, +# or any later version. # -# lame.SlackBuild is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# lame.SlackBuild is distributed in the hope that it will +# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General +# Public License for more details. # # You should have received a copy of the GNU General Public License along with # this program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place - Suite 330, Boston, MA 02111-1307, USA # -# SlackBuild for lame -# http://downloads.sourceforge.net/lame/ -# -# Author: Rudson R. Alves +# slackbuild for lame, by Rudson R. Alves +# requires: +# tested: lame-3.97 # # Look for slackbuildrc @@ -29,7 +30,7 @@ fi CWD="$(pwd)" SRC_NAME="lame" PKG_NAME="lame" -ARCH=${ARCH:=i468} +ARCH=${ARCH:=i486} SRC_VERSION=${VERSION:=3.97} PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" BUILD=${BUILD:=1rra} @@ -38,8 +39,8 @@ TMP=${TMP:=/tmp} PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} PREFIX=${PREFIX:=/usr} -PKG_SRC="$TMP/$SRC_NAME-$SRC_VERSION" -CONF_OPTIONS=${CONF_OPTIONS:=""} +PKG_WORK="$TMP/$SRC_NAME" +CONF_OPTIONS=${CONF_OPTIONS:="--sysconfdir=/etc --localstatedir=/var --program-prefix= --program-suffix= --disable-static"} NUMJOBS=${NUMJOBS:="-j4"} # Set system libraries' path and optmization flags based on $ARCH @@ -65,16 +66,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 "$PKG_SRC" 2> /dev/null +rm -rf "$PKG_WORK" 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 +mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR # Dowload source if necessary -SRC="$SRC_NAME-$SRC_VERSION.tar.gz" +SRC="$SRC_NAME-$VERSION.tar.gz" URL="http://downloads.sourceforge.net/lame/$SRC" if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then @@ -82,15 +84,16 @@ if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -t "$SRC_DIR/$SRC" 2> /dev/null; then fi # Untar -cd "$TMP" +cd "$PKG_WORK" tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR +PKG_SRC=`ls -l | awk '/^d/ { print $8 }'` cd "$PKG_SRC" # Configure CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ - --prefix="$PREFIX" --libdir="$LIBDIR" "$CONF_OPTIONS" || exit $ERROR_CONF + --prefix="$PREFIX" --libdir="$LIBDIR" $CONF_OPTIONS || exit $ERROR_CONF # Compile make $NUMJOBS || exit $ERROR_MAKE @@ -107,9 +110,13 @@ make install DESTDIR="$PKG" || exit $ERROR_INSTALL ) # Install documentation -DOCS="API TODO USAGE LICENSE README HACKING INSTALL.configure INSTALL README.WINGTK ChangeLog DEFINES COPYING STYLEGUIDE" +DOCS="API COPYING ChangeLog DEFINES HACKING INSTALL INSTALL.configure LICENSE README README.WINGTK STYLEGUIDE TODO USAGE" mkdir -p "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" || exit $ERROR_MKDIR -cp -a $DOCS "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" +for doc in $DOCS; do + if [ -f "$doc" ]; then + cp -a $doc "$PKG/usr/doc/$PKG_NAME-$PKG_VERSION" + fi +done # Add package description (slack-desc) mkdir -p "$PKG/install" || exit $ERROR_MKDIR @@ -121,8 +128,8 @@ cat << EODESC > "$PKG/install/slack-desc" # make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. - |-----handy-ruler--------------------------------------------------------| -lame: LAME package by Rudson R. Alves <rudsonalves[a]yahoo.com.br> + |-----handy-ruler---------------------------------------------------------| +lame: lame by Slack.Sarava lame: lame: LAME is an LGPL MP3 encoder. The Open source development model allowed lame: to improve its quality and speed since 1999. It is now an highly evolved @@ -141,6 +148,5 @@ makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERRO # Delete source and build directories if requested if [ "$CLEANUP" == "yes" ]; then - rm -rf "$PKG_SRC" "$PKG" + rm -rf "$PKG_WORK" "$PKG" fi - |