2015-02-07 19:12:36 +00:00
|
|
|
;;; GNU Guix --- Functional package management for GNU
|
2016-01-05 21:46:54 +00:00
|
|
|
;;; Copyright © 2015, 2016 Andreas Enge <andreas@enge.fr>
|
2015-02-07 19:12:36 +00:00
|
|
|
;;;
|
|
|
|
;;; This file is part of GNU Guix.
|
|
|
|
;;;
|
|
|
|
;;; GNU Guix is free software; you can redistribute it and/or modify it
|
|
|
|
;;; under the terms of the GNU General Public License as published by
|
|
|
|
;;; the Free Software Foundation; either version 3 of the License, or (at
|
|
|
|
;;; your option) any later version.
|
|
|
|
;;;
|
|
|
|
;;; GNU Guix is distributed in the hope that it will be useful, but
|
|
|
|
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
;;; GNU General Public License for more details.
|
|
|
|
;;;
|
|
|
|
;;; You should have received a copy of the GNU General Public License
|
|
|
|
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
(define-module (gnu packages ebook)
|
2015-02-17 22:15:18 +00:00
|
|
|
#:use-module ((guix licenses) #:select (gpl3 lgpl2.1+))
|
2015-02-07 19:12:36 +00:00
|
|
|
#:use-module (guix packages)
|
|
|
|
#:use-module (guix download)
|
2015-02-20 20:53:07 +00:00
|
|
|
#:use-module (guix build-system gnu)
|
2015-02-17 22:15:18 +00:00
|
|
|
#:use-module (gnu packages)
|
|
|
|
#:use-module (guix build-system python)
|
|
|
|
#:use-module (gnu packages)
|
|
|
|
#:use-module (gnu packages databases)
|
|
|
|
#:use-module (gnu packages fontutils)
|
|
|
|
#:use-module (gnu packages freedesktop)
|
|
|
|
#:use-module (gnu packages glib)
|
|
|
|
#:use-module (gnu packages icu4c)
|
|
|
|
#:use-module (gnu packages image)
|
|
|
|
#:use-module (gnu packages imagemagick)
|
|
|
|
#:use-module (gnu packages libusb)
|
|
|
|
#:use-module (gnu packages pdf)
|
|
|
|
#:use-module (gnu packages pkg-config)
|
|
|
|
#:use-module (gnu packages python)
|
|
|
|
#:use-module (gnu packages qt)
|
gnu: Move content of openssl module into tls module.
* gnu/packages/openssl.scm (openssl, perl-net-ssleay): Move to...
* gnu/packages/tls.scm: ...here.
* gnu/packages/openssl.scm: Delete file.
* gnu-system.am (GNU_SYSTEM_MODULES): Unregister deleted file.
* gnu/packages/{admin.scm, bittorrent.scm, certs.scm, ci.scm,
cyrus-sasl.scm, databases.scm, dns.scm, ebook.scm, enlightenment.scm,
gnunet.scm, libreoffice.scm, links.scm, mail.scm, messaging.scm,
networking.scm, ntp.scm, openldap.scm, package-management.scm, pdf.scm,
python.scm, qt.scm, rdesktop.scm, rdf.scm, ruby.scm, ssh.scm,
synergy.scm, tor.scm, version-control.scm, video.scm, vpn.scm,
w3m.scm, web.scm, weechat.scm, xiph.scm}: Adapt module import.
2015-07-05 16:27:24 +00:00
|
|
|
#:use-module (gnu packages tls)
|
2015-02-17 22:15:18 +00:00
|
|
|
#:use-module (gnu packages xorg))
|
2015-02-07 19:12:36 +00:00
|
|
|
|
|
|
|
(define-public chmlib
|
|
|
|
(package
|
|
|
|
(name "chmlib")
|
|
|
|
(version "0.40")
|
|
|
|
(source (origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (string-append "http://www.jedrea.com/chmlib/chmlib-"
|
|
|
|
version ".tar.bz2"))
|
|
|
|
(sha256
|
|
|
|
(base32
|
2015-02-20 20:53:07 +00:00
|
|
|
"18zzb4x3z0d7fjh1x5439bs62dmgsi4c1pg3qyr7h5gp1i5xcj9l"))
|
|
|
|
(patches (list (search-patch "chmlib-inttypes.patch")))))
|
2015-02-07 19:12:36 +00:00
|
|
|
(build-system gnu-build-system)
|
|
|
|
(home-page "http://www.jedrea.com/chmlib/")
|
|
|
|
(synopsis "Library for CHM files")
|
|
|
|
(description "CHMLIB is a library for dealing with ITSS/CHM format files.")
|
2015-02-07 19:16:30 +00:00
|
|
|
(license lgpl2.1+)))
|
2015-02-17 22:15:18 +00:00
|
|
|
|
|
|
|
(define-public calibre
|
|
|
|
(package
|
|
|
|
(name "calibre")
|
2016-01-05 21:46:54 +00:00
|
|
|
(version "2.48.0")
|
2015-02-17 22:15:18 +00:00
|
|
|
(source
|
|
|
|
(origin
|
|
|
|
(method url-fetch)
|
|
|
|
(uri (string-append "http://download.calibre-ebook.com/"
|
|
|
|
version "/calibre-"
|
|
|
|
version ".tar.xz"))
|
|
|
|
(sha256
|
|
|
|
(base32
|
2016-01-05 21:46:54 +00:00
|
|
|
"0bjzw806czqxkhq9qqkhff8bhfc428pijkidb1h6gr47jqdp4hpg"))
|
2015-02-17 22:15:18 +00:00
|
|
|
;; Remove non-free or doubtful code, see
|
|
|
|
;; https://lists.gnu.org/archive/html/guix-devel/2015-02/msg00478.html
|
|
|
|
(modules '((guix build utils)))
|
|
|
|
(snippet
|
|
|
|
'(begin
|
|
|
|
(delete-file-recursively "src/unrar")
|
|
|
|
(delete-file "src/odf/thumbnail.py")))
|
2015-03-24 19:35:37 +00:00
|
|
|
(patches (list (search-patch "calibre-drop-unrar.patch")
|
|
|
|
(search-patch "calibre-no-updates-dialog.patch")))))
|
2015-02-17 22:15:18 +00:00
|
|
|
(build-system python-build-system)
|
|
|
|
(native-inputs
|
|
|
|
`(("pkg-config" ,pkg-config)
|
|
|
|
("qt" ,qt) ; for qmake
|
|
|
|
;; xdg-utils is supposed to be used for desktop integration, but it
|
|
|
|
;; also creates lots of messages
|
|
|
|
;; mkdir: cannot create directory '/homeless-shelter': Permission denied
|
|
|
|
("xdg-utils" ,xdg-utils)))
|
|
|
|
;; FIXME: The following are missing inputs according to the documentation,
|
|
|
|
;; but the package can apparently be used without them,
|
|
|
|
;; They may need to be added if a deficiency is detected.
|
|
|
|
;; BeautifulSoup >= 3.0.5
|
|
|
|
;; dnspython >= 1.6.0
|
|
|
|
;; poppler >= 0.20.2
|
|
|
|
;; libwmf >= 0.2.8
|
|
|
|
;; psutil >= 0.6.1
|
|
|
|
;; python-pygments >= 2.0.1 ; used for ebook editing
|
|
|
|
(inputs
|
|
|
|
`(("chmlib" ,chmlib)
|
|
|
|
("fontconfig" ,fontconfig)
|
|
|
|
("glib" ,glib)
|
|
|
|
("icu4c" ,icu4c)
|
|
|
|
("imagemagick" ,imagemagick)
|
|
|
|
("libmtp" ,libmtp)
|
|
|
|
("libpng" ,libpng)
|
|
|
|
("libusb" ,libusb)
|
|
|
|
("libxrender" ,libxrender)
|
2015-05-29 19:52:20 +00:00
|
|
|
("openssl" ,openssl)
|
2015-02-17 22:15:18 +00:00
|
|
|
("podofo" ,podofo)
|
|
|
|
("python" ,python-2)
|
|
|
|
("python2-apsw" ,python2-apsw)
|
|
|
|
("python2-cssselect" ,python2-cssselect)
|
|
|
|
("python2-cssutils" ,python2-cssutils)
|
|
|
|
("python2-dateutil" ,python2-dateutil)
|
|
|
|
("python2-dbus" ,python2-dbus)
|
|
|
|
("python2-lxml" ,python2-lxml)
|
|
|
|
("python2-mechanize" ,python2-mechanize)
|
|
|
|
("python2-netifaces" ,python2-netifaces)
|
2015-03-07 19:30:17 +00:00
|
|
|
("python2-pillow" ,python2-pillow)
|
2015-02-17 22:15:18 +00:00
|
|
|
("python2-pyqt" ,python2-pyqt)
|
|
|
|
("python2-sip" ,python2-sip)
|
|
|
|
("qt" ,qt)
|
|
|
|
("sqlite" ,sqlite)))
|
|
|
|
(arguments
|
|
|
|
`(#:python ,python-2
|
|
|
|
#:test-target "check"
|
|
|
|
#:tests? #f ; FIXME: enable once flake8 is packaged
|
|
|
|
#:phases
|
|
|
|
(alist-cons-before
|
|
|
|
'build 'configure
|
|
|
|
(lambda* (#:key inputs #:allow-other-keys)
|
|
|
|
(let ((podofo (assoc-ref inputs "podofo"))
|
|
|
|
(pyqt (assoc-ref inputs "python2-pyqt")))
|
|
|
|
(substitute* "setup/build_environment.py"
|
|
|
|
(("sys.prefix") (string-append "'" pyqt "'")))
|
|
|
|
(setenv "PODOFO_INC_DIR" (string-append podofo "/include/podofo"))
|
|
|
|
(setenv "PODOFO_LIB_DIR" (string-append podofo "/lib"))))
|
|
|
|
%standard-phases)))
|
|
|
|
(home-page "http://calibre-ebook.com/")
|
|
|
|
(synopsis "E-book library management software")
|
|
|
|
(description "Calibre is an ebook library manager. It can view, convert
|
|
|
|
and catalog ebooks in most of the major ebook formats. It can also talk
|
|
|
|
to many ebook reader devices. It can go out to the Internet and fetch
|
|
|
|
metadata for books. It can download newspapers and convert them into
|
|
|
|
ebooks for convenient reading.")
|
|
|
|
(license gpl3))) ; some files are under various other licenses, see COPYRIGHT
|