ap/id3v2: Added.
parent
d918f86061
commit
0a55493f96
@ -0,0 +1 @@
|
||||
ca825d851ca0c6a5783af107dc6baa7aa93f0bad id3v2-0.1.11.tar.gz
|
@ -0,0 +1,168 @@
|
||||
#! /bin/sh
|
||||
#
|
||||
# by: H4kTeUr - http://www.slackbuilds.net < h4kteur at slackbuilds dot net >
|
||||
# Copyright 2007, 2008 H4kTeUr. All rights reserved.
|
||||
#
|
||||
# Redistribution and use of this software, with or without modification, is
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of this software must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# Latest id3v2 sourcecode is available at http://id3v2.sourceforge.net
|
||||
# Depends: l/id3lib
|
||||
|
||||
set -e
|
||||
CWD=$(pwd)
|
||||
TMP=${TMP:-/tmp}
|
||||
PKG=${PKG:-$TMP/package-id3v2}
|
||||
OUT=${OUT:-$TMP/build}
|
||||
|
||||
# version on the tarball
|
||||
VERSION=${VERSION:-0.1.11}
|
||||
# version used in the source directory to cd into
|
||||
DIRVER=${DIRVER:-0.1.11}
|
||||
# version used for the Slackware package
|
||||
PKGVER=${PKGVER:-0.1.11}
|
||||
|
||||
# target
|
||||
ARCH=${ARCH:-i486}
|
||||
BUILD=${BUILD:-2_SBn}
|
||||
|
||||
# set tarball download link
|
||||
SOURCE=${SOURCE:-http://switch.dl.sourceforge.net/sourceforge/id3v2/id3v2-$VERSION.tar.gz}
|
||||
ARCHIVE=$(basename $SOURCE)
|
||||
|
||||
# sanity checks
|
||||
if [ "$(id -u)" = "0" ]; then
|
||||
echo "Do not run this SlackBuild as ROOT !"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d $TMP ]; then
|
||||
mkdir -p $TMP
|
||||
fi
|
||||
|
||||
# download the tarball if it's not found
|
||||
if [ ! -r $ARCHIVE ]; then
|
||||
echo "Downloading $ARCHIVE..."
|
||||
rm -f $ARCHIVE.part
|
||||
wget -vc $SOURCE -O $ARCHIVE.part
|
||||
mv $ARCHIVE.part $ARCHIVE
|
||||
fi
|
||||
|
||||
# check SHA1 sums
|
||||
if [ -r $ARCHIVE.sha1 ]; then
|
||||
sha1sum -c $ARCHIVE.sha1
|
||||
else
|
||||
echo "$ARCHIVE.sha1 SHA1 sums not found !"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$ARCH" = "i386" ]; then
|
||||
SLKCFLAGS="-O2 -march=i386 -mcpu=i686"
|
||||
elif [ "$ARCH" = "i486" ]; then
|
||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2"
|
||||
fi
|
||||
|
||||
# cleanup
|
||||
rm -rf $PKG
|
||||
mkdir -p $PKG
|
||||
|
||||
# extraction
|
||||
cd $TMP
|
||||
rm -rf id3v2-$DIRVER
|
||||
tar -xvf $CWD/id3v2-$VERSION.tar.gz
|
||||
cd id3v2-$DIRVER
|
||||
|
||||
# make sure ownerships and permissions are sane
|
||||
chmod -R a-s,u+rw,go-w+r .
|
||||
|
||||
for patch in fix-gcc-4.2 fix-segfault; do
|
||||
if [ -r $CWD/patches/id3v2-$VERSION-$patch.patch ]; then
|
||||
cat $CWD/patches/id3v2-$VERSION-$patch.patch | patch -p1
|
||||
else
|
||||
echo "ERROR: No id3v2-$VERSION-$patch.patch found!"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# build
|
||||
CXXFLAGS=$SLKCFLAGS \
|
||||
make PREFIX=/usr -j3
|
||||
|
||||
# add the install directories
|
||||
mkdir -p $PKG/usr/bin
|
||||
mkdir -p $PKG/usr/man/man1
|
||||
|
||||
# install
|
||||
install -m 755 id3v2 $PKG/usr/bin
|
||||
nroff -man id3v2.1 > $PKG/usr/man/man1/id3v2.1
|
||||
|
||||
# strip binaries
|
||||
echo "Stripping binaries..."
|
||||
find $PKG -type f | xargs file | grep "LSB executable" | cut -f 1 -d : | \
|
||||
xargs strip --strip-unneeded 2> /dev/null || \
|
||||
echo "No binaries to strip..."
|
||||
|
||||
# compress and link manpages, if any
|
||||
echo "Compressing man pages..."
|
||||
if [ -d $PKG/usr/man ]; then
|
||||
find $PKG/usr/man -type f -name "*.?" -exec gzip -9 {} \;
|
||||
for manpage in $(find $PKG/usr/man -type l) ; do
|
||||
ln -s $(readlink $manpage).gz $manpage.gz
|
||||
rm -f $manpage
|
||||
done
|
||||
fi
|
||||
|
||||
# add a documentation directory
|
||||
echo "Adding documentation package..."
|
||||
mkdir -p $PKG/usr/doc/id3v2-$PKGVER
|
||||
install -p -m 644 \
|
||||
COPYING INSTALL README \
|
||||
$PKG/usr/doc/id3v2-$PKGVER
|
||||
|
||||
# build the package
|
||||
mkdir -p $PKG/install
|
||||
if [ -r $CWD/slack-desc ]; then
|
||||
install -m 644 $CWD/slack-desc $PKG/install
|
||||
fi
|
||||
|
||||
if [ -r $CWD/doinst.sh ]; then
|
||||
install -m 755 $CWD/doinst.sh $PKG/install
|
||||
fi
|
||||
cd $PKG
|
||||
|
||||
PACKAGING="
|
||||
chown -R root.root .
|
||||
find . -perm 664 -exec chmod 644 {} \;
|
||||
find . -perm 777 -exec chmod 755 {} \;
|
||||
mkdir -p $OUT
|
||||
rm -f $OUT/id3v2-$PKGVER-$ARCH-$BUILD.tgz
|
||||
/sbin/makepkg -l y -c n $OUT/id3v2-$PKGVER-$ARCH-$BUILD.tgz
|
||||
rm -rf $PKG
|
||||
rm -rf $TMP/id3v2-$DIRVER
|
||||
"
|
||||
|
||||
if [ "$(which fakeroot 2> /dev/null)" ]; then
|
||||
echo "$PACKAGING" | fakeroot
|
||||
else
|
||||
su -c "$PACKAGING"
|
||||
fi
|
||||
|
||||
exit 0
|
@ -0,0 +1,41 @@
|
||||
Les sous-répertoires id3v2-0.1.11.orig/debian et id3v2-0.1.11/debian sont identiques.
|
||||
diff -up id3v2-0.1.11.orig/frametable.h id3v2-0.1.11/frametable.h
|
||||
--- id3v2-0.1.11.orig/frametable.h 2000-05-02 22:32:26.000000000 +0200
|
||||
+++ id3v2-0.1.11/frametable.h 2008-03-03 22:44:51.000000000 +0100
|
||||
@@ -24,9 +24,9 @@
|
||||
#include <id3/globals.h>
|
||||
|
||||
struct frameTbl {
|
||||
- char *frameName;
|
||||
+ const char *frameName;
|
||||
enum ID3_FrameID frameID;
|
||||
- char *frameLongName;
|
||||
+ const char *frameLongName;
|
||||
};
|
||||
|
||||
static struct frameTbl frameTable[] = {
|
||||
diff -up id3v2-0.1.11.orig/genre.cpp id3v2-0.1.11/genre.cpp
|
||||
--- id3v2-0.1.11.orig/genre.cpp 2004-05-04 21:44:28.000000000 +0200
|
||||
+++ id3v2-0.1.11/genre.cpp 2008-03-03 22:45:17.000000000 +0100
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <string.h>
|
||||
|
||||
|
||||
-char *genre_table[] = {"Blues",
|
||||
+const char *genre_table[] = {"Blues",
|
||||
"Classic Rock",
|
||||
"Country",
|
||||
"Dance",
|
||||
Les sous-répertoires id3v2-0.1.11.orig/id3v2-0.1.10 et id3v2-0.1.11/id3v2-0.1.10 sont identiques.
|
||||
diff -up id3v2-0.1.11.orig/list.cpp id3v2-0.1.11/list.cpp
|
||||
--- id3v2-0.1.11.orig/list.cpp 2004-05-04 19:41:15.000000000 +0200
|
||||
+++ id3v2-0.1.11/list.cpp 2008-03-03 22:45:00.000000000 +0100
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "frametable.h"
|
||||
#include "genre.h"
|
||||
|
||||
-char *GetDescription(const ID3_FrameID eFrameID)
|
||||
+const char *GetDescription(const ID3_FrameID eFrameID)
|
||||
{
|
||||
for(int ii = 0; ii < frameTableCount; ii++ )
|
||||
{
|
@ -0,0 +1,12 @@
|
||||
--- id3v2-0.1.11/id3v2.cpp.orig 2008-03-03 22:28:17.000000000 +0100
|
||||
+++ id3v2-0.1.11/id3v2.cpp 2008-03-03 22:32:50.000000000 +0100
|
||||
@@ -423,7 +423,8 @@
|
||||
{
|
||||
// check if there is a total track number and if we only have
|
||||
// the track number for this file. In this case combine them.
|
||||
- char *currentTrackNum, *newTrackNum;
|
||||
+ char *currentTrackNum = NULL;
|
||||
+ char *newTrackNum = NULL;
|
||||
|
||||
if (pFrame != NULL)
|
||||
{
|
@ -0,0 +1,19 @@
|
||||
# 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 '|'
|
||||
# on the right side marks the last column you can put a character in. You must
|
||||
# make exactly 11 lines for the formatting to be correct. It's also
|
||||
# customary to leave one space after the ':'.
|
||||
|
||||
|-----handy-ruler------------------------------------------------------|
|
||||
id3v2: id3v2 (a command line editor for id3v2 tags)
|
||||
id3v2:
|
||||
id3v2: id3v2 is a command line editor for id3v2 tags.
|
||||
id3v2:
|
||||
id3v2:
|
||||
id3v2:
|
||||
id3v2:
|
||||
id3v2:
|
||||
id3v2:
|
||||
id3v2:
|
||||
id3v2:
|
Loading…
Reference in New Issue