| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 |
|
| 19 | (define-module (gnu packages rpm)
|
| 20 | #:use-module ((guix licenses) #:prefix license:)
|
| 21 | #:use-module (guix download)
|
| 22 | #:use-module (guix gexp)
|
| 23 | #:use-module (guix git-download)
|
| 24 | #:use-module (guix packages)
|
| 25 | #:use-module (guix build-system cmake)
|
| 26 | #:use-module (guix build-system meson)
|
| 27 | #:use-module (guix build-system pyproject)
|
| 28 | #:use-module (gnu packages bash)
|
| 29 | #:use-module (gnu packages check)
|
| 30 | #:use-module (gnu packages compression)
|
| 31 | #:use-module (gnu packages curl)
|
| 32 | #:use-module (gnu packages docbook)
|
| 33 | #:use-module (gnu packages glib)
|
| 34 | #:use-module (gnu packages gtk)
|
| 35 | #:use-module (gnu packages man)
|
| 36 | #:use-module (gnu packages package-management)
|
| 37 | #:use-module (gnu packages pkg-config)
|
| 38 | #:use-module (gnu packages popt)
|
| 39 | #:use-module (gnu packages python)
|
| 40 | #:use-module (gnu packages serialization)
|
| 41 | #:use-module (gnu packages sqlite)
|
| 42 | #:use-module (gnu packages tls)
|
| 43 | #:use-module (gnu packages xml))
|
| 44 |
|
| 45 | (define-public drpm
|
| 46 | (package
|
| 47 | (name "drpm")
|
| 48 | (version "0.5.2")
|
| 49 | (source (origin
|
| 50 | (method git-fetch)
|
| 51 | (uri (git-reference
|
| 52 | (url "https://github.com/rpm-software-management/drpm")
|
| 53 | (commit version)))
|
| 54 | (file-name (git-file-name name version))
|
| 55 | (sha256
|
| 56 | (base32
|
| 57 | "0jnbj5c9yf46bpbkq6gax4lfpq54c3xjyl0sa8psya7c1kzn44fx"))))
|
| 58 | (build-system cmake-build-system)
|
| 59 | (native-inputs
|
| 60 | (list cmocka pkg-config))
|
| 61 | (inputs
|
| 62 | (list bzip2
|
| 63 | lzlib
|
| 64 | openssl
|
| 65 | popt
|
| 66 | rpm
|
| 67 | xz
|
| 68 | zlib
|
| 69 | `(,zstd "lib")))
|
| 70 | (home-page "https://github.com/rpm-software-management/drpm")
|
| 71 | (synopsis "Delta RPM library")
|
| 72 | (description "This package provides a library for making, reading and
|
| 73 | applying deltarpms, compatible with the original deltarpm packages.")
|
| 74 | (license license:lgpl2.1+)))
|
| 75 |
|
| 76 | (define-public libmodulemd
|
| 77 | (package
|
| 78 | (name "libmodulemd")
|
| 79 | (version "2.15.2")
|
| 80 | (source (origin
|
| 81 | (method git-fetch)
|
| 82 | (uri (git-reference
|
| 83 | (url "https://github.com/fedora-modularity/libmodulemd")
|
| 84 | (commit version)))
|
| 85 | (file-name (git-file-name name version))
|
| 86 | (sha256
|
| 87 | (base32
|
| 88 | "0vvy4ljlcy3mvgv6ybayb7lcmc1561k3pjmfk3m9x22if6z9ap0y"))))
|
| 89 | (build-system meson-build-system)
|
| 90 | (outputs '("out" "doc")) |
| 91 | (arguments
|
| 92 | (list
|
| 93 | #:imported-modules (append %meson-build-system-modules
|
| 94 | %pyproject-build-system-modules)
|
| 95 | #:modules '((guix build meson-build-system)
|
| 96 | ((guix build pyproject-build-system) #:prefix python:)
|
| 97 | (guix build utils))
|
| 98 | #:configure-flags
|
| 99 | #~(list (string-append "-Dgobject_overrides_dir_py3="
|
| 100 | (python:site-packages %build-inputs %outputs)))
|
| 101 | #:phases
|
| 102 | #~(modify-phases %standard-phases
|
| 103 | (add-after 'unpack 'fix-glib-doc-prefix
|
| 104 | (lambda* (#:key native-inputs inputs #:allow-other-keys)
|
| 105 | (substitute* "meson.build"
|
| 106 | (("glib_docpath = .*")
|
| 107 | (format #f "glib_docpath = '~a'~%"
|
| 108 | (dirname
|
| 109 | (search-input-directory (or native-inputs inputs)
|
| 110 | "share/doc/glib-2.0")))))))
|
| 111 | (add-after 'install 'move-documentation
|
| 112 | (lambda* (#:key outputs #:allow-other-keys)
|
| 113 | (let ((dst (string-append #$output:doc "/share/gtk-doc")))
|
| 114 | (mkdir-p (dirname dst))
|
| 115 | (rename-file (search-input-directory outputs "share/gtk-doc")
|
| 116 | dst))))
|
| 117 | (delete 'check)
|
| 118 | (add-after 'install 'check
|
| 119 | (assoc-ref %standard-phases 'check)))))
|
| 120 | (native-inputs
|
| 121 | (list docbook-xml-4.1.2
|
| 122 | `(,glib "bin")
|
| 123 | `(,glib-with-documentation "doc")
|
| 124 | gobject-introspection |
| 125 | gtk-doc/stable
|
| 126 | help2man
|
| 127 | pkg-config
|
| 128 | python)) |
| 129 | (inputs
|
| 130 | (list gtk+
|
| 131 | python-pygobject))
|
| 132 | (propagated-inputs
|
| 133 | |
| 134 | (list glib
|
| 135 | |
| 136 | libyaml rpm))
|
| 137 | (home-page "https://github.com/fedora-modularity/libmodulemd")
|
| 138 | (synopsis "C library for manipulating module metadata files")
|
| 139 | (description "The libmodulemd API provides a number of convenience tools
|
| 140 | for interacting with repodata (that is, streams of YAML that contains
|
| 141 | information on multiple streams, default data and translations).")
|
| 142 | (license license:expat)))
|
| 143 |
|
| 144 | (define-public createrepo-c
|
| 145 | (package
|
| 146 | (name "createrepo-c")
|
| 147 | (version "1.2.1")
|
| 148 | (source (origin
|
| 149 | (method git-fetch)
|
| 150 | (uri (git-reference
|
| 151 | (url "https://github.com/rpm-software-management/createrepo_c")
|
| 152 | (commit version)))
|
| 153 | (file-name (git-file-name name version))
|
| 154 | (sha256
|
| 155 | (base32
|
| 156 | "03crsny8z17n1jnzynrcw1rkws2xap7zhaiqnh2nxg3bbzcd8sys"))))
|
| 157 | (build-system cmake-build-system)
|
| 158 | (arguments
|
| 159 | (list
|
| 160 | #:imported-modules (append %cmake-build-system-modules
|
| 161 | %pyproject-build-system-modules)
|
| 162 | #:modules '((guix build cmake-build-system)
|
| 163 | ((guix build pyproject-build-system) #:prefix py:)
|
| 164 | (guix build utils))
|
| 165 | #:phases
|
| 166 | #~(modify-phases %standard-phases
|
| 167 | (add-after 'unpack 'fix-python-site-prefix
|
| 168 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 169 | (substitute* "src/python/CMakeLists.txt"
|
| 170 | (("EXECUTE_PROCESS.*OUTPUT_VARIABLE PYTHON_INSTALL_DIR.*")
|
| 171 | (format #f "set (PYTHON_INSTALL_DIR ~a)~%"
|
| 172 | (py:site-packages inputs outputs))))))
|
| 173 | (add-after 'unpack 'fix-bash-completion-prefix
|
| 174 | (lambda _
|
| 175 | (substitute* "CMakeLists.txt"
|
| 176 | (("execute_process.*OUTPUT_VARIABLE BASHCOMP_DIR.*")
|
| 177 | (format #f "set (BASHCOMP_DIR ~a\
|
| 178 | /share/bash-completion/completions)~%" #$output))))))))
|
| 179 | (native-inputs
|
| 180 | (list bash-completion pkg-config python))
|
| 181 | (inputs
|
| 182 | (list bzip2
|
| 183 | curl
|
| 184 | drpm
|
| 185 | libmodulemd
|
| 186 | libxml2
|
| 187 | openssl
|
| 188 | sqlite
|
| 189 | zchunk))
|
| 190 | (home-page "https://rpm-software-management.github.io/createrepo_c/")
|
| 191 | (synopsis "C implementation of the createrepo tool")
|
| 192 | (description "This package provides the @command{createrepo} command,
|
| 193 | which can be used to create RPM repositories.")
|
| 194 | (license license:gpl2+)))
|