You are not logged in.

#1 2004-02-29 23:44:50

mico
Member
From: Slovenia
Registered: 2004-02-08
Posts: 247

mp3gain

I managed to create mp3gain package, but only with an ugly patch to Makefile. Hopefully someone will know how to improve this. At least the INSTALL_PATH variable in Makefile should be set according to $startdir so one would not have to check and possibly correct the patch before running makepkg.

PKGBUILD:

pkgname=mp3gain
pkgver=1.4.3
pkgrel=1
pkgdesc="Replaygain for mp3"
url="http://mp3gain.sourceforge.net/"
depends=()
makedepends=()
conflicts=()
replaces=()
backup=()
install=
source=(http://cesnet.dl.sourceforge.net/sourceforge/$pkgname/$pkgname-1_4_3-src.zip)
md5sums=(abf8f534fbde3a5e33dd52397499fa72)

build() {
  cd $startdir/src/
  patch -p1 < $startdir/Makefile.patch Makefile
#  cp -f $startdir/Makefile.arch Makefile
  make || return 1
  make install
}

Makefile.patch:

--- src/Makefile    2004-03-01 00:13:40.000000000 +0100
+++ Makefile.arch    2004-02-29 23:50:16.000000000 +0100
@@ -9,7 +9,7 @@
 CFLAGS= -Wall
 
 ifneq ($(OSTYPE),beos)
-INSTALL_PATH= /usr/local/bin
+INSTALL_PATH= /var/abs/local/mp3gain/pkg/usr/bin
 else
 INSTALL_PATH= $(HOME)/config/bin
 endif
@@ -34,7 +34,8 @@
 endif
 
 install:
-    cp -p mp3gain "$(INSTALL_PATH)"
+    mkdir -p $(INSTALL_PATH)
+    cp -p mp3gain "$(INSTALL_PATH)/"
 ifeq ($(OSTYPE),beos)
     mimeset -f "$(INSTALL_PATH)/mp3gain"
 endif

I also don't know how to check if directory $(INSTALL_PATH) already exists. It looks like the usual bash "if sentence" doesn't work in a Makefile. This is not a big deal, because mkdir checks that anyway, but it'd be nice to check before mkdir.

Offline

#2 2004-03-01 12:33:35

mico
Member
From: Slovenia
Registered: 2004-02-08
Posts: 247

Re: mp3gain

Got it! No patch required anymore, just the PKGBUILD, should work from any directory. Also added glibc dependency.

PKGBUILD:

# Contributor: Mitja Vardjan mvardjan_[at]_volja _dot_ net

pkgname=mp3gain
pkgver=1.4.3
pkgrel=1
pkgdesc="Replaygain for mp3"
url="http://mp3gain.sourceforge.net/"
depends=('glibc')
makedepends=()
conflicts=()
replaces=()
backup=()
install=
source=(http://cesnet.dl.sourceforge.net/sourceforge/$pkgname/$pkgname-1_4_3-src.zip)
md5sums=(abf8f534fbde3a5e33dd52397499fa72)

build() {
  cd $startdir/src/
  make || return 1
  if [ ! -e $startdir/pkg/usr/bin ]; then
    mkdir -p $startdir/pkg/usr/bin
  fi
  make INSTALL_PATH=$startdir/pkg/usr/bin install
}

Maybe this thread could be now moved to new packages?
[/i]

Offline

#3 2004-03-01 18:54:10

Arielext
Member
From: Amersfoort, the Netherlands
Registered: 2002-08-12
Posts: 362
Website

Re: mp3gain

Nice of you to build this package, I have played with mp3gain some time now and the commandprompt version is the only version you should use!

NEVER EVER mp3gain a file with the -trackgain option since it does a normalize action as well, this is exactly the opposite of what replaygain should do.
Mp3gain without any option given replaygains the track, it only analizes the track and adds the replaygain tags to the mp3header, this is exaclty how replaygain should work!

Now to find a decent non-gnome based player which can read replaygain information from mp3 files (xmms can only read the information from vorbis files). No wait, ditch mp3 all together and only work with vorbis, but then your package is quite useless. Thanks anyway smile


apt-get install arch

Offline

#4 2004-03-01 22:09:29

mico
Member
From: Slovenia
Registered: 2004-02-08
Posts: 247

Re: mp3gain

Arielext wrote:

NEVER EVER mp3gain a file with the -trackgain option since it does a normalize action as well, this is exactly the opposite of what replaygain should do.

I agree that normalizing is bad in general but AFAIK mp3 format has some additional blocks or something that all decoders process and that is modified with "mp3gain -a" and "mp3gain -r". This is reversible, because recent versions of mp3gain (the PKGBUILD is for the most recent one, of course) add also some undo info to file. You can use "mp3gain -u" to undo the gain.
So you don't loose anything with mp3gain.

No wait, ditch mp3 all together and only work with vorbis

I stopped encoding to mp3 long time ago. Vorbis and flac is all I need. But who doesn't have some old mp3s?

Offline

Board footer

Powered by FluxBB