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