From e96e4102774ae26ee48528c9336555b59eec8418 Mon Sep 17 00:00:00 2001 From: Raghav Gururajan Date: Thu, 30 Jul 2020 08:00:14 -0400 Subject: [PATCH 63/75] gnu: phodav: Update package definition. * gnu/packages/gnome.scm (phodav): Update package definition. [outputs]: New outputs "tools", "spice" and "doc". [arguments]<#:glib-or-gtk?>: New argument. <#:configure-flags>[-Dsystemd]: New flag. <#:phases>['patch-docbook-xml]: New phase. ['patch-udevdir]: New phase. ['move-doc]: New phase. ['move-tools]: New phase. ['move-spice]: New phase. [native-inputs]: Add asciidoc, docbook-xml, docbook-xsl and xmlto. [inputs]: Add eudev. Remove libgudev and libsoup. [propagated-inputs]: Add glib, glib-networking, libsoup and libxml2. [synopsis]: Modify. [description]: Modify. --- gnu/packages/gnome.scm | 111 +++++++++++++++++++++++++++++++---------- 1 file changed, 85 insertions(+), 26 deletions(-) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 78170f9609..297a008a86 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -1031,32 +1031,91 @@ documentation.") (define-public phodav (package - (name "phodav") - (version "2.4") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnome/sources/" name "/" - (version-major+minor version) "/" - name "-" version ".tar.xz")) - (sha256 - (base32 - "1hxq8c5qfah3w7mxcyy3yhzdgswplll31a69p5mqdl04bsvw5pbx")))) - (build-system meson-build-system) - (native-inputs - `(("gettext" ,gettext-minimal) - ("glib:bin" ,glib "bin") - ("gtk-doc" ,gtk-doc) - ("pkg-config" ,pkg-config))) - (inputs - `(("avahi" ,avahi) - ("libgudev" ,libgudev) - ("libsoup" ,libsoup))) - (synopsis "WebDav server implementation using libsoup") - (description "PhoDav was initially developed as a file-sharing mechanism for Spice, -but it is generic enough to be reused in other projects, -in particular in the GNOME desktop.") - (home-page "https://wiki.gnome.org/phodav") - (license license:lgpl2.1+))) + (name "phodav") + (version "2.4") + (source + (origin + (method url-fetch) + (uri + (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 "1hxq8c5qfah3w7mxcyy3yhzdgswplll31a69p5mqdl04bsvw5pbx")))) + (build-system meson-build-system) + (outputs '("out" "tools" "spice" "doc")) + (arguments + `(#:glib-or-gtk? #t ; To wrap binaries and/or compile schemas + #:configure-flags + (list + "-Dsystemd=disabled") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-docbook-xml + (lambda* (#:key inputs #:allow-other-keys) + (with-directory-excursion "doc/reference" + (substitute* '("phodav-2.0-docs.sgml" "phodav-docs.sgml.in") + (("http://www.oasis-open.org/docbook/xml/4.3/") + (string-append (assoc-ref inputs "docbook-xml") + "/xml/dtd/docbook/")))) + #t)) + (add-before 'configure 'patch-udevdir + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "meson.build" + (("udev\\.get_pkgconfig_variable\\('udevdir'\\)") + (string-append "'" + (assoc-ref outputs "out") + "/lib/udev" "'"))) + #t)) + (add-after 'install 'move-doc + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (doc (assoc-ref outputs "doc"))) + (mkdir-p (string-append doc "/share")) + (rename-file + (string-append out "/share/gtk-doc") + (string-append doc "/share/gtk-doc")) + #t))) + (add-after 'move-doc 'move-tools + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (tools (assoc-ref outputs "tools"))) + (mkdir-p (string-append tools "/bin")) + (rename-file + (string-append out "/bin") + (string-append tools "/bin")) + #t))) + (add-after 'move-tools 'move-spice + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (spice (assoc-ref outputs "spice"))) + (mkdir-p (string-append spice "/sbin")) + (rename-file + (string-append out "/sbin") + (string-append spice "/sbin")) + #t)))))) + (native-inputs + `(("asciidoc" ,asciidoc) + ("docbook-xml" ,docbook-xml-4.3) + ("docbook-xsl" ,docbook-xsl) + ("gettext" ,gettext-minimal) + ("glib:bin" ,glib "bin") + ("gtk-doc" ,gtk-doc) + ("pkg-config" ,pkg-config) + ("xmlto" ,xmlto))) + (inputs + `(("avahi" ,avahi) + ("udev" ,eudev))) + (propagated-inputs + `(("glib" ,glib) + ("glib-networking" ,glib-networking) + ("libsoup" ,libsoup) + ("libxml2" ,libxml2))) + (synopsis "WebDAV Support for GNOME") + (description "PhoDav is a WebDav server implementation using libsoup +(RFC 4918).") + (home-page "https://wiki.gnome.org/phodav") + (license license:lgpl2.1+))) (define-public gnome-color-manager (package -- 2.27.0