* x2goclient packaging help
@ 2023-10-23 17:06 Nicolas Débonnaire
0 siblings, 0 replies; only message in thread
From: Nicolas Débonnaire @ 2023-10-23 17:06 UTC (permalink / raw)
To: guix-devel
[-- Attachment #1.1: Type: text/plain, Size: 347 bytes --]
Hello,
I'm trying to package x2goclient.
You can find my attempt in the two following files that i'm using in a
local guix channel for testing purpose. x2goclient.scm is the main package
file. nx-libs.scm is a dependency.
While those files build well and x2go gui launch perfectly, It seems that I
can't connect to a remote desktop with x2go gui.
[-- Attachment #1.2: Type: text/html, Size: 434 bytes --]
[-- Attachment #2: x2goclient.scm --]
[-- Type: text/x-scheme, Size: 3233 bytes --]
(define-module (x2goclient)
#:use-module (man2html)
#:use-module (nx-libs)
#:use-module (gnu packages man)
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (guix build utils)
#:use-module (gnu packages perl)
#:use-module (gnu packages xorg)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages openldap)
#:use-module (gnu packages ssh)
#:use-module (gnu packages commencement)
#:use-module (gnu packages cups)
#:use-module (gnu packages ssh)
#:use-module (gnu packages base)
#:use-module (gnu packages qt)
#:use-module (guix build-system gnu)
#:use-module (guix download))
(define-public x2goclient
(package
(name "x2goclient")
(version "4.1.2.3")
(source (origin
(method url-fetch)
(uri (string-append "https://code.x2go.org/releases/source/x2goclient/x2goclient-" version ".tar.gz"))
(sha256
(base32
"0g6aba8kpsixq4486a8mga945lp31y0mzwa2krs5qqiiip3v72xb"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f
#:phases
(modify-phases %standard-phases
(delete 'configure)
(add-before 'build 'fix-makefile
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(etc (string-append out "/etc")))
(mkdir-p etc)
(substitute* "Makefile"
(("= 4") "= 5") ;; use qt5 instead of qt4
(("-o root -g root") "") ;; not sure why but this is on archlinux recipe so I copied it
(("/usr/local") out)
(("/etc/x2go") etc)
;; (("lrelease") (which "lrelease"))
;; A KLUDGE to turn off invoking lrelease on the
;; project for now, because it fails consistently
;; with "WARNING: Could not find qmake spec
;; 'default'". See below.
;; KLUDGE taken from the guix package smplayer
(("lrelease") "true")
(("qmake") (which "qmake")))
;; (substitute* "src/onmainwindow.cpp"
;; (("/usr/sbin/sshd") (which "sshd")))
#t)))
;; src/onmainwindow.cpp --replace "/usr/sbin/sshd" "${openssh}/bin/sshd"
;; TODO: build html_man
(replace 'build
(lambda _
(invoke "make" "build_client")
#t))
(add-after 'build 'build-man
(lambda _
(invoke "make" "install_man")
#t))
;; Due to the above, we must run lrelease separately on each .ts file
;; (as opposed to running `lrelease-pro smplayer.pro` for the entire
;; project, as the Makefile does normally without the above kludge).
(add-after 'build 'compile-ts-files
(lambda _
(for-each (lambda (file)
(invoke "lrelease" file))
(find-files "./" "\\.ts$")))))))
(native-inputs (list pkg-config man2html qttools-5 which qtbase-5 qtx11extras qtsvg-5 libssh cups libxpm openldap gcc-toolchain))
(propagated-inputs (list perl nx-libs openssh))
(synopsis "Remote Desktop/Remote Application solution.")
(description "Remote Desktop/Remote Application solution.")
(home-page "http://x2go.org/")
(license gpl2)))
;; TODO: substituteInPlace src/onmainwindow.cpp --replace "/usr/sbin/sshd" "${openssh}/bin/sshd"
[-- Attachment #3: nx-libs.scm --]
[-- Type: text/x-scheme, Size: 3324 bytes --]
(define-module (nx-libs)
;; #:use-module (gnu packages man)
#:use-module (guix licenses)
#:use-module (guix packages)
#:use-module (guix build utils)
#:use-module (gnu packages perl)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages autotools)
#:use-module (gnu packages xorg)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages xml)
#:use-module (gnu packages image)
#:use-module (gnu packages onc-rpc)
#:use-module (gnu packages base)
#:use-module (gnu packages patchutils)
#:use-module (gnu packages commencement)
;; #:use-module (gnu packages cups)
;; #:use-module (gnu packages base)
;; #:use-module (gnu packages qt)
#:use-module (guix build-system gnu)
#:use-module (guix download))
(define-public nx-libs
(package
(name "nx-libs")
(version "3.5.99.27")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/ArcticaProject/nx-libs/archive/" version "/nx-libs-" version ".tar.gz"))
(sha256
(base32
"1smyvnz50jwp3717wfj4w5m4ny8832ga6yvv1i4yax94cy5d5lq5"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f
#:phases
(modify-phases %standard-phases
(delete 'configure)
(add-before 'build 'fix-makefile
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(etc (string-append out "/etc")))
(mkdir-p etc)
(substitute* "Makefile"
(("/usr/local") out)
(("/etc/nxagent") etc)
(("./configure") (string-append "CONFIG_SHELL=" (which "sh") " SHELL=" (which "sh") " " (which "sh") " ./configure")))
;; (substitute* '("nx-X11/config/cf/linux.cf")
;; (("/bin/sh") (which "sh"))
;; )
(substitute* '("nx-X11/config/cf/site.def")
(("#include <host.def>") (string-append "#include <host.def>" "\n" "#define BourneShell " (which "sh")))
(("/usr/local") out)
)
#t)))
(replace 'build
;; (lambda* (#:key outputs #:allow-other-keys)
;; (let ((out (assoc-ref outputs "out")))
;; (invoke "make" "IMAKE_DEFINES=\"-DUseTIRPC=1\"")
;; #t))
(lambda _
(invoke "make" "IMAKE_DEFINES=\"-DUseTIRPC=1\"")
#t)
)
(add-before 'validate-runpath 'link-libraries
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(lib (string-append out "/lib"))
(lib-nx-x11 (string-append lib "/nx/X11")))
;; TODO: make symlink instead of copy
(for-each (lambda (file)
(install-file file lib-nx-x11
;; (string-append lib-nx-x11 "/" (basename file))
))
(list (string-append lib "/libXcomp.so.3")
(string-append lib "/libXcompshad.so.3")
(string-append lib "/libNX_X11.so.6")))
#t))))))
(native-inputs (list autoconf automake libtool pkg-config libpng libjpeg-turbo xkbcomp libxfont libxdamage libxrandr libxtst libxext libxcomposite libxinerama libxpm libxml2 font-util pixman gccmakedep imake which quilt libtirpc gcc-toolchain))
(propagated-inputs (list perl python-2 python-3))
(synopsis "NX librairies")
(description "NX librairies")
(home-page "https://github.com/ArcticaProject/nx-libs")
(license gpl2)))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-10-23 17:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-23 17:06 x2goclient packaging help Nicolas Débonnaire
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.