up to 1.15.0
[packages/mupdf.git] / mupdf.spec
CommitLineData
69d32f06 1Summary: MuPDF - lightweight PDF, XPS and CBZ viewer and parser/rendering library
0845671b 2Summary(pl.UTF-8): MuPDF - lekka przeglądarka PDF, XPS, CBZ
69d32f06 3Name: mupdf
2e02666f
JP
4Version: 1.15.0
5Release: 1
f735ca81
JB
6License: AGPL v3+
7Group: Applications/Text
6e4f486a 8Source0: https://www.mupdf.com/downloads/archive/%{name}-%{version}-source.tar.gz
2e02666f 9# Source0-md5: e9f1d47108e4e9151666c56ecad47fc9
5622ca89 10Patch0: %{name}-shared.patch
6e4f486a 11URL: https://www.mupdf.com/
f81d51d1 12BuildRequires: OpenGL-glut-devel
6e4f486a
JB
13BuildRequires: freetype-devel >= 1:2.9.1
14BuildRequires: harfbuzz-devel >= 1.9.0
15BuildRequires: jbig2dec-devel >= 0.14
69d32f06 16BuildRequires: libjpeg-devel
f735ca81 17BuildRequires: libstdc++-devel
5622ca89 18BuildRequires: libtool
2e02666f 19BuildRequires: mujs-devel >= 1.0.6
6e4f486a
JB
20BuildRequires: openjpeg2-devel >= 2.3.0
21BuildRequires: openssl-devel >= 1.1.0
69d32f06 22BuildRequires: pkgconfig
69d32f06
JB
23BuildRequires: xorg-lib-libX11-devel
24BuildRequires: xorg-lib-libXext-devel
6e4f486a 25BuildRequires: zlib-devel >= 1.2.11
6e4f486a
JB
26Requires: freetype >= 1:2.9.1
27Requires: harfbuzz >= 1.9.0
28Requires: jbig2dec >= 0.14
29Requires: openjpeg2 >= 2.3.0
30Requires: zlib >= 1.2.11
69d32f06
JB
31BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33%description
0845671b 34MuPDF is a lightweight PDF, XPS and CBZ viewer.
69d32f06
JB
35
36%description -l pl.UTF-8
0845671b 37MuPDF to lekka przeglądarka pliki PDF, XPS i CBZ.
69d32f06 38
5622ca89
JB
39%package libs
40Summary: Shared MuPDF libraries
41Summary(pl.UTF-8): Biblioteki współdzielone MuPDF
42Group: Libraries
43Requires: freetype >= 1:2.9.1
44Requires: jbig2dec >= 0.14
2e02666f 45Requires: mujs >= 1.0.6
5622ca89
JB
46Requires: openjpeg2
47Requires: openssl >= 1.1.0
48Requires: zlib >= 1.2.11
49
50%description libs
51Shared MuPDF libraries.
52
53%description libs -l pl.UTF-8
54Biblioteki współdzielone MuPDF.
55
56%package devel
57Summary: Header files for MuPDF libraries
58Summary(pl.UTF-8): Pliki nagłówkowe bibliotek MuPDF
59Group: Development/Libraries
60Requires: %{name}-libs = %{version}-%{release}
61Requires: freetype-devel >= 1:2.9.1
62Requires: jbig2dec-devel >= 0.14
63Requires: libjpeg-devel
64Requires: libstdc++-devel
2e02666f 65Requires: mujs-devel >= 1.0.6
5622ca89
JB
66Requires: openjpeg2-devel >= 2.3.0
67Requires: openssl-devel >= 1.1.0
68Requires: zlib-devel >= 1.2.11
69
70%description devel
71Header files for MuPDF libraries.
72
73%description devel -l pl.UTF-8
74Pliki nagłówkowe bibliotek MuPDF.
75
76%package static
77Summary: Static MuPDF libraries
78Summary(pl.UTF-8): Statyczne biblioteki MuPDF
79Group: Development/Libraries
80Requires: %{name}-devel = %{version}-%{release}
81
82%description static
83Static MuPDF libraries.
84
85%description static -l pl.UTF-8
86Statyczne biblioteki MuPDF.
87
69d32f06
JB
88%prep
89%setup -q -n %{name}-%{version}-source
5622ca89 90%patch0 -p1
69d32f06 91
6e4f486a 92# use system libs instead:
6e4f486a
JB
93# freetype 2.9.1
94# harfbuzz 1.9.0 + git update (nothing crucial)
95# jbig2dec 0.14
96# libjpeg 9
97# mujs ?
98# openjpeg 2.3.0
99# zlib 1.2.11
2e02666f 100%{__rm} -r thirdparty/{freetype,jbig2dec,libjpeg,mujs,openjpeg,zlib}
6e4f486a
JB
101# but keep:
102# freeglut - 3.0.0 + some additional keyboard and clipboard APIs
103# lcms2 - "art" fork with tread safety
69d32f06
JB
104
105%build
106CFLAGS="%{rpmcflags} %{rpmcppflags}" \
f735ca81 107LDFLAGS="%{rpmldflags}" \
73677cf1 108%{__make} -j1 \
69d32f06 109 CC="%{__cc}" \
f735ca81 110 CXX="%{__cxx}" \
7f62b790 111 SYS_OPENJPEG_CFLAGS="$(pkg-config --cflags libopenjp2)" \
6e4f486a
JB
112 USE_SYSTEM_LIBS=yes \
113 USE_SYSTEM_MUJS=yes \
80c18e69 114 build=release \
f735ca81 115 libdir=%{_libdir} \
0845671b 116 verbose=yes
69d32f06
JB
117
118%install
119rm -rf $RPM_BUILD_ROOT
120
121%{__make} install \
122 DESTDIR=$RPM_BUILD_ROOT \
6e4f486a
JB
123 USE_SYSTEM_LIBS=yes \
124 USE_SYSTEM_MUJS=yes \
69d32f06
JB
125 build=release \
126 prefix=%{_prefix} \
127 libdir=%{_libdir}
128
129# packaged as %doc
130%{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mupdf
131
132%clean
133rm -rf $RPM_BUILD_ROOT
134
5622ca89
JB
135%post libs -p /sbin/ldconfig
136%postun libs -p /sbin/ldconfig
137
69d32f06
JB
138%files
139%defattr(644,root,root,755)
5622ca89 140%doc CHANGES CONTRIBUTORS README docs/{index,manual*,thirdparty}.html
0845671b 141%attr(755,root,root) %{_bindir}/mupdf-gl
69d32f06 142%attr(755,root,root) %{_bindir}/mupdf-x11
2e02666f 143%attr(755,root,root) %{_bindir}/muraster
69d32f06 144%attr(755,root,root) %{_bindir}/mutool
69d32f06
JB
145%{_mandir}/man1/mupdf.1*
146%{_mandir}/man1/mutool.1*
5622ca89
JB
147
148%files libs
149%defattr(644,root,root,755)
150%attr(755,root,root) %{_libdir}/libmupdf.so.*.*.*
151%attr(755,root,root) %ghost %{_libdir}/libmupdf.so.0
152%attr(755,root,root) %{_libdir}/libmupdf-third.so.*.*.*
153%attr(755,root,root) %ghost %{_libdir}/libmupdf-third.so.0
154
155%files devel
156%defattr(644,root,root,755)
157%attr(755,root,root) %{_libdir}/libmupdf.so
158%attr(755,root,root) %{_libdir}/libmupdf-third.so
159%{_libdir}/libmupdf.la
160%{_libdir}/libmupdf-third.la
161%{_includedir}/mupdf
162
163%files static
164%defattr(644,root,root,755)
165%{_libdir}/libmupdf.a
166%{_libdir}/libmupdf-third.a
This page took 0.114198 seconds and 4 git commands to generate.