Initial package
This commit is contained in:
parent
965a6f3e01
commit
1a762ba607
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/PyMuPDF-1.13.9.tar.gz
|
12
fix-library-linking.patch
Normal file
12
fix-library-linking.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -up PyMuPDF-1.13.6/setup.py.orig PyMuPDF-1.13.6/setup.py
|
||||
--- PyMuPDF-1.13.6/setup.py.orig 2018-06-04 23:11:48.026558352 -0400
|
||||
+++ PyMuPDF-1.13.6/setup.py 2018-06-04 23:16:04.478005716 -0400
|
||||
@@ -14,7 +14,7 @@ if sys.platform.startswith('linux'):
|
||||
libraries=[
|
||||
'mupdf',
|
||||
'mupdfthird',
|
||||
- # 'jbig2dec', 'openjp2', 'jpeg', 'freetype',
|
||||
+ 'jbig2dec', 'openjp2', 'jpeg', 'freetype', 'harfbuzz',
|
||||
# 'crypto', #openssl is required by mupdf on archlinux
|
||||
], # the libraries to link with
|
||||
)
|
77
python-PyMuPDF.spec
Normal file
77
python-PyMuPDF.spec
Normal file
@ -0,0 +1,77 @@
|
||||
%global pypi_name PyMuPDF
|
||||
%global desc This is PyMuPDF, a Python binding for MuPDF - a lightweight PDF and XPS\
|
||||
viewer. MuPDF can access files in PDF, XPS, OpenXPS, epub, comic and fiction\
|
||||
book formats, and it is known for its top performance and high rendering\
|
||||
quality. With PyMuPDF you therefore can also access files with extensions\
|
||||
*.pdf, *.xps, *.oxps, *.epub, *.cbz or *.fb2 from your Python scripts.
|
||||
|
||||
Name: python-%{pypi_name}
|
||||
Version: 1.13.9
|
||||
Release: 1%{?dist}
|
||||
Summary: Python binding for MuPDF - a lightweight PDF and XPS viewer
|
||||
|
||||
# PyMuPDF itself is GPLv3+. MuPDF (statically linked) is AGPLv3+.
|
||||
License: GPLv3+ and AGPLv3+
|
||||
URL: https://github.com/rk700/PyMuPDF
|
||||
Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz
|
||||
# Can be removed if mupdf provides a shared library
|
||||
Patch0: fix-library-linking.patch
|
||||
|
||||
BuildRequires: python2-devel python3-devel
|
||||
BuildRequires: gcc
|
||||
BuildRequires: zlib-devel mupdf-static
|
||||
# Can be removed if mupdf provides a shared library
|
||||
BuildRequires: libjpeg-devel openjpeg2-devel jbig2dec-devel freetype-devel harfbuzz-devel
|
||||
|
||||
%description
|
||||
%{desc}
|
||||
|
||||
%package -n python2-%{pypi_name}
|
||||
Summary: %{summary}
|
||||
%{?python_provide:%python_provide python2-%{pypi_name}}
|
||||
|
||||
%description -n python2-%{pypi_name}
|
||||
%{desc}
|
||||
|
||||
%package -n python3-%{pypi_name}
|
||||
Summary: %{summary}
|
||||
%{?python_provide:%python_provide python3-%{pypi_name}}
|
||||
|
||||
%description -n python3-%{pypi_name}
|
||||
%{desc}
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for python-%{pypi_name}
|
||||
BuildArch: noarch
|
||||
|
||||
%description doc
|
||||
python-%{pypi_name}-doc contains documentation and examples for PyMuPDF
|
||||
|
||||
%prep
|
||||
%autosetup -n %{pypi_name}-%{version}
|
||||
|
||||
%build
|
||||
%py2_build
|
||||
%py3_build
|
||||
|
||||
%install
|
||||
%py2_install
|
||||
%py3_install
|
||||
|
||||
|
||||
%files -n python2-%{pypi_name}
|
||||
%license COPYING "GNU AFFERO GPL V3"
|
||||
%{python2_sitearch}/fitz/
|
||||
%{python2_sitearch}/PyMuPDF*
|
||||
|
||||
%files -n python3-%{pypi_name}
|
||||
%license COPYING "GNU AFFERO GPL V3"
|
||||
%{python3_sitearch}/fitz/
|
||||
%{python3_sitearch}/PyMuPDF*
|
||||
|
||||
%files doc
|
||||
%doc demo doc/PyMuPDF.pdf examples README.md
|
||||
|
||||
%changelog
|
||||
* Sun Jun 10 2018 Scott Talbert <swt@techie.net> - 1.13.9-1
|
||||
- Initial package.
|
Loading…
x
Reference in New Issue
Block a user