gnu: r-scater: Update to 1.8.0.
[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>
7f1d8b5c 4;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
c4dc4466
SHT
5;;;
6;;; This file is part of GNU Guix.
7;;;
8;;; GNU Guix is free software; you can redistribute it and/or modify it
9;;; under the terms of the GNU General Public License as published by
10;;; the Free Software Foundation; either version 3 of the License, or (at
11;;; your option) any later version.
12;;;
13;;; GNU Guix is distributed in the hope that it will be useful, but
14;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;;; GNU General Public License for more details.
17;;;
18;;; You should have received a copy of the GNU General Public License
19;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20
21(define-module (gnu packages upnp)
22 #:use-module (gnu packages)
23 #:use-module (gnu packages python)
24 #:use-module (guix build-system gnu)
25 #:use-module (guix download)
26 #:use-module (guix licenses)
27 #:use-module (guix packages))
28
29(define-public miniupnpc
30 (package
31 (name "miniupnpc")
9b107868 32 (version "2.1")
c4dc4466
SHT
33 (source
34 (origin
35 (method url-fetch)
d9cf11e0
TGR
36 (uri (string-append "https://miniupnp.tuxfamily.org/files/"
37 name "-" version ".tar.gz"))
c4dc4466 38 (sha256
9b107868 39 (base32 "1ik440yspbp3clr4m01xsl9skwyrzcvzb5nbm3i0g9x53vhbb7z1"))))
c4dc4466
SHT
40 (build-system gnu-build-system)
41 (native-inputs
42 `(("python" ,python-2)))
43 (arguments
44 ;; The build system does not use a configure script but depends on
45 ;; `make'. Hence we should pass parameters to `make' instead and remove
46 ;; the configure phase.
47 '(#:make-flags
48 (list
05b1feb9 49 (string-append "SH=" (assoc-ref %build-inputs "bash") "/bin/sh")
c4dc4466 50 (string-append "INSTALLPREFIX=" (assoc-ref %outputs "out"))
caf0c0a9
LC
51 "CC=gcc"
52
53 ;; Allow executables to find libminiupnpc.so.
54 (string-append "LDFLAGS=-Wl,-rpath="
55 (assoc-ref %outputs "out") "/lib"))
c4dc4466 56 #:phases
cdbdaf7b 57 (modify-phases %standard-phases
5af82630
TGR
58 (delete 'configure)
59 (add-before 'install 'qualify-paths
60 (lambda* (#:key outputs #:allow-other-keys)
61 (substitute* "external-ip.sh"
62 (("upnpc")
1e000f17
TGR
63 (string-append (assoc-ref outputs "out") "/bin/upnpc")))
64 #t)))))
c4dc4466 65 (home-page "http://miniupnp.free.fr/")
e0f8a520 66 (synopsis "UPnP protocol client library")
c4dc4466 67 (description
e0f8a520 68 "The MiniUPnPc client library facilitates access to the services provided
8a6f168c
TGR
69by any @dfn{Universal Plug and Play} (UPnP) @dfn{Internet Gateway Device} (IGD)
70present on the network. In UPnP terminology, MiniUPnPc is a UPnP Control Point.
71
72It is useful whenever an application needs to listen for incoming connections
73while running behind a UPnP-enabled router or firewall. Such applications
74include peer-to-peer applications, active-mode FTP clients, DCC file transfers
75over IRC, instant messaging, network games, and most server software.")
c4dc4466
SHT
76 (license
77 (x11-style "file://LICENSE" "See 'LICENSE' file in the distribution"))))
0b5eff84
LF
78
79(define-public libupnp
80 (package
81 (name "libupnp")
82 (version "1.6.24")
83 (source
84 (origin
85 (method url-fetch)
86 (uri (string-append "mirror://sourceforge/pupnp/pupnp/libUPnP%20"
87 version "/" name "-" version ".tar.bz2"))
88 (sha256
89 (base32
90 "15ngi1i7cvsv7g15fb9bkswvi99d1plz52x5qgjn4h5vyfddg0vx"))))
91 (build-system gnu-build-system)
92 (arguments
93 ;; The tests require a network device capable of multicasting which is
94 ;; not available in the build environment. See
95 ;; https://lists.gnu.org/archive/html/guix-devel/2015-01/msg00312.html.
96 `(#:tests? #f
97 #:configure-flags '("--enable-ipv6")))
98 (home-page "http://pupnp.sourceforge.net")
99 (synopsis "Portable SDK for UPnP Devices")
100 (description
101 "The portable SDK for UPnP Devices (libupnp) provides developers with an
102API and code for building control points, devices, and bridges that are
103compliant with Version 1.0 of the Universal Plug and Play Device Architecture
104Specification and support several operating systems like Linux, *BSD, Solaris
105and others.")
106 (license bsd-3)))