about summary refs log tree commit diff
path: root/pkgs/applications/audio/abcde
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2008-05-26 20:54:34 +0000
committerLudovic Courtès <ludo@gnu.org>2008-05-26 20:54:34 +0000
commit2ead4b20b52445ec3560c3d530e820ce5a05204a (patch)
tree8cead0e7a4137cf3acecd11c0b4668e7794a9a4a /pkgs/applications/audio/abcde
parent53be6f7ba47a10a24e2b10a78f6e8ebe62eb4474 (diff)
Add abcde, a command-line CD encoder.
svn path=/nixpkgs/trunk/; revision=11904
Diffstat (limited to 'pkgs/applications/audio/abcde')
-rw-r--r--pkgs/applications/audio/abcde/default.nix60
-rw-r--r--pkgs/applications/audio/abcde/install.patch21
2 files changed, 81 insertions, 0 deletions
diff --git a/pkgs/applications/audio/abcde/default.nix b/pkgs/applications/audio/abcde/default.nix
new file mode 100644
index 0000000000000..5cfa72158bac5
--- /dev/null
+++ b/pkgs/applications/audio/abcde/default.nix
@@ -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.
+      '';
+    };
+  }
\ No newline at end of file
diff --git a/pkgs/applications/audio/abcde/install.patch b/pkgs/applications/audio/abcde/install.patch
new file mode 100644
index 0000000000000..f5ab75f4bb963
--- /dev/null
+++ b/pkgs/applications/audio/abcde/install.patch
@@ -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 \