gnu: miniupnpc: Use @dfn mark-up.
[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, 2017 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.20170421")
32 (source
33 (origin
34 (method url-fetch)
35 (uri (string-append "https://miniupnp.tuxfamily.org/files/"
36 name "-" version ".tar.gz"))
37 (sha256
38 (base32 "0n11m2wq812zms5b21h8ihw1kbyaihj9nqjiida0hskf4dmw4m13"))))
39 (build-system gnu-build-system)
40 (native-inputs
41 `(("python" ,python-2)))
42 (arguments
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.
46 '(#:make-flags
47 (list
48 (string-append "SH=" (assoc-ref %build-inputs "bash") "/bin/sh")
49 (string-append "INSTALLPREFIX=" (assoc-ref %outputs "out"))
50 "CC=gcc"
51
52 ;; Allow executables to find libminiupnpc.so.
53 (string-append "LDFLAGS=-Wl,-rpath="
54 (assoc-ref %outputs "out") "/lib"))
55 #:phases
56 (modify-phases %standard-phases
57 (delete 'configure)
58 (add-before 'install 'qualify-paths
59 (lambda* (#:key outputs #:allow-other-keys)
60 (substitute* "external-ip.sh"
61 (("upnpc")
62 (string-append (assoc-ref outputs "out") "/bin/upnpc"))))))))
63 (home-page "http://miniupnp.free.fr/")
64 (synopsis "UPnP protocol client library")
65 (description
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.
69
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.")
74 (license
75 (x11-style "file://LICENSE" "See 'LICENSE' file in the distribution"))))