projects/guix·blob java-team · refs

89 lines · 3.5 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2014 Marek Benc <[email protected]>
3;;; Copyright © 2017 Efraim Flashner <[email protected]>
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 'unpack 'fix-includes
59 (lambda _
60 (substitute* "src/libots.h"
61 (("#include <glib.h>" all)
62 (string-append all "\n#include <math.h>")))))
63 (add-after 'configure 'set-shared-lib-extension
64 (lambda _
65 ;; For some reason, the 'libtool' script (from Libtool
66 ;; 1.5.2, Debian variant) sets 'shrext_cmds' instead of
67 ;; 'shrext' for the shared library file name extension.
68 ;; This leads to the creation of 'libots-1' instead of
69 ;; 'libots-1.so'. Fix that.
70 (substitute* "libtool"
71 (("shrext_cmds") "shrext")))))))
72 (inputs
73 (list glib popt libxml2 zlib))
74 (native-inputs
75 `(("glib:bin" ,glib "bin")
76 ("pkg-config" ,pkg-config)))
77 (synopsis "Tool for summarizing texts")
78 (description
79 "The Open Text Summarizer is a library and command-line tool for
80summarizing texts. The program reads a text and decides which sentences are
81important and which are not. OTS will create a short summary or will
82highlight the main ideas in the text.
83
84The program can either print the summarized text as plain text or HTML. If in
85HTML, the important sentences are highlighted.
86
87The program is multi lingual and works with UTF-8 encoding.")
88 (home-page "http://libots.sourceforge.net/")
89 (license license:gpl2+)))