1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2014 Sree Harsha Totakura <sreeharsha@totakura.in>
3 ;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr>
5 ;;; This file is part of GNU Guix.
7 ;;; GNU Guix is free software; you can redistribute it and/or modify it
8 ;;; under the terms of the GNU General Public License as published by
9 ;;; the Free Software Foundation; either version 3 of the License, or (at
10 ;;; your option) any later version.
12 ;;; GNU Guix is distributed in the hope that it will be useful, but
13 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ;;; GNU General Public License for more details.
17 ;;; You should have received a copy of the GNU General Public License
18 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
20 (define-module (gnu packages upnp)
21 #:use-module (gnu packages)
22 #:use-module (gnu packages python)
23 #:use-module (guix build-system gnu)
24 #:use-module (guix download)
25 #:use-module (guix licenses)
26 #:use-module (guix packages))
28 (define-public miniupnpc
31 (version "2.0.20171102")
35 (uri (string-append "https://miniupnp.tuxfamily.org/files/"
36 name "-" version ".tar.gz"))
38 (base32 "1m1552kkdxkyyb5gyykp0j8falxwf1424cm55y50q9l10l11g18l"))))
39 (build-system gnu-build-system)
41 `(("python" ,python-2)))
43 ;; The build system does not use a configure script but depends on
44 ;; `make'. Hence we should pass parameters to `make' instead and remove
45 ;; the configure phase.
48 (string-append "SH=" (assoc-ref %build-inputs "bash") "/bin/sh")
49 (string-append "INSTALLPREFIX=" (assoc-ref %outputs "out"))
52 ;; Allow executables to find libminiupnpc.so.
53 (string-append "LDFLAGS=-Wl,-rpath="
54 (assoc-ref %outputs "out") "/lib"))
56 (modify-phases %standard-phases
58 (add-before 'install 'qualify-paths
59 (lambda* (#:key outputs #:allow-other-keys)
60 (substitute* "external-ip.sh"
62 (string-append (assoc-ref outputs "out") "/bin/upnpc"))))))))
63 (home-page "http://miniupnp.free.fr/")
64 (synopsis "UPnP protocol client library")
66 "The MiniUPnPc client library facilitates access to the services provided
67 by any @dfn{Universal Plug and Play} (UPnP) @dfn{Internet Gateway Device} (IGD)
68 present on the network. In UPnP terminology, MiniUPnPc is a UPnP Control Point.
70 It is useful whenever an application needs to listen for incoming connections
71 while running behind a UPnP-enabled router or firewall. Such applications
72 include peer-to-peer applications, active-mode FTP clients, DCC file transfers
73 over IRC, instant messaging, network games, and most server software.")
75 (x11-style "file://LICENSE" "See 'LICENSE' file in the distribution"))))