Browse Source

pEp: Add pep-json-adapter.

* pEp/nightly.scm (pep-json-adapter): New variable.
main
Hartmut Goebel 2 years ago
parent
commit
b9cc29ad22
1 changed files with 84 additions and 0 deletions
  1. +84
    -0
      pEp/nightly.scm

+ 84
- 0
pEp/nightly.scm View File

@ -28,10 +28,12 @@
#:use-module (gnu packages base)
#:use-module (gnu packages boost)
#:use-module (gnu packages autotools)
#:use-module (gnu packages check)
#:use-module (gnu packages cyrus-sasl)
#:use-module (gnu packages compression)
#:use-module (gnu packages documentation)
#:use-module (gnu packages java)
#:use-module (gnu packages libevent)
#:use-module (gnu packages linux)
#:use-module (gnu packages mail) ; for libetpan
#:use-module (gnu packages python)
@ -359,3 +361,85 @@ JAVA_HOME=~a
(description "The pp Python adapter is an adaptor interface to the pp
(pretty Easy privacy) Engine.")
(license license:gpl3))))
(define-public pep-json-adapter
(let ((version "0.0.0")
(changeset "843") ;; 2020-05-06 - branch sync
(checksum "06vxgah7zlglgg7yd22licqk3gw18524nsd069cwp35z8bm2c191"))
(package
(name "pep-json-adapter")
(version (string-append version "-" changeset))
(source
(origin
(method hg-fetch)
(uri (hg-reference
(url "https://pep.foundation/dev/repos/pEpJSONServerAdapter")
(changeset changeset)))
(file-name (string-append name "-" version "-checkout"))
(sha256 (base32 checksum))))
(build-system gnu-build-system)
(arguments
`(#:test-target "test"
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'unpack-googletest
;; Copy the googletest sources
(lambda* (#:key inputs #:allow-other-keys)
(let ((source (assoc-ref inputs "googletest-source"))
(target "googletest"))
(mkdir-p target)
(copy-recursively source target)
#t)))
(add-before 'configure 'chdir
(lambda _
(chdir "server")
#t))
(delete 'check)
(add-after 'install 'check
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
;; The adapter must be installed for trunning the tests
(invoke "make" "test")
;; uninstall the unittest file
(delete-file (string-append out "/bin/unittests"))
#t)))
(replace 'configure
;; pEpJSONAdapter does not use autotools and configure,
;; but a local.conf. We need to tweak the values there.
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(googletest (string-append (getcwd) "/../googletest"))
)
(with-output-to-file "local.conf"
(lambda ()
(format #t "
PREFIX=~a
HTML_DIRECTORY=$(PREFIX)/share/pEp/json-adapter/html
GTEST_DIR=~a/googletest
# these are found automatically by gcc
ENGINE_LIB=
ENGINE_INC=
ETPAN_INC=
ETPAN_LIB=
EVENT_INC=
EVENT_LIB=
"
out googletest)))
#t))))))
(native-inputs
`(("pkg-config" ,pkg-config)))
(inputs
`(("boost" ,boost)
("libpepadapter" ,libpepadapter)
("googletest-source" ,(package-source googletest))
("libetpan" ,fdik-libetpan)
("libevent" ,libevent)
("pep-engine" ,pep-engine)
("util-linux" ,util-linux "lib"))) ;; uuid.h
(home-page "https://pep.foundation/")
(synopsis "p≡p JSON adapter")
(description "The pp JSON adapter is an adaptor interface to the pp
(pretty Easy privacy) Engine.")
(license license:gpl3))))

Loading…
Cancel
Save