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