From 3667290c9d419ce5404d6a0631bf20ddbcf1c286 Mon Sep 17 00:00:00 2001 From: Katherine Cox-Buday Date: Tue, 2 Jun 2020 15:34:19 -0500 Subject: [PATCH 4/5] gnu: Add liblognorm. * gnu/packages/c.scm (liblognorm): New variable. --- gnu/packages/c.scm | 55 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/gnu/packages/c.scm b/gnu/packages/c.scm index 98c939e76f..3a7914346e 100644 --- a/gnu/packages/c.scm +++ b/gnu/packages/c.scm @@ -46,6 +46,7 @@ #:use-module (gnu packages autotools) #:use-module (gnu packages gettext) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages web) #:use-module (gnu packages xml)) (define-public tcc @@ -442,3 +443,57 @@ be very fast in processing.") "Liblogging is an easy to use library for logging. It offers an enhanced replacement for the syslog() call, but retains its ease of use.") (license license:bsd-2))) + +(define-public liblognorm + (package + (name "liblognorm") + (version "2.0.6") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/rsyslog/liblognorm.git") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1pyy1swvq6jj12aqma42jimv71z8m66zy6ydd5v19cp2azm4krml")))) + (build-system gnu-build-system) + (arguments + ;; Bash scripts interact with the filesystem + `(#:tests? #f + #:configure-flags + (list (string-append "--includedir=" + (assoc-ref %outputs "dev") + "/include")) + #:phases + (modify-phases %standard-phases + (add-after 'install 'fix-circular-dependency + (lambda* (#:key outputs #:allow-other-keys) + (write (string-append "KT: " (assoc-ref outputs "lib") + "/lib/pkgconfig")) + (write (string-append "KT: " (assoc-ref outputs "dev") + "/lib/pkgconfig")) + (let ((pkgconfig (string-append (assoc-ref outputs "dev") + "/lib/pkgconfig"))) + (mkdir-p pkgconfig) + (rename-file (string-append (assoc-ref outputs "lib") + "/lib/pkgconfig") + pkgconfig))))))) + (inputs + `(("libestr" ,libestr) + ("libfastjson" ,libfastjson) + ("json-c" ,json-c))) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool) + ("pkg-config" ,pkg-config))) + (outputs '("out" "lib" "dev")) + (home-page "https://www.liblognorm.com") + (synopsis + "Fast samples-based log normalization library") + (description + "Liblognorm normalizes event data into well-defined name-value +pairs and a set of tags describing the message.") + (license license:lgpl2.1))) -- 2.26.2