From 7dfc937e2f06e16e1f66599168bdcc45dde10d46 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 29 Nov 2014 20:51:09 +0100 Subject: gnu: Add abcde. * gnu/packages/cdrom.scm (abcde): New variable. --- gnu/packages/cdrom.scm | 77 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 76 insertions(+), 1 deletion(-) (limited to 'gnu/packages/cdrom.scm') diff --git a/gnu/packages/cdrom.scm b/gnu/packages/cdrom.scm index 02e3febbc7..08fe6c2196 100644 --- a/gnu/packages/cdrom.scm +++ b/gnu/packages/cdrom.scm @@ -32,7 +32,11 @@ (define-module (gnu packages cdrom) #:use-module (gnu packages elf) #:use-module (gnu packages pkg-config) #:use-module (gnu packages readline) - #:use-module (gnu packages which)) + #:use-module (gnu packages which) + #:use-module (gnu packages perl) + #:use-module (gnu packages python) + #:use-module (gnu packages wget) + #:use-module (gnu packages xiph)) (define-public libcddb (package @@ -247,3 +251,74 @@ (define-public cd-discid "cd-discid is a command-line tool to retrieve CDDB discid information from an audio CD.") (license gpl2+))) + +(define-public abcde + (package + (name "abcde") + (version "2.6") + (home-page "http://abcde.einval.com/") + (source (origin + (method url-fetch) + (uri (string-append home-page "/download/abcde-" + version ".tar.gz")) + (sha256 + (base32 + "0y2cg233n2hixs0ji76dggpzgf52v4c4mnpwiai889ql2piafgk8")) + (modules '((guix build utils))) + (snippet + '(substitute* "Makefile" + (("/usr/bin/install") + "install") + (("^etcdir = .*$") + (string-append "etcdir = $(prefix)/etc\n")))))) + (build-system gnu-build-system) + (arguments + '(#:phases (alist-replace + 'configure + (lambda* (#:key outputs inputs #:allow-other-keys) + (substitute* "Makefile" + (("^prefix = .*$") + (string-append "prefix = " + (assoc-ref outputs "out") + "\n")))) + (alist-cons-after + 'install 'wrap + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((wget (assoc-ref inputs "wget")) + (vorbis (assoc-ref inputs "vorbis-tools")) + (parano (assoc-ref inputs "cdparanoia")) + (which (assoc-ref inputs "which")) + (discid (assoc-ref inputs "cd-discid")) + (out (assoc-ref outputs "out"))) + (define (wrap file) + (wrap-program file + `("PATH" ":" prefix + (,(string-append out "/bin:" + wget "/bin:" + which "/bin:" + vorbis "/bin:" + discid "/bin:" + parano "/bin"))))) + + (for-each wrap + (find-files (string-append out "/bin") + ".*")))) + %standard-phases)) + #:tests? #f)) + + (inputs `(("wget" ,wget) + ("which" ,which) + ("cdparanoia" ,cdparanoia) + ("cd-discid" ,cd-discid) + ("vorbis-tools" ,vorbis-tools) + + ;; A couple of Python and Perl scripts are included. + ("python" ,python) + ("perl" ,perl))) + + (synopsis "Command-line audio CD ripper") + (description + "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.") + (license gpl2+))) -- cgit v1.2.3