gnu: miniupnpc: Improve synopsis and description.
[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 © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
4 ;;;
5 ;;; This file is part of GNU Guix.
6 ;;;
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.
11 ;;;
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.
16 ;;;
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/>.
19
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))
27
28 (define-public miniupnpc
29 (package
30 (name "miniupnpc")
31 (version "2.0")
32 (source
33 (origin
34 (method url-fetch)
35 (uri (string-append
36 "http://miniupnp.tuxfamily.org/files/miniupnpc-"
37 version ".tar.gz"))
38 (sha256
39 (base32 "0fzrc6fs8vzb2yvk01bd3q5jkarysl7gjlyaqncy3yvfk2wcwd6l"))))
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
49 (string-append
50 "SH=" (assoc-ref %build-inputs "bash") "/bin/sh")
51 (string-append "INSTALLPREFIX=" (assoc-ref %outputs "out"))
52 "CC=gcc"
53
54 ;; Allow executables to find libminiupnpc.so.
55 (string-append "LDFLAGS=-Wl,-rpath="
56 (assoc-ref %outputs "out") "/lib"))
57 #:phases
58 (modify-phases %standard-phases
59 (delete 'configure)
60 (add-before 'install 'qualify-paths
61 (lambda* (#:key outputs #:allow-other-keys)
62 (substitute* "external-ip.sh"
63 (("upnpc")
64 (string-append (assoc-ref outputs "out") "/bin/upnpc"))))))))
65 (home-page "http://miniupnp.free.fr/")
66 (synopsis "UPnP protocol client library")
67 (description
68 "The MiniUPnPc client library facilitates access to the services provided
69 by any Universal Plug and Play (UPnP) Internet Gateway Device (IGD) present on
70 the network. In UPnP terminology, MiniUPnPc is a UPnP Control Point. It is
71 useful whenever an application needs to listen for incoming connections while
72 running behind a UPnP-enabled router or firewall. Such applications include
73 peer-to-peer applications, active-mode FTP clients, DCC file transfers over
74 IRC, instant messaging, network games, and most server software.")
75 (license
76 (x11-style "file://LICENSE" "See 'LICENSE' file in the distribution"))))