%define pkg_name    mupdf
%define pkg_version 1.16.1
%define pkg_release 1%{?_dist_release}

Summary: A lightweight PDF and XPS viewer
Name:    %{pkg_name}
Version: %{pkg_version}
Release: %{pkg_release}

License: AGPLv3+
Group:   Applications/Publishing
URL:     http://mupdf.com/
# Source:  http://mupdf.com/downloads/%{name}-%{version}-source.tar.gz
Source:  https://mupdf.com/downloads/%{name}-%{version}-source.tar.xz

BuildRoot: %{_tmppath}/%{pkg_name}-%{version}-root
BuildRequires: xorg-x11-devel
BuildRequires: freeglut-devel
BuildRequires: mesa-libEGL-devel

Vendor: Project Vine
Distribution: Vine Linux
Packager: ara_t


%description
MuPDF is a lightweight PDF and XPS viewer.
The renderer in MuPDF is tailored for high quality anti-aliased graphics.
It renders text with metrics and spacing accurate to within fractions of
a pixel for the highest fidelity in reproducing the look of a printed page
on screen.

%package static
Summary: Static library for MuPDF
Group: Development/Libraries
Requires: mupdf = %{version}-%{release}

%description static
A static library for MuPDF.


%prep
%{__rm} -rf ${RPM_BUILD_ROOT}
%setup -q -n %{name}-%{version}-source

%install
%{make_install} prefix=%{_prefix} libdir=%{_libdir}

%clean
%{__rm} -rf ${RPM_BUILD_ROOT}


%files
%defattr(-, root, root)
%{_bindir}/
%{_datadir}/

%files static
%defattr(-, root, root)
%{_libdir}/libmupdf*.a
%{_includedir}/


%changelog
* Wed Oct 09 2019 Toshiaki Ara <ara_t@384.jp> 1.16.1-1
- new upstream release
- add BuildRequires: mesa-libEGL-devel

* Sun Oct 07 2018 Toshiaki Ara <ara_t@384.jp> 1.14.0-1
- new upstream release

* Wed May 02 2018 Toshiaki Ara <ara_t@384.jp> 1.13.0-1
- new upstream release

* Sun Apr 01 2018 Toshiaki Ara <ara_t@384.jp> 1.12.0-1
- new upstream release
- add BuildRequires: freeglut-devel
- change download URL

* Sat Jun 17 2017 Toshiaki Ara <ara_t@384.jp> 1.11-1
- new upstream release

* Tue Dec 27 2016 Toshiaki Ara <ara_t@384.jp> 1.10a-1
- new upstream release

* Sun Aug 21 2016 Toshiaki Ara <ara_t@384.jp> 1.9a-1
- update to 1.9a

* Sun Apr 10 2016 Toshiaki Ara <ara_t@384.jp> 1.8-4
- correct SPEC file

* Sun Feb 28 2016 Toshiaki Ara <ara_t@384.jp> 1.8-3
- correct Group

* Wed Feb 17 2016 Toshiaki Ara <ara_t@384.jp> 1.8-2
- change directory for library

* Sun Jan 17 2016 Toshiaki Ara <ara_t@384.jp> 1.8-1
- new package
