gnu: libjami: Move jamid daemon to a "bin" output.
* gnu/packages/jami.scm (libjami) [outputs]: Add a "bin" output. [arguments]: Add a move-jamid phase. * gnu/services/telephony.scm (jami-configuration->command-line-arguments): Refer to the "bin" output of libjami. (jami-shepherd-services): Likewise.master
parent
c0106ea5c9
commit
aef75942fc
|
@ -402,7 +402,7 @@
|
||||||
(name "libjami")
|
(name "libjami")
|
||||||
(version %jami-version)
|
(version %jami-version)
|
||||||
(source %jami-sources)
|
(source %jami-sources)
|
||||||
(outputs '("out" "debug"))
|
(outputs '("out" "bin" "debug")) ;"bin' contains jamid
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
(list
|
(list
|
||||||
|
@ -425,7 +425,20 @@
|
||||||
(lambda _
|
(lambda _
|
||||||
(for-each delete-file
|
(for-each delete-file
|
||||||
(find-files (string-append #$output "/lib")
|
(find-files (string-append #$output "/lib")
|
||||||
"\\.a$")))))))
|
"\\.a$"))))
|
||||||
|
(add-after 'install 'move-jamid
|
||||||
|
;; This nearly halves the size of the main output (from 1566.2 MiB
|
||||||
|
;; to 833.6 MiB), due to not depending on dbus-c++ and its large
|
||||||
|
;; dependencies.
|
||||||
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
|
(let ((libexec (string-append #$output:bin "/libexec"))
|
||||||
|
(share (string-append #$output:bin "/share")))
|
||||||
|
(mkdir-p libexec)
|
||||||
|
(rename-file (search-input-file outputs "libexec/jamid")
|
||||||
|
(string-append libexec "/jamid"))
|
||||||
|
(mkdir-p share)
|
||||||
|
(rename-file (search-input-directory outputs "share/dbus-1")
|
||||||
|
(string-append share "/dbus-1"))))))))
|
||||||
(inputs
|
(inputs
|
||||||
(list alsa-lib
|
(list alsa-lib
|
||||||
asio
|
asio
|
||||||
|
@ -461,7 +474,9 @@
|
||||||
Jami core functionality. Jami is a secure and distributed voice, video and
|
Jami core functionality. Jami is a secure and distributed voice, video and
|
||||||
chat communication platform that requires no centralized server and leaves the
|
chat communication platform that requires no centralized server and leaves the
|
||||||
power of privacy in the hands of the user. It supports the SIP and IAX
|
power of privacy in the hands of the user. It supports the SIP and IAX
|
||||||
protocols, as well as decentralized calling using P2P-DHT.")
|
protocols, as well as decentralized calling using P2P-DHT. The @samp{\"bin\"}
|
||||||
|
output contains the D-Bus daemon (@command{jamid}) as well as the Jami D-Bus
|
||||||
|
service definitions.")
|
||||||
(home-page "https://jami.net/")
|
(home-page "https://jami.net/")
|
||||||
(license license:gpl3+)))
|
(license license:gpl3+)))
|
||||||
|
|
||||||
|
|
|
@ -267,7 +267,7 @@ consistent state."))
|
||||||
CONFIG, a <jami-configuration> object."
|
CONFIG, a <jami-configuration> object."
|
||||||
(match-record config <jami-configuration>
|
(match-record config <jami-configuration>
|
||||||
(libjami dbus enable-logging? debug? auto-answer?)
|
(libjami dbus enable-logging? debug? auto-answer?)
|
||||||
`(,(file-append libjami "/libexec/jamid")
|
`(,#~(string-append #$libjami:bin "/libexec/jamid")
|
||||||
"--persistent" ;stay alive after client quits
|
"--persistent" ;stay alive after client quits
|
||||||
,@(if enable-logging?
|
,@(if enable-logging?
|
||||||
'() ;logs go to syslog by default
|
'() ;logs go to syslog by default
|
||||||
|
@ -524,7 +524,8 @@ argument, either a registered username or the fingerprint of the account.")
|
||||||
#:environment-variables
|
#:environment-variables
|
||||||
;; This is so that the cx.ring.Ring service D-Bus
|
;; This is so that the cx.ring.Ring service D-Bus
|
||||||
;; definition is found by dbus-daemon.
|
;; definition is found by dbus-daemon.
|
||||||
(list (string-append "XDG_DATA_DIRS=" #$libjami "/share"))))
|
(list (string-append "XDG_DATA_DIRS="
|
||||||
|
#$libjami:bin "/share"))))
|
||||||
(stop #~(make-kill-destructor)))
|
(stop #~(make-kill-destructor)))
|
||||||
|
|
||||||
(shepherd-service
|
(shepherd-service
|
||||||
|
@ -595,7 +596,8 @@ argument, either a registered username or the fingerprint of the account.")
|
||||||
;; Start the daemon.
|
;; Start the daemon.
|
||||||
(define daemon-pid
|
(define daemon-pid
|
||||||
((make-forkexec-constructor/container
|
((make-forkexec-constructor/container
|
||||||
'#$(jami-configuration->command-line-arguments config)
|
(list #$@(jami-configuration->command-line-arguments
|
||||||
|
config))
|
||||||
#:mappings
|
#:mappings
|
||||||
(list (file-system-mapping
|
(list (file-system-mapping
|
||||||
(source "/dev/log") ;for syslog
|
(source "/dev/log") ;for syslog
|
||||||
|
|
Reference in New Issue