projects/guix·blob java-team · refs

266 lines · 9.9 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014 Sree Harsha Totakura <[email protected]>
3;;; Copyright © 2015 Federico Beffa <[email protected]>
4;;; Copyright © 2016–2018, 2020–2022 Tobias Geerinckx-Rice <[email protected]>
5;;; Copyright © 2018 Theodoros Foradis <[email protected]>
6;;; Copyright © 2019 Jens Mølgaard <[email protected]>
7;;; Copyright © 2020 Jan Wielkiewicz <[email protected]>
8;;; Copyright © 2021 Efraim Flashner <[email protected]>
9;;; Copyright © 2023, 2024 Ricardo Wurmus <[email protected]>
10;;; Copyright © 2026 Andreas Enge <[email protected]>
11;;;
12;;; This file is part of GNU Guix.
13;;;
14;;; GNU Guix is free software; you can redistribute it and/or modify it
15;;; under the terms of the GNU General Public License as published by
16;;; the Free Software Foundation; either version 3 of the License, or (at
17;;; your option) any later version.
18;;;
19;;; GNU Guix is distributed in the hope that it will be useful, but
20;;; WITHOUT ANY WARRANTY; without even the implied warranty of
21;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22;;; GNU General Public License for more details.
23;;;
24;;; You should have received a copy of the GNU General Public License
25;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
26
27(define-module (gnu packages upnp)
28 #:use-module (gnu packages)
29 #:use-module (gnu packages autotools)
30 #:use-module (gnu packages base)
31 #:use-module (gnu packages check)
32 #:use-module (gnu packages compression)
33 #:use-module (gnu packages curl)
34 #:use-module (gnu packages file)
35 #:use-module (gnu packages gettext)
36 #:use-module (gnu packages icu4c)
37 #:use-module (gnu packages image)
38 #:use-module (gnu packages javascript)
39 #:use-module (gnu packages linux)
40 #:use-module (gnu packages logging)
41 #:use-module (gnu packages mp3)
42 #:use-module (gnu packages photo)
43 #:use-module (gnu packages pkg-config)
44 #:use-module (gnu packages pretty-print)
45 #:use-module (gnu packages python)
46 #:use-module (gnu packages serialization)
47 #:use-module (gnu packages sqlite)
48 #:use-module (gnu packages video)
49 #:use-module (gnu packages xiph)
50 #:use-module (gnu packages xml)
51 #:use-module (guix build-system cmake)
52 #:use-module (guix build-system gnu)
53 #:use-module (guix gexp)
54 #:use-module (guix utils)
55 #:use-module (guix download)
56 #:use-module (guix git-download)
57 #:use-module ((guix licenses) #:prefix license:)
58 #:use-module (guix packages)
59 #:use-module (ice-9 match))
60
61(define-public miniupnpc
62 (package
63 (name "miniupnpc")
64 (version "2.3.3")
65 (source
66 (origin
67 (method url-fetch)
68 (uri (string-append "https://miniupnp.tuxfamily.org/files/"
69 "miniupnpc-" version ".tar.gz"))
70 (sha256
71 (base32 "06mx6kk42px0f08k5pazmjawbj19gnpg3pwxrj4c1mjac7x0lanm"))))
72 (build-system gnu-build-system)
73 (arguments
74 ;; The build system does not use a configure script but depends on
75 ;; `make'. Hence we should pass parameters to `make' instead and remove
76 ;; the configure phase.
77 `(#:make-flags
78 (list
79 (string-append "SH=" (search-input-file %build-inputs "/bin/sh"))
80 (string-append "INSTALLPREFIX=" (assoc-ref %outputs "out"))
81 ,(string-append "CC=" (cc-for-target))
82
83 ;; Allow executables to find libminiupnpc.so.
84 (string-append "LDFLAGS=-Wl,-rpath="
85 (assoc-ref %outputs "out") "/lib"))
86 #:phases
87 (modify-phases %standard-phases
88 (delete 'configure)
89 (add-before 'install 'qualify-paths
90 (lambda* (#:key outputs #:allow-other-keys)
91 (substitute* "external-ip.sh"
92 (("upnpc")
93 (string-append (assoc-ref outputs "out") "/bin/upnpc")))
94 #t)))))
95 (home-page "http://miniupnp.free.fr/")
96 (synopsis "UPnP protocol client library")
97 (description
98 "The MiniUPnPc client library facilitates access to the services provided
99by any @dfn{Universal Plug and Play} (UPnP) @dfn{Internet Gateway Device} (IGD)
100present on the network. In UPnP terminology, MiniUPnPc is a UPnP Control Point.
101
102It is useful whenever an application needs to listen for incoming connections
103while running behind a UPnP-enabled router or firewall. Such applications
104include peer-to-peer applications, active-mode FTP clients, DCC file transfers
105over IRC, instant messaging, network games, and most server software.")
106 (license
107 (license:x11-style "file://LICENSE" "See 'LICENSE' file in the distribution"))))
108
109(define-public miniupnpc-2.1
110 (package
111 (inherit miniupnpc)
112 (name "miniupnpc")
113 (version "2.1.20191224")
114 (source
115 (origin
116 (method url-fetch)
117 (uri (string-append "https://miniupnp.tuxfamily.org/files/"
118 "miniupnpc-" version ".tar.gz"))
119 (sha256
120 (base32 "1kv6dpj93gckvwvgzxl4vdqpwnicb0c8p0xw53m2gh5naiw44ys4"))))))
121
122;; 2026-03-14
123(define-deprecated-package miniupnpc-next miniupnpc)
124
125(define-public libupnp
126 (package
127 (name "libupnp")
128 ;; Stick to the 1.14.x releases for now as 1.18.x breaks 'vlc' and 'obs'.
129 (version "1.14.30")
130 (source
131 (origin
132 (method git-fetch)
133 (uri (git-reference
134 (url "https://github.com/pupnp/pupnp")
135 (commit (string-append "release-" version))))
136 (sha256
137 (base32 "1ddm777i6msgjaxlfqvrwlblb4kql3fw3l3v2vibwgwbifbw6dpa"))))
138 (build-system gnu-build-system)
139 (arguments
140 ;; The tests require a network device capable of multicasting which is
141 ;; not available in the build environment. See
142 ;; https://lists.gnu.org/archive/html/guix-devel/2015-01/msg00312.html.
143 `(#:tests? #f
144 #:configure-flags '("--disable-static")))
145 (native-inputs (list autoconf automake libtool pkg-config))
146 (home-page "https://pupnp.github.io/pupnp/")
147 (synopsis "Portable SDK for UPnP Devices")
148 (description
149 "The portable SDK for UPnP Devices (libupnp) provides developers with an
150API and code for building control points, devices, and bridges that are
151compliant with Version 1.0 of the Universal Plug and Play Device Architecture
152Specification and support several operating systems like Linux, *BSD, Solaris
153and others.")
154 (license license:bsd-3)))
155
156(define-public readymedia
157 (package
158 (name "readymedia")
159 (version "1.3.3")
160 (source
161 (origin
162 (method git-fetch)
163 (uri (git-reference
164 (url "https://git.code.sf.net/p/minidlna/git")
165 (commit (string-append
166 "v" (string-replace-substring version "." "_")))))
167 (file-name (git-file-name name version))
168 (sha256
169 (base32 "1al04jx72bxwqch1nv9lx536mb6pvj7pgnqzy6lm32q6xa114yr2"))
170 (patches (search-patches "readymedia-ffmpeg7.patch"))))
171 (build-system gnu-build-system)
172 (arguments
173 (list
174 #:configure-flags #~(list "--with-os-name=Linux" ; uname -s
175 "--with-os-version=") ; uname -r
176 #:phases
177 #~(modify-phases %standard-phases
178 (add-after 'unpack 'patch-source
179 (lambda* (#:key inputs #:allow-other-keys)
180 (substitute* "Makefile.am"
181 ((".*LIBAVUTIL_LIBS.*") ""))
182 (substitute* "minidlna.c"
183 (("rm -rf")
184 (string-append
185 (search-input-file inputs "/bin/rm") " -rf")))
186 (substitute* "minidlnad.8"
187 (("/usr(/sbin/minidlnad)" _ path)
188 (string-append #$output path)))))
189 (add-after 'install 'install-man-pages
190 (lambda _
191 (let ((man (string-append #$output "/share/man/man")))
192 (install-file "minidlnad.8" (string-append man "8"))
193 (install-file "minidlna.conf.5" (string-append man "5"))))))))
194 (native-inputs (list autoconf automake gettext-minimal))
195 (inputs
196 (list coreutils-minimal
197 ffmpeg
198 flac
199 libexif
200 libid3tag
201 libjpeg-turbo
202 libvorbis
203 sqlite
204 zlib))
205 (home-page "https://minidlna.sourceforge.net/")
206 (synopsis "DLNA/UPnP-AV media server")
207 (description "ReadyMedia (formerly known as MiniDLNA) is a simple media
208server, which serves multimedia content to compatible clients on the network.
209It aims to be fully compliant with DLNA and UPnP-AV standards.")
210 (license license:gpl2)))
211
212(define-public gerbera
213 (package
214 (name "gerbera")
215 ;; Version 3.1.1 requires libzippp, which would have to be packaged
216 ;; before the next update.
217 (version "3.0.0")
218 (source
219 (origin
220 (method git-fetch)
221 (uri (git-reference
222 (url "https://github.com/gerbera/gerbera")
223 (commit (string-append "v" version))))
224 (file-name (git-file-name name version))
225 (sha256
226 (base32 "0997zj56m60jkrkwh95b229vkl42nlmd6nnq5jqfb34kckhxvk3n"))))
227 (build-system cmake-build-system)
228 (arguments
229 (list
230 #:configure-flags
231 #~(list "-DWITH_SYSTEMD=NO"
232 "-DWITH_AVCODEC=YES"
233 "-DWITH_TESTS=YES")
234 #:phases
235 #~(modify-phases %standard-phases
236 (add-before 'configure 'patch
237 (lambda _
238 (substitute* "CMakeLists.txt"
239 (("/usr/share") (string-append #$output "/share"))))))))
240 (inputs
241 (list curl
242 duktape
243 exiv2
244 ffmpeg
245 file
246 fmt-12
247 icu4c
248 jsoncpp
249 libebml
250 libexif
251 libmatroska
252 libupnp
253 pugixml
254 spdlog
255 sqlite
256 taglib
257 `(,util-linux "lib")
258 zlib))
259 (native-inputs
260 (list googletest pkg-config))
261 (home-page "https://gerbera.io/")
262 (synopsis "UPnP media server")
263 (description "Gerbera is a UPnP media server which allows you to stream
264your digital media through your home network and consume it on a variety of
265UPnP compatible devices.")
266 (license license:gpl2)))