- updated to 1.6
[packages/mupdf.git] / mupdf.spec
CommitLineData
6d5cd20c
JB
1#
2# Conditional build:
3%bcond_with v8 # use V8 JS engine instead of MuJS
4#
69d32f06
JB
5Summary: MuPDF - lightweight PDF, XPS and CBZ viewer and parser/rendering library
6Summary(pl.UTF-8): MuPDF - lekka przeglądarka oraz biblioteka renderująca PDF, XPS, CBZ
7Name: mupdf
6d5cd20c
JB
8Version: 1.6
9Release: 1
f735ca81
JB
10License: AGPL v3+
11Group: Applications/Text
6d5cd20c
JB
12Source0: http://www.mupdf.com/downloads/%{name}-%{version}-source.tar.gz
13# Source0-md5: 8d69db41ae9e0b6807b76bb6ed70dc2f
69d32f06 14Patch0: %{name}-openjpeg.patch
6d5cd20c 15Patch1: %{name}-shared.patch
69d32f06
JB
16URL: http://www.mupdf.com/
17BuildRequires: curl-devel
18BuildRequires: freetype-devel >= 2
19BuildRequires: jbig2dec-devel
20BuildRequires: libjpeg-devel
f735ca81 21BuildRequires: libstdc++-devel
6d5cd20c 22%{!?with_v8:BuildRequires: mujs-devel}
7f62b790 23BuildRequires: openjpeg2-devel >= 2.1.0
69d32f06
JB
24BuildRequires: openssl-devel
25BuildRequires: pkgconfig
6d5cd20c 26%{?with_v8:BuildRequires: v8-devel}
69d32f06
JB
27BuildRequires: xorg-lib-libX11-devel
28BuildRequires: xorg-lib-libXext-devel
29BuildRequires: zlib-devel
f735ca81 30Requires: %{name}-libs = %{version}-%{release}
69d32f06
JB
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
f735ca81 33# needs symbols from one of libmupdf-js-*
6d5cd20c 34#define skip_post_check_so libmupdf.so.*
f735ca81 35
69d32f06
JB
36%description
37MuPDF is a lightweight PDF, XPS and CBZ viewer and parser/rendering
38library.
39
40%description -l pl.UTF-8
41MuPDF to lekka przeglądarka oraz biblioteka analizująca/renderująca
42pliki PDF, XPS i CBZ.
43
f735ca81
JB
44%package libs
45Summary: Shared MuPDF libraries
46Summary(pl.UTF-8): Biblioteki współdzielone MuPDF
47Group: Libraries
48
49%description libs
50Shared MuPDF libraries.
51
52%description libs -l pl.UTF-8
53Biblioteki współdzielone MuPDF.
54
69d32f06 55%package devel
f735ca81
JB
56Summary: Header files for MuPDF libraries
57Summary(pl.UTF-8): Pliki nagłówkowe bibliotek MuPDF
69d32f06 58Group: Development/Libraries
f735ca81 59Requires: %{name}-libs = %{version}-%{release}
973c4d4a 60Requires: freetype-devel >= 2
f735ca81
JB
61Requires: jbig2dec-devel
62Requires: libjpeg-devel
63Requires: libstdc++-devel
6d5cd20c 64%{!?with_v8:Requires: mujs-devel}
7f62b790 65Requires: openjpeg2-devel >= 2.1.0
f735ca81 66Requires: openssl-devel
6d5cd20c 67%{?with_v8:Requires: v8-devel}
f735ca81 68Requires: zlib-devel
69d32f06
JB
69
70%description devel
f735ca81 71Header files for MuPDF libraries.
69d32f06
JB
72
73%description devel -l pl.UTF-8
f735ca81 74Pliki nagłówkowe bibliotek MuPDF.
69d32f06
JB
75
76%package static
f735ca81
JB
77Summary: Static MuPDF libraries
78Summary(pl.UTF-8): Statyczne biblioteki MuPDF
69d32f06
JB
79Group: Development/Libraries
80Requires: %{name}-devel = %{version}-%{release}
81
82%description static
f735ca81 83Static MuPDF libraries.
69d32f06
JB
84
85%description static -l pl.UTF-8
f735ca81 86Statyczne biblioteki MuPDF.
69d32f06
JB
87
88%prep
89%setup -q -n %{name}-%{version}-source
90%patch0 -p1
91%patch1 -p1
69d32f06 92
f735ca81 93# use system libs instead
6d5cd20c 94%{__rm} -r thirdparty/{curl,freetype,jbig2dec,jpeg,mujs,openjpeg,zlib}
69d32f06
JB
95
96%build
97CFLAGS="%{rpmcflags} %{rpmcppflags}" \
f735ca81 98LDFLAGS="%{rpmldflags}" \
69d32f06
JB
99%{__make} \
100 CC="%{__cc}" \
f735ca81 101 CXX="%{__cxx}" \
6d5cd20c
JB
102%if %{with v8}
103 HAVE_V8=yes \
104 V8_CFLAGS= \
105 V8_LIBS="-lv8 -lstdc++" \
106%else
107 HAVE_MUJS=yes \
108 MUJS_CFLAGS= \
109 MUJS_LIBS="-lmujs" \
110%endif
7f62b790 111 SYS_OPENJPEG_CFLAGS="$(pkg-config --cflags libopenjp2)" \
80c18e69 112 build=release \
f735ca81 113 libdir=%{_libdir} \
80c18e69 114 verbose=1
69d32f06
JB
115
116%install
117rm -rf $RPM_BUILD_ROOT
118
119%{__make} install \
120 DESTDIR=$RPM_BUILD_ROOT \
121 V8_PRESENT=yes \
122 build=release \
123 prefix=%{_prefix} \
124 libdir=%{_libdir}
125
126# packaged as %doc
127%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mupdf
128
129%clean
130rm -rf $RPM_BUILD_ROOT
131
f735ca81
JB
132%post libs -p /sbin/ldconfig
133%postun libs -p /sbin/ldconfig
69d32f06
JB
134
135%files
136%defattr(644,root,root,755)
137%doc CHANGES CONTRIBUTORS README
138%attr(755,root,root) %{_bindir}/mudraw
6d5cd20c 139%attr(755,root,root) %{_bindir}/mujstest
69d32f06
JB
140%attr(755,root,root) %{_bindir}/mupdf-x11
141%attr(755,root,root) %{_bindir}/mupdf-x11-curl
69d32f06
JB
142%attr(755,root,root) %{_bindir}/mutool
143%{_mandir}/man1/mudraw.1*
144%{_mandir}/man1/mupdf.1*
145%{_mandir}/man1/mutool.1*
146
f735ca81
JB
147%files libs
148%defattr(644,root,root,755)
149%attr(755,root,root) %{_libdir}/libmupdf.so.*.*.*
150%attr(755,root,root) %ghost %{_libdir}/libmupdf.so.0
f735ca81 151
69d32f06
JB
152%files devel
153%defattr(644,root,root,755)
154%doc docs/{naming,overview,progressive,refcount,thirdparty}.txt
f735ca81 155%attr(755,root,root) %{_libdir}/libmupdf.so
f735ca81 156%{_libdir}/libmupdf.la
69d32f06
JB
157%{_includedir}/mupdf
158
69d32f06
JB
159%files static
160%defattr(644,root,root,755)
161%{_libdir}/libmupdf.a
This page took 0.097531 seconds and 4 git commands to generate.