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