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