David and Ricardo, thank for a review! I followed your advices and prepared new patch.
2015-03-16 17:53 GMT+03:00 Ricardo Wurmus <ricardo.wur...@mdc-berlin.de>: > >> From 0ad9b0eea2cd6151072d27f5e2505db9db083b37 Mon Sep 17 00:00:00 2001 >> From: "Alexander I.Grafov (Axel)" <gra...@gmail.com> >> Date: Sun, 15 Mar 2015 20:01:03 +0300 >> Subject: [PATCH] gnu: Add xcape. >> >> * gnu/packages/xdisorg.scm (xcape): New variable. >> --- >> + >> +(define-public xcape >> + (package >> + (name "xcape") >> + (version "1.1") >> + (source >> + (origin >> + (method url-fetch) >> + (uri (string-append >> + "https://github.com/alols/" >> + name >> + "/archive/v" >> + version >> + ".tar.gz")) > > As the tarball does not include the name of the package you should > probably add something like this: > > (file-name (string-append name "-" version ".tar.gz")) > >> + (arguments >> + `(#:tests? #f ; no test target >> + #:phases (alist-replace >> + 'configure >> + (let ((out (assoc-ref %outputs "out"))) >> + (lambda _ >> + (substitute* "Makefile" >> + (("(PREFIX[[:blank:]]*=.*)") >> + (string-append "CC:=gcc\nPREFIX=" out "\n")) >> + (("(MANDIR.*=.*)") >> + (string-append "MANDIR=/share/man/man1\n"))))) > > Is this really necessary or could you just set these variables as > make-flags? > > #:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out")) > "CC=gcc" > ...) > > ~~ Ricardo -- Александр Графов
0001-gnu-Add-xcape.patch
Description: Binary data