gnu: emacs-consult: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / upnp.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 Sree Harsha Totakura <sreeharsha@totakura.in>
3 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
4 ;;; Copyright © 2016, 2017, 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
5 ;;; Copyright © 2018 Theodoros Foradis <theodoros@foradis.org>
6 ;;; Copyright © 2019 Jens Mølgaard <jens@zete.tk>
7 ;;; Copyright © 2020 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
8 ;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
9 ;;;
10 ;;; This file is part of GNU Guix.
11 ;;;
12 ;;; GNU Guix is free software; you can redistribute it and/or modify it
13 ;;; under the terms of the GNU General Public License as published by
14 ;;; the Free Software Foundation; either version 3 of the License, or (at
15 ;;; your option) any later version.
16 ;;;
17 ;;; GNU Guix is distributed in the hope that it will be useful, but
18 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ;;; GNU General Public License for more details.
21 ;;;
22 ;;; You should have received a copy of the GNU General Public License
23 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
24
25 (define-module (gnu packages upnp)
26 #:use-module (gnu packages)
27 #:use-module (gnu packages autotools)
28 #:use-module (gnu packages compression)
29 #:use-module (gnu packages gettext)
30 #:use-module (gnu packages image)
31 #:use-module (gnu packages mp3)
32 #:use-module (gnu packages photo)
33 #:use-module (gnu packages pkg-config)
34 #:use-module (gnu packages python)
35 #:use-module (gnu packages sqlite)
36 #:use-module (gnu packages video)
37 #:use-module (gnu packages xiph)
38 #:use-module (guix build-system gnu)
39 #:use-module (guix utils)
40 #:use-module (guix download)
41 #:use-module (guix git-download)
42 #:use-module ((guix licenses) #:prefix license:)
43 #:use-module (guix packages)
44 #:use-module (ice-9 match))
45
46 (define-public miniupnpc
47 (package
48 (name "miniupnpc")
49 (version "2.1.20191224")
50 (source
51 (origin
52 (method url-fetch)
53 (uri (string-append "https://miniupnp.tuxfamily.org/files/"
54 "miniupnpc-" version ".tar.gz"))
55 (sha256
56 (base32 "1kv6dpj93gckvwvgzxl4vdqpwnicb0c8p0xw53m2gh5naiw44ys4"))))
57 (build-system gnu-build-system)
58 (native-inputs
59 `(("python" ,python-2)))
60 (arguments
61 ;; The build system does not use a configure script but depends on
62 ;; `make'. Hence we should pass parameters to `make' instead and remove
63 ;; the configure phase.
64 '(#:make-flags
65 (list
66 (string-append "SH=" (assoc-ref %build-inputs "bash") "/bin/sh")
67 (string-append "INSTALLPREFIX=" (assoc-ref %outputs "out"))
68 "CC=gcc"
69
70 ;; Allow executables to find libminiupnpc.so.
71 (string-append "LDFLAGS=-Wl,-rpath="
72 (assoc-ref %outputs "out") "/lib"))
73 #:phases
74 (modify-phases %standard-phases
75 (delete 'configure)
76 (add-before 'install 'qualify-paths
77 (lambda* (#:key outputs #:allow-other-keys)
78 (substitute* "external-ip.sh"
79 (("upnpc")
80 (string-append (assoc-ref outputs "out") "/bin/upnpc")))
81 #t)))))
82 (home-page "http://miniupnp.free.fr/")
83 (synopsis "UPnP protocol client library")
84 (description
85 "The MiniUPnPc client library facilitates access to the services provided
86 by any @dfn{Universal Plug and Play} (UPnP) @dfn{Internet Gateway Device} (IGD)
87 present on the network. In UPnP terminology, MiniUPnPc is a UPnP Control Point.
88
89 It is useful whenever an application needs to listen for incoming connections
90 while running behind a UPnP-enabled router or firewall. Such applications
91 include peer-to-peer applications, active-mode FTP clients, DCC file transfers
92 over IRC, instant messaging, network games, and most server software.")
93 (license
94 (license:x11-style "file://LICENSE" "See 'LICENSE' file in the distribution"))))
95
96 (define-public libupnp
97 (package
98 (name "libupnp")
99 (version "1.14.5")
100 (source
101 (origin
102 (method url-fetch)
103 (uri (string-append "https://github.com/pupnp/pupnp/releases/download"
104 "/release-" version "/libupnp-" version".tar.bz2"))
105 (sha256
106 (base32 "16hlcpffmqd4rja57m6km1dpx3abgv91vvmb8971vfg6gd0glzr2"))))
107 (native-inputs
108 `(("pkg-config" ,pkg-config)))
109 (build-system gnu-build-system)
110 (arguments
111 ;; The tests require a network device capable of multicasting which is
112 ;; not available in the build environment. See
113 ;; https://lists.gnu.org/archive/html/guix-devel/2015-01/msg00312.html.
114 `(#:tests? #f
115 #:configure-flags '("--disable-static")))
116 (home-page "http://pupnp.sourceforge.net")
117 (synopsis "Portable SDK for UPnP Devices")
118 (description
119 "The portable SDK for UPnP Devices (libupnp) provides developers with an
120 API and code for building control points, devices, and bridges that are
121 compliant with Version 1.0 of the Universal Plug and Play Device Architecture
122 Specification and support several operating systems like Linux, *BSD, Solaris
123 and others.")
124 (license license:bsd-3)))
125
126 (define-public readymedia
127 (package
128 (name "readymedia")
129 (version "1.3.0")
130 (source
131 (origin
132 (method git-fetch)
133 (uri (git-reference
134 (url "https://git.code.sf.net/p/minidlna/git")
135 (commit (string-append
136 "v" (string-replace-substring version "." "_")))))
137 (file-name (git-file-name name version))
138 (sha256
139 (base32
140 "0g04lffj37wdv5bnpl5faxpnmlj6bbk8y7ziaz2wp6h82g6kb5wj"))))
141 (build-system gnu-build-system)
142 (arguments
143 `(#:configure-flags '("--with-os-name=Linux") ; uname -s
144 #:phases
145 (modify-phases %standard-phases
146 (add-after 'unpack 'patch-source
147 (lambda _
148 (substitute* "Makefile.am"
149 ((".*LIBAVUTIL_LIBS.*") ""))
150 #t)))))
151 (native-inputs
152 `(("autoconf" ,autoconf)
153 ("automake" ,automake)
154 ("gettext" ,gettext-minimal)))
155 (inputs
156 `(("ffmpeg" ,ffmpeg)
157 ("flac" ,flac)
158 ("libexif" ,libexif)
159 ("libid3tag" ,libid3tag)
160 ("libjpeg" ,libjpeg-turbo)
161 ("libvorbis" ,libvorbis)
162 ("sqlite" ,sqlite)
163 ("zlib" ,zlib)))
164 (home-page "https://sourceforge.net/projects/minidlna/")
165 (synopsis "DLNA/UPnP-AV media server")
166 (description "ReadyMedia (formerly known as MiniDLNA) is a simple media
167 server, which serves multimedia content to compatible clients on the network.
168 It aims to be fully compliant with DLNA and UPnP-AV standards.")
169 (license license:gpl2)))