Add abcde, a command-line CD encoder.

svn path=/nixpkgs/trunk/; revision=11904
This commit is contained in:
Ludovic Courtès 2008-05-26 20:54:34 +00:00
parent 53be6f7ba4
commit 2ead4b20b5
3 changed files with 86 additions and 0 deletions

View File

@ -0,0 +1,60 @@
{ stdenv, fetchurl, libcdio, cddiscid, wget, bash, vorbisTools
, makeWrapper }:
let version = "2.3.99.6";
in
stdenv.mkDerivation {
name = "abcde-${version}";
src = fetchurl {
url = "mirror://debian/pool/a/abcde/abcde_${version}.orig.tar.gz";
sha256 = "1wl4ygj1cf1d6g05gwwygsd5g83l039fzi011r30ma5lnm763lyb";
};
# FIXME: This package does not support MP3 encoding (only Ogg),
# nor `distmp3', `eject', etc.
patches = [ ./install.patch ];
configurePhase = ''
sed -i "s|^[[:blank:]]*prefix *=.*$|prefix = $out|g ;
s|^[[:blank:]]*etcdir *=.*$|etcdir = $out/etc|g ;
s|^[[:blank:]]*INSTALL *=.*$|INSTALL = install -c|g" \
"Makefile";
# We use `cd-paranoia' from GNU libcdio, which contains a hyphen
# in its name, unlike Xiph's cdparanoia.
sed -i "s|^[[:blank:]]*CDPARANOIA=.*$|CDPARANOIA=cd-paranoia|g" \
"abcde"
substituteInPlace "abcde" \
--replace "/etc/abcde.conf" "$out/etc/abcde.conf"
'';
buildInputs = [ makeWrapper ];
postInstall = ''
substituteInPlace "$out/bin/cddb-tool" \
--replace '#!/bin/sh' '#!${bash}/bin/sh'
substituteInPlace "$out/bin/abcde" \
--replace '#!/bin/bash' '#!${bash}/bin/bash'
wrapProgram "$out/bin/abcde" --prefix PATH ":" \
"$out/bin:${libcdio}/bin:${cddiscid}/bin:${wget}/bin:${vorbisTools}/bin"
wrapProgram "$out/bin/cddb-tool" --prefix PATH ":" \
"${wget}/bin"
'';
meta = {
homepage = http://www.hispalinux.es/~data/abcde.php;
licence = "GPLv2+";
description = "A Better CD Encoder (ABCDE)";
longDescription = ''
abcde is a front-end command-line utility (actually, a shell
script) that grabs tracks off a CD, encodes them to
Ogg/Vorbis, MP3, FLAC, Ogg/Speex and/or MPP/MP+ (Musepack)
format, and tags them, all in one go.
'';
};
}

View File

@ -0,0 +1,21 @@
--- abcde-2.3.3/Makefile~ 2005-08-26 00:43:27.000000000 +0200
+++ abcde-2.3.3/Makefile 2008-05-26 22:20:17.000000000 +0200
@@ -14,13 +14,13 @@ clean:
install:
$(INSTALL) -d -m 755 $(bindir)
- $(INSTALL) -m 755 -o 0 abcde $(bindir)
- $(INSTALL) -m 755 -o 0 cddb-tool $(bindir)
+ $(INSTALL) -m 755 abcde $(bindir)
+ $(INSTALL) -m 755 cddb-tool $(bindir)
$(INSTALL) -d -m 755 $(mandir)
- $(INSTALL) -m 644 -o 0 abcde.1 $(mandir)
- $(INSTALL) -m 644 -o 0 cddb-tool.1 $(mandir)
+ $(INSTALL) -m 644 abcde.1 $(mandir)
+ $(INSTALL) -m 644 cddb-tool.1 $(mandir)
$(INSTALL) -d -m 755 $(etcdir)
- $(INSTALL) -m 644 -o 0 abcde.conf $(etcdir)
+ $(INSTALL) -m 644 abcde.conf $(etcdir)
tarball:
@cd .. && tar czvf abcde_$(VERSION).orig.tar.gz \

View File

@ -4952,6 +4952,11 @@ let pkgs = rec {
inherit (xlibs) libX11 libXext libSM;
};
abcde = import ../applications/audio/abcde {
inherit fetchurl stdenv libcdio cddiscid wget bash vorbisTools
makeWrapper;
};
abiword = import ../applications/office/abiword {
inherit fetchurl stdenv pkgconfig fribidi libpng popt libgsf enchant wv;
inherit (gtkLibs) gtk;