upnp.scm 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2014 Sree Harsha Totakura <sreeharsha@totakura.in>
  3. ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
  4. ;;; Copyright © 2016, 2017, 2018, 2020, 2021 Tobias Geerinckx-Rice <me@tobias.gr>
  5. ;;; Copyright © 2018 Theodoros Foradis <theodoros@foradis.org>
  6. ;;; Copyright © 2019 Jens Mølgaard <jens@zete.tk>
  7. ;;; Copyright © 2020 Jan Wielkiewicz <tona_kosmicznego_smiecia@interia.pl>
  8. ;;; Copyright © 2021 Efraim Flashner <efraim@flashner.co.il>
  9. ;;;
  10. ;;; This file is part of GNU Guix.
  11. ;;;
  12. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  13. ;;; under the terms of the GNU General Public License as published by
  14. ;;; the Free Software Foundation; either version 3 of the License, or (at
  15. ;;; your option) any later version.
  16. ;;;
  17. ;;; GNU Guix is distributed in the hope that it will be useful, but
  18. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  19. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. ;;; GNU General Public License for more details.
  21. ;;;
  22. ;;; You should have received a copy of the GNU General Public License
  23. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  24. (define-module (gnu packages upnp)
  25. #:use-module (gnu packages)
  26. #:use-module (gnu packages autotools)
  27. #:use-module (gnu packages compression)
  28. #:use-module (gnu packages gettext)
  29. #:use-module (gnu packages image)
  30. #:use-module (gnu packages mp3)
  31. #:use-module (gnu packages photo)
  32. #:use-module (gnu packages pkg-config)
  33. #:use-module (gnu packages python)
  34. #:use-module (gnu packages sqlite)
  35. #:use-module (gnu packages video)
  36. #:use-module (gnu packages xiph)
  37. #:use-module (guix build-system gnu)
  38. #:use-module (guix utils)
  39. #:use-module (guix download)
  40. #:use-module (guix git-download)
  41. #:use-module ((guix licenses) #:prefix license:)
  42. #:use-module (guix packages)
  43. #:use-module (ice-9 match))
  44. (define-public miniupnpc
  45. (package
  46. (name "miniupnpc")
  47. (version "2.1.20191224")
  48. (source
  49. (origin
  50. (method url-fetch)
  51. (uri (string-append "https://miniupnp.tuxfamily.org/files/"
  52. "miniupnpc-" version ".tar.gz"))
  53. (sha256
  54. (base32 "1kv6dpj93gckvwvgzxl4vdqpwnicb0c8p0xw53m2gh5naiw44ys4"))))
  55. (build-system gnu-build-system)
  56. (native-inputs
  57. `(("python" ,python-2)))
  58. (arguments
  59. ;; The build system does not use a configure script but depends on
  60. ;; `make'. Hence we should pass parameters to `make' instead and remove
  61. ;; the configure phase.
  62. `(#:make-flags
  63. (list
  64. (string-append "SH=" (assoc-ref %build-inputs "bash") "/bin/sh")
  65. (string-append "INSTALLPREFIX=" (assoc-ref %outputs "out"))
  66. ,(string-append "CC=" (cc-for-target))
  67. ;; Allow executables to find libminiupnpc.so.
  68. (string-append "LDFLAGS=-Wl,-rpath="
  69. (assoc-ref %outputs "out") "/lib"))
  70. #:phases
  71. (modify-phases %standard-phases
  72. (delete 'configure)
  73. (add-before 'install 'qualify-paths
  74. (lambda* (#:key outputs #:allow-other-keys)
  75. (substitute* "external-ip.sh"
  76. (("upnpc")
  77. (string-append (assoc-ref outputs "out") "/bin/upnpc")))
  78. #t)))))
  79. (home-page "http://miniupnp.free.fr/")
  80. (synopsis "UPnP protocol client library")
  81. (description
  82. "The MiniUPnPc client library facilitates access to the services provided
  83. by any @dfn{Universal Plug and Play} (UPnP) @dfn{Internet Gateway Device} (IGD)
  84. present on the network. In UPnP terminology, MiniUPnPc is a UPnP Control Point.
  85. It is useful whenever an application needs to listen for incoming connections
  86. while running behind a UPnP-enabled router or firewall. Such applications
  87. include peer-to-peer applications, active-mode FTP clients, DCC file transfers
  88. over IRC, instant messaging, network games, and most server software.")
  89. (license
  90. (license:x11-style "file://LICENSE" "See 'LICENSE' file in the distribution"))))
  91. (define-public libupnp
  92. (package
  93. (name "libupnp")
  94. (version "1.14.7")
  95. (source
  96. (origin
  97. (method url-fetch)
  98. (uri (string-append "https://github.com/pupnp/pupnp/releases/download"
  99. "/release-" version "/libupnp-" version".tar.bz2"))
  100. (sha256
  101. (base32 "093wmhk7rdmg2ixyam4hpxa43g25555jgb3i4y7223mwhr5aqrkv"))))
  102. (native-inputs
  103. `(("pkg-config" ,pkg-config)))
  104. (build-system gnu-build-system)
  105. (arguments
  106. ;; The tests require a network device capable of multicasting which is
  107. ;; not available in the build environment. See
  108. ;; https://lists.gnu.org/archive/html/guix-devel/2015-01/msg00312.html.
  109. `(#:tests? #f
  110. #:configure-flags '("--disable-static")))
  111. (home-page "http://pupnp.sourceforge.net")
  112. (synopsis "Portable SDK for UPnP Devices")
  113. (description
  114. "The portable SDK for UPnP Devices (libupnp) provides developers with an
  115. API and code for building control points, devices, and bridges that are
  116. compliant with Version 1.0 of the Universal Plug and Play Device Architecture
  117. Specification and support several operating systems like Linux, *BSD, Solaris
  118. and others.")
  119. (license license:bsd-3)))
  120. (define-public readymedia
  121. (package
  122. (name "readymedia")
  123. (version "1.3.0")
  124. (source
  125. (origin
  126. (method git-fetch)
  127. (uri (git-reference
  128. (url "https://git.code.sf.net/p/minidlna/git")
  129. (commit (string-append
  130. "v" (string-replace-substring version "." "_")))))
  131. (file-name (git-file-name name version))
  132. (sha256
  133. (base32
  134. "0g04lffj37wdv5bnpl5faxpnmlj6bbk8y7ziaz2wp6h82g6kb5wj"))))
  135. (build-system gnu-build-system)
  136. (arguments
  137. `(#:configure-flags '("--with-os-name=Linux") ; uname -s
  138. #:phases
  139. (modify-phases %standard-phases
  140. (add-after 'unpack 'patch-source
  141. (lambda _
  142. (substitute* "Makefile.am"
  143. ((".*LIBAVUTIL_LIBS.*") ""))
  144. #t)))))
  145. (native-inputs
  146. `(("autoconf" ,autoconf)
  147. ("automake" ,automake)
  148. ("gettext" ,gettext-minimal)))
  149. (inputs
  150. `(("ffmpeg" ,ffmpeg)
  151. ("flac" ,flac)
  152. ("libexif" ,libexif)
  153. ("libid3tag" ,libid3tag)
  154. ("libjpeg" ,libjpeg-turbo)
  155. ("libvorbis" ,libvorbis)
  156. ("sqlite" ,sqlite)
  157. ("zlib" ,zlib)))
  158. (home-page "https://sourceforge.net/projects/minidlna/")
  159. (synopsis "DLNA/UPnP-AV media server")
  160. (description "ReadyMedia (formerly known as MiniDLNA) is a simple media
  161. server, which serves multimedia content to compatible clients on the network.
  162. It aims to be fully compliant with DLNA and UPnP-AV standards.")
  163. (license license:gpl2)))