summaryrefslogtreecommitdiff
path: root/audio/cmus
diff options
context:
space:
mode:
authorAntonio Hernández Blas <hba.nihilismus@gmail.com>2010-05-13 00:20:55 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-13 00:20:55 +0200
commit8a1544b5582de3f411c4bcdaa283d00ca2a13859 (patch)
tree35a523b3d9b0d65775dd5680d50bfeebb5b4f4c7 /audio/cmus
parentcdc3be92f9f13bf2b2aad8a3dbbe527de2a1e377 (diff)
downloadslackbuilds-8a1544b5582de3f411c4bcdaa283d00ca2a13859.tar.gz
audio/cmus: Updated for version 2.2.0
Diffstat (limited to 'audio/cmus')
-rw-r--r--audio/cmus/cmus.SlackBuild34
-rw-r--r--audio/cmus/cmus.info6
-rw-r--r--audio/cmus/patches/cmus-2.2.0-new-ffmpeg.patch15
-rw-r--r--audio/cmus/patches/cmus-2.2.0-symlink_attack.patch12
4 files changed, 55 insertions, 12 deletions
diff --git a/audio/cmus/cmus.SlackBuild b/audio/cmus/cmus.SlackBuild
index 4ed66b1013..3635a97335 100644
--- a/audio/cmus/cmus.SlackBuild
+++ b/audio/cmus/cmus.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for cmus
-# Copyright (c) 2008, Antonio Hernández Blas <hba.nihilismus@gmail.com>
+# Copyright (c) 2008-2009, Antonio Hernández Blas <hba.nihilismus@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -24,7 +24,7 @@
PRGNAM=cmus
VERSION=2.2.0
ARCH=${ARCH:-i486}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
CWD=$(pwd)
@@ -34,10 +34,13 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
fi
set -e
@@ -55,10 +58,16 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Apply some patches from gentoo
+# Thanks to B Watson for made me notice the ffmpeg issue.
+cat $CWD/patches/cmus-2.2.0-new-ffmpeg.patch | patch -p1
+cat $CWD/patches/cmus-2.2.0-symlink_attack.patch | patch -p1
+
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
prefix=/usr \
+ libdir=/usr/lib${LIBDIRSUFFIX} \
mandir=/usr/man \
exampledir="/usr/doc/$PRGNAM-$VERSION/examples" \
DEBUG=0
@@ -67,21 +76,26 @@ make
make install DESTDIR=$PKG
( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
)
-( cd $PKG/usr/man
- find . -type f -exec gzip -9 {} \;
- for i in $(find . -type l) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-)
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ find . -type f -exec gzip -9 {} \;
+ for i in $(find . -type l) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+ )
+fi
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING HACKING README $PKG/usr/doc/$PRGNAM-$VERSION
-chmod -x $PKG/usr/doc/$PRGNAM-$VERSION/examples/cmus-status-display
+chmod -x $PKG/usr/doc/$PRGNAM-$VERSION/examples/*
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/audio/cmus/cmus.info b/audio/cmus/cmus.info
index 41f1e402c9..940fe1bcc0 100644
--- a/audio/cmus/cmus.info
+++ b/audio/cmus/cmus.info
@@ -3,6 +3,8 @@ VERSION="2.2.0"
HOMEPAGE="http://cmus.sourceforge.net/"
DOWNLOAD="http://mirror.greaterscope.net/cmus/cmus-2.2.0.tar.bz2"
MD5SUM="7a9895ecfc10cd16577c73051436962f"
-MAINTAINER="Antonio Hernández Blas"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Antonio Hernández Blas"
EMAIL="hba.nihilismus@gmail.com"
-APPROVED="David Somero"
+APPROVED="dsomero"
diff --git a/audio/cmus/patches/cmus-2.2.0-new-ffmpeg.patch b/audio/cmus/patches/cmus-2.2.0-new-ffmpeg.patch
new file mode 100644
index 0000000000..89812b21b1
--- /dev/null
+++ b/audio/cmus/patches/cmus-2.2.0-new-ffmpeg.patch
@@ -0,0 +1,15 @@
+--- cmus-2.2.0-orig/ffmpeg.c 2007-07-27 16:52:13.000000000 +0200
++++ cmus-2.2.0/ffmpeg.c 2008-04-25 16:32:40.000000000 +0200
+@@ -18,9 +18,9 @@
+ */
+
+ #include <stdio.h>
+-#include <ffmpeg/avcodec.h>
+-#include <ffmpeg/avformat.h>
+-#include <ffmpeg/avio.h>
++#include <libavcodec/avcodec.h>
++#include <libavformat/avformat.h>
++#include <libavformat/avio.h>
+
+ #include "ip.h"
+ #include "xmalloc.h"
diff --git a/audio/cmus/patches/cmus-2.2.0-symlink_attack.patch b/audio/cmus/patches/cmus-2.2.0-symlink_attack.patch
new file mode 100644
index 0000000000..3c3e09c55c
--- /dev/null
+++ b/audio/cmus/patches/cmus-2.2.0-symlink_attack.patch
@@ -0,0 +1,12 @@
+diff -ur cmus-2.2.0.orig/cmus-status-display cmus-2.2.0/cmus-status-display
+--- cmus-2.2.0.orig/cmus-status-display 2007-07-27 17:52:13.000000000 +0300
++++ cmus-2.2.0/cmus-status-display 2009-05-12 09:12:56.000000000 +0300
+@@ -19,7 +19,7 @@
+ output()
+ {
+ # write status to /tmp/cmus-status (not very useful though)
+- echo "$*" >> /tmp/cmus-status 2>&1
++ echo "$*" >> ~/.cmus-status 2>&1
+
+ # WMI (http://wmi.modprobe.de/)
+ #wmiremote -t "$*" &> /dev/null