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