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