ots.scm 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2014 Marek Benc <merkur32@gmail.com>
  3. ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
  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. (define-module (gnu packages ots)
  20. #:use-module (gnu packages)
  21. #:use-module (gnu packages compression)
  22. #:use-module (gnu packages glib)
  23. #:use-module (gnu packages pkg-config)
  24. #:use-module (gnu packages popt)
  25. #:use-module (gnu packages xml)
  26. #:use-module (guix packages)
  27. #:use-module (guix download)
  28. #:use-module (guix build-system gnu)
  29. #:use-module ((guix licenses) #:prefix license:))
  30. (define-public ots
  31. (package
  32. (name "ots")
  33. (version "0.5.0")
  34. (source
  35. (origin
  36. (method url-fetch)
  37. ;; libots seems to have left sourceforge and taken their release
  38. ;; tarballs with them
  39. (uri (list (string-append "mirror://debian/pool/main/o/ots/ots_"
  40. version ".orig.tar.gz")
  41. (string-append "mirror://sourceforge/libots/libots/"
  42. name "-" version "/" name "-" version
  43. ".tar.gz")))
  44. (sha256
  45. (base32 "0dz1ccd7ymzk4swz1aly4im0k3pascnshmgg1whd2rk14li8v47a"))
  46. (patches (search-patches "ots-no-include-missing-file.patch"))))
  47. (build-system gnu-build-system)
  48. (arguments
  49. ;; With '-jN', the rule to build the 'ots' command can be triggered
  50. ;; before libots-1.la has been built.
  51. '(#:parallel-build? #f
  52. #:phases
  53. (modify-phases %standard-phases
  54. (add-after 'configure 'set-shared-lib-extension
  55. (lambda _
  56. ;; For some reason, the 'libtool' script (from Libtool
  57. ;; 1.5.2, Debian variant) sets 'shrext_cmds' instead of
  58. ;; 'shrext' for the shared library file name extension.
  59. ;; This leads to the creation of 'libots-1' instead of
  60. ;; 'libots-1.so'. Fix that.
  61. (substitute* "libtool"
  62. (("shrext_cmds") "shrext"))
  63. #t)))))
  64. (inputs
  65. `(("glib" ,glib)
  66. ("popt" ,popt)
  67. ("libxml2" ,libxml2)
  68. ("zlib" ,zlib)))
  69. (native-inputs
  70. `(("glib:bin" ,glib "bin")
  71. ("pkg-config" ,pkg-config)))
  72. (synopsis "Tool for summarizing texts")
  73. (description
  74. "The Open Text Summarizer is a library and command-line tool for
  75. summarizing texts. The program reads a text and decides which sentences are
  76. important and which are not. OTS will create a short summary or will
  77. highlight the main ideas in the text.
  78. The program can either print the summarized text as plain text or HTML. If in
  79. HTML, the important sentences are highlighted.
  80. The program is multi lingual and works with UTF-8 encoding.")
  81. (home-page "http://libots.sourceforge.net/")
  82. (license license:gpl2+)))