Commit | Line | Data |
---|---|---|
c4dc4466 SHT |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2014 Sree Harsha Totakura <sreeharsha@totakura.in> | |
d9cf11e0 | 3 | ;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice <me@tobias.gr> |
c4dc4466 SHT |
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") | |
d9cf11e0 | 31 | (version "2.0.20161216") |
c4dc4466 SHT |
32 | (source |
33 | (origin | |
34 | (method url-fetch) | |
d9cf11e0 TGR |
35 | (uri (string-append "https://miniupnp.tuxfamily.org/files/" |
36 | name "-" version ".tar.gz")) | |
c4dc4466 | 37 | (sha256 |
d9cf11e0 | 38 | (base32 "0gpxva9jkjvqwawff5y51r6bmsmdhixl3i5bmzlqsqpwsq449q81")))) |
c4dc4466 SHT |
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 | |
49 | "SH=" (assoc-ref %build-inputs "bash") "/bin/sh") | |
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") | |
63 | (string-append (assoc-ref outputs "out") "/bin/upnpc")))))))) | |
c4dc4466 | 64 | (home-page "http://miniupnp.free.fr/") |
e0f8a520 | 65 | (synopsis "UPnP protocol client library") |
c4dc4466 | 66 | (description |
e0f8a520 TGR |
67 | "The MiniUPnPc client library facilitates access to the services provided |
68 | by any Universal Plug and Play (UPnP) Internet Gateway Device (IGD) present on | |
69 | the network. In UPnP terminology, MiniUPnPc is a UPnP Control Point. It is | |
70 | useful whenever an application needs to listen for incoming connections while | |
71 | running behind a UPnP-enabled router or firewall. Such applications include | |
72 | peer-to-peer applications, active-mode FTP clients, DCC file transfers over | |
73 | IRC, instant messaging, network games, and most server software.") | |
c4dc4466 SHT |
74 | (license |
75 | (x11-style "file://LICENSE" "See 'LICENSE' file in the distribution")))) |