[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#42229] [PATCH 8/9] gnu: jami: Fix compilation by providing necessar
From: |
Jan Wielkiewicz |
Subject: |
[bug#42229] [PATCH 8/9] gnu: jami: Fix compilation by providing necessary webchat files. |
Date: |
Mon, 6 Jul 2020 17:50:29 +0200 |
* gnu/packages/jami.scm (define-module): Add copy-build-system.
(libringclient)[source]: Delete chatview files.
[arguments]: Remove chatview files from CMakeLists.txt.
(jami-chatview): New variable.
(jami)[source]: Delete chatview directory.
[inputs]: Add jami-chatview.
[arguments]: Copu chatview files to destination.
---
gnu/packages/jami.scm | 80 ++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 79 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/jami.scm b/gnu/packages/jami.scm
index ea94efb2f9..58e10ae6d8 100644
--- a/gnu/packages/jami.scm
+++ b/gnu/packages/jami.scm
@@ -56,6 +56,7 @@
#:use-module (gnu packages xorg)
#:use-module (gnu packages)
#:use-module (guix build-system cmake)
+ #:use-module (guix build-system copy)
#:use-module (guix build-system gnu)
#:use-module (guix download)
#:use-module (guix git-download)
@@ -526,6 +527,16 @@ functionality.")
(url "https://review.jami.net/ring-lrc")
(commit commit)))
(file-name (git-file-name name version))
+ (modules '((guix build utils)))
+ ;; The chatview is a common code among Jami clients.
+ ;; Since Guix likes functional design, I'm removing
+ ;; the directory containing it and making it a new
+ ;; package. The other reason is that there is no
+ ;; any rule in the build system to check if it is
+ ;; included.
+ (snippet
+ '(begin
+ (delete-file-recursively "src/web-chatview")))
(sha256
(base32
"1s1wi80drabfjhvxbiyl8k9c2jsafvmx5v84s3wldsmmdg4f6xdf"))))
@@ -542,6 +553,21 @@ functionality.")
(assoc-ref %build-inputs "libring") "/include"))
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'do-not-install-chatview
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("src/web-chatview/.eslintrc.json") "")
+ (("src/web-chatview/chatview-gnome.css") "")
+ (("src/web-chatview/chatview.css") "")
+ (("src/web-chatview/chatview.html") "")
+ (("src/web-chatview/chatview.js") "")
+ (("src/web-chatview/jed.js") "")
+ (("src/web-chatview/linkify-html.js") "")
+ (("src/web-chatview/linkify-string.js") "")
+ (("src/web-chatview/linkify.js") "")
+ (("src/web-chatview/qwebchannel.js") "")
+ (("src/web-chatview/web.gresource.xml") ""))
+ #t))
(add-before 'configure 'fix-dbus-interfaces-path
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "CMakeLists.txt"
@@ -558,6 +584,40 @@ This package provides a library common to all Jami
clients.")
(home-page "https://jami.net")
(license license:gpl3+))))
+(define-public jami-chatview
+ (let ((commit "0a790d86a20ae80e5d2ee0d35452fa77cfb8cc40")
+ (revision "0"))
+ (package
+ (name "jami-chatview")
+ (version (git-version %jami-version revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://review.jami.net/jami-chatview")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1zb3qa1x37kclbgk4wdg6qp4ivr6513ypj8s4k0qjps7h2clgna8"))))
+ (build-system copy-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'allow-copying
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Permissions of this file are not right.
+ ;; Let's change this to allow installing it properly.
+ (chmod ".eslintrc.json" #o644)
+ #t)))
+ #:install-plan '(("." "include/libringclient/web-chatview")
+ (".eslintrc.json"
+
"include/libringclient/web-chatview/.eslintrc.json"))))
+ (synopsis "Chatview for Jami")
+ (description "Web chatview for Jami - html, css, js files.
+It provides some common code for Jami clients.")
+ (home-page "https://jami.net")
+ (license license:gpl3+))))
+
(define-public jami
(let ((commit "85cda2e1fde84230f6b9f5419f9ec1e23867c2a1")
(revision "0"))
@@ -570,6 +630,11 @@ This package provides a library common to all Jami
clients.")
(url "https://review.jami.net/ring-client-gnome")
(commit commit)))
(file-name (git-file-name name version))
+ (modules '((guix build utils)))
+ ;; The web directory contains links to nowhere
+ (snippet
+ '(begin
+ (delete-file-recursively "web")))
(sha256
(base32
"0xzcx8x04yc8m8b2vf7sxfgw79idbm0hifzaw4s2vh26hyy9sp2g"))))
@@ -584,6 +649,8 @@ This package provides a library common to all Jami
clients.")
("clutter-gtk" ,clutter-gtk)
("libcanberra" ,libcanberra)
("libnm" ,network-manager)
+ ("jami-chatview" ,jami-chatview)
+ ("qtbase" ,qtbase)
("webkitgtk" ,webkitgtk)
("sqlite" ,sqlite)))
(native-inputs
@@ -596,7 +663,18 @@ This package provides a library common to all Jami
clients.")
("adwaita-icon-theme" ,adwaita-icon-theme)
("evolution-data-server" ,evolution-data-server)))
(arguments
- `(#:tests? #f)) ; There is no testsuite.
+ `(#:tests? #f ; There is no testsuite.
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'copy-chatview-files
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((chatview
+ (string-append
+ (assoc-ref inputs "jami-chatview")
+ "/include/libringclient/web-chatview"))
+ (destination-dir "web"))
+ (copy-recursively chatview destination-dir))
+ #t)))))
(synopsis "Distributed, privacy-respecting communication program")
(description "Jami (formerly GNU Ring) is a secure and distributed voice,
video and chat communication platform that requires no centralized server and
--
2.27.0
- [bug#42229] [PATCH 7/9] gnu: libringclient: Do not propagate qtbase in libringclient., (continued)
[bug#42229] [PATCH 3/9] gnu: jami-apply-dependency-patches, ffmpeg-jami, pjproject-jami: Apply patches from the new libring source., Jan Wielkiewicz, 2020/07/06
[bug#42229] [PATCH 2/9] gnu: libringclient: Fetch from git, update to 20200702-guix., Jan Wielkiewicz, 2020/07/06
[bug#42229] [PATCH 9/9] gnu: pjproject-jami: Fix assertion by disabling debugging., Jan Wielkiewicz, 2020/07/06
[bug#42229] [PATCH 5/9] gnu: pjproject-jami: Make sure phases are run in order., Jan Wielkiewicz, 2020/07/06
[bug#42229] [PATCH 6/9] gnu: jami: Add libnm as input., Jan Wielkiewicz, 2020/07/06
[bug#42229] [PATCH 4/9] gnu: jami: Fetch from git, update to 20200702-guix., Jan Wielkiewicz, 2020/07/06
[bug#42229] [PATCH 8/9] gnu: jami: Fix compilation by providing necessary webchat files.,
Jan Wielkiewicz <=
[bug#42229] [PATCH 8/9] gnu: jami: Fix compilation by providing necessary webchat files., Jan Wielkiewicz, 2020/07/07
[bug#42229] [[PATCH V2] 01/10] gnu: libring: Fetch from git, update to 20200708-guix., Jan Wielkiewicz, 2020/07/10
- [bug#42229] [[PATCH V2] 04/10] gnu: jami: Fetch from git, update to 20200702-guix., Jan Wielkiewicz, 2020/07/10
- [bug#42229] [[PATCH V2] 06/10] gnu: jami: Add libnm as input., Jan Wielkiewicz, 2020/07/10
- [bug#42229] [[PATCH V2] 05/10] gnu: pjproject-jami: Make sure phases are run in order., Jan Wielkiewicz, 2020/07/10
- [bug#42229] [[PATCH V2] 03/10] gnu: jami-apply-dependency-patches, ffmpeg-jami, pjproject-jami: Apply patches from the new libring source., Jan Wielkiewicz, 2020/07/10