]> git.pld-linux.org Git - packages/mupdf.git/blame - mupdf.spec
- non-parallel build
[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
f81d51d1 8Version: 1.8
6d5cd20c 9Release: 1
f735ca81
JB
10License: AGPL v3+
11Group: Applications/Text
6d5cd20c 12Source0: http://www.mupdf.com/downloads/%{name}-%{version}-source.tar.gz
f81d51d1 13# Source0-md5: 3205256d78d8524d67dd2a47c7a345fa
69d32f06 14Patch0: %{name}-openjpeg.patch
6d5cd20c 15Patch1: %{name}-shared.patch
f81d51d1 16Patch2: %{name}-mujs.patch
69d32f06 17URL: http://www.mupdf.com/
f81d51d1 18BuildRequires: OpenGL-glut-devel
69d32f06
JB
19BuildRequires: curl-devel
20BuildRequires: freetype-devel >= 2
f81d51d1 21BuildRequires: glfw-devel
69d32f06
JB
22BuildRequires: jbig2dec-devel
23BuildRequires: libjpeg-devel
f735ca81 24BuildRequires: libstdc++-devel
f81d51d1 25%{!?with_v8:BuildRequires: mujs-devel >= 0-0.20160302}
7f62b790 26BuildRequires: openjpeg2-devel >= 2.1.0
69d32f06
JB
27BuildRequires: openssl-devel
28BuildRequires: pkgconfig
6d5cd20c 29%{?with_v8:BuildRequires: v8-devel}
69d32f06
JB
30BuildRequires: xorg-lib-libX11-devel
31BuildRequires: xorg-lib-libXext-devel
32BuildRequires: zlib-devel
f735ca81 33Requires: %{name}-libs = %{version}-%{release}
69d32f06
JB
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
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
f81d51d1 92%patch2 -p1
69d32f06 93
f735ca81 94# use system libs instead
f81d51d1 95%{__rm} -r thirdparty/{curl,freetype,glfw,jbig2dec,jpeg,mujs,openjpeg,zlib}
69d32f06
JB
96
97%build
98CFLAGS="%{rpmcflags} %{rpmcppflags}" \
f735ca81 99LDFLAGS="%{rpmldflags}" \
73677cf1 100%{__make} -j1 \
69d32f06 101 CC="%{__cc}" \
f735ca81 102 CXX="%{__cxx}" \
6d5cd20c
JB
103%if %{with v8}
104 HAVE_V8=yes \
105 V8_CFLAGS= \
106 V8_LIBS="-lv8 -lstdc++" \
107%else
108 HAVE_MUJS=yes \
109 MUJS_CFLAGS= \
110 MUJS_LIBS="-lmujs" \
111%endif
7f62b790 112 SYS_OPENJPEG_CFLAGS="$(pkg-config --cflags libopenjp2)" \
80c18e69 113 build=release \
f735ca81 114 libdir=%{_libdir} \
80c18e69 115 verbose=1
69d32f06
JB
116
117%install
118rm -rf $RPM_BUILD_ROOT
119
120%{__make} install \
121 DESTDIR=$RPM_BUILD_ROOT \
122 V8_PRESENT=yes \
123 build=release \
124 prefix=%{_prefix} \
125 libdir=%{_libdir}
126
127# packaged as %doc
128%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mupdf
129
130%clean
131rm -rf $RPM_BUILD_ROOT
132
f735ca81
JB
133%post libs -p /sbin/ldconfig
134%postun libs -p /sbin/ldconfig
69d32f06
JB
135
136%files
137%defattr(644,root,root,755)
138%doc CHANGES CONTRIBUTORS README
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 142%attr(755,root,root) %{_bindir}/mutool
69d32f06
JB
143%{_mandir}/man1/mupdf.1*
144%{_mandir}/man1/mutool.1*
145
f735ca81
JB
146%files libs
147%defattr(644,root,root,755)
148%attr(755,root,root) %{_libdir}/libmupdf.so.*.*.*
149%attr(755,root,root) %ghost %{_libdir}/libmupdf.so.0
f735ca81 150
69d32f06
JB
151%files devel
152%defattr(644,root,root,755)
153%doc docs/{naming,overview,progressive,refcount,thirdparty}.txt
f735ca81 154%attr(755,root,root) %{_libdir}/libmupdf.so
f735ca81 155%{_libdir}/libmupdf.la
69d32f06
JB
156%{_includedir}/mupdf
157
69d32f06
JB
158%files static
159%defattr(644,root,root,755)
160%{_libdir}/libmupdf.a
This page took 0.122827 seconds and 4 git commands to generate.