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