c913240ba153e8133c8844a8dfc3a400a5e7e089
[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.17.0
5 Release:        2
6 License:        AGPL v3+
7 Group:          Applications/Text
8 Source0:        https://www.mupdf.com/downloads/archive/%{name}-%{version}-source.tar.gz
9 # Source0-md5:  f6ffcd81fcd4c57016eb630bcd617c50
10 Patch0:         %{name}-shared.patch
11 URL:            https://www.mupdf.com/
12 BuildRequires:  OpenGL-glut-devel
13 BuildRequires:  curl-devel >= 7.66.0
14 BuildRequires:  freetype-devel >= 1:2.10.0
15 BuildRequires:  harfbuzz-devel >= 2.6.4
16 BuildRequires:  jbig2dec-devel >= 0.18
17 BuildRequires:  libjpeg-devel
18 BuildRequires:  libstdc++-devel
19 BuildRequires:  libtool
20 BuildRequires:  mujs-devel >= 1.0.6
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:       harfbuzz >= 2.6.4
30 Requires:       jbig2dec >= 0.18
31 Requires:       openjpeg2 >= 2.3.1
32 Requires:       zlib >= 1.2.11
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 MuPDF is a lightweight PDF, XPS and CBZ viewer.
37
38 %description -l pl.UTF-8
39 MuPDF to lekka przeglądarka pliki PDF, XPS i CBZ.
40
41 %package libs
42 Summary:        Shared MuPDF libraries
43 Summary(pl.UTF-8):      Biblioteki współdzielone MuPDF
44 Group:          Libraries
45 Requires:       freetype >= 1:2.10.0
46 Requires:       jbig2dec >= 0.18
47 Requires:       mujs >= 1.0.6
48 Requires:       openjpeg2
49 Requires:       openssl >= 1.1.0
50 Requires:       zlib >= 1.2.11
51
52 %description libs
53 Shared MuPDF libraries.
54
55 %description libs -l pl.UTF-8
56 Biblioteki współdzielone MuPDF.
57
58 %package devel
59 Summary:        Header files for MuPDF libraries
60 Summary(pl.UTF-8):      Pliki nagłówkowe bibliotek MuPDF
61 Group:          Development/Libraries
62 Requires:       %{name}-libs = %{version}-%{release}
63 Requires:       freetype-devel >= 1:2.10.0
64 Requires:       jbig2dec-devel >= 0.18
65 Requires:       libjpeg-devel
66 Requires:       libstdc++-devel
67 Requires:       mujs-devel >= 1.0.6
68 Requires:       openjpeg2-devel >= 2.3.1
69 Requires:       openssl-devel >= 1.1.0
70 Requires:       zlib-devel >= 1.2.11
71
72 %description devel
73 Header files for MuPDF libraries.
74
75 %description devel -l pl.UTF-8
76 Pliki nagłówkowe bibliotek MuPDF.
77
78 %package static
79 Summary:        Static MuPDF libraries
80 Summary(pl.UTF-8):      Statyczne biblioteki MuPDF
81 Group:          Development/Libraries
82 Requires:       %{name}-devel = %{version}-%{release}
83
84 %description static
85 Static MuPDF libraries.
86
87 %description static -l pl.UTF-8
88 Statyczne biblioteki MuPDF.
89
90 %prep
91 %setup -q -n %{name}-%{version}-source
92 %patch0 -p1
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,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 %install
122 rm -rf $RPM_BUILD_ROOT
123
124 %{__make} install \
125         DESTDIR=$RPM_BUILD_ROOT \
126         USE_SYSTEM_LIBS=yes \
127         USE_SYSTEM_MUJS=yes \
128         build=release \
129         prefix=%{_prefix} \
130         libdir=%{_libdir}
131
132 # packaged as %doc
133 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mupdf
134
135 %clean
136 rm -rf $RPM_BUILD_ROOT
137
138 %post   libs -p /sbin/ldconfig
139 %postun libs -p /sbin/ldconfig
140
141 %files
142 %defattr(644,root,root,755)
143 %doc CHANGES CONTRIBUTORS README docs/{index,manual*,thirdparty}.html
144 %attr(755,root,root) %{_bindir}/mupdf-gl
145 %attr(755,root,root) %{_bindir}/mupdf-x11
146 %attr(755,root,root) %{_bindir}/mupdf-x11-curl
147 %attr(755,root,root) %{_bindir}/muraster
148 %attr(755,root,root) %{_bindir}/mutool
149 %{_mandir}/man1/mupdf.1*
150 %{_mandir}/man1/mutool.1*
151
152 %files libs
153 %defattr(644,root,root,755)
154 %attr(755,root,root) %{_libdir}/libmupdf.so.*.*.*
155 %attr(755,root,root) %ghost %{_libdir}/libmupdf.so.0
156 %attr(755,root,root) %{_libdir}/libmupdf-third.so.*.*.*
157 %attr(755,root,root) %ghost %{_libdir}/libmupdf-third.so.0
158
159 %files devel
160 %defattr(644,root,root,755)
161 %attr(755,root,root) %{_libdir}/libmupdf.so
162 %attr(755,root,root) %{_libdir}/libmupdf-third.so
163 %{_libdir}/libmupdf.la
164 %{_libdir}/libmupdf-third.la
165 %{_includedir}/mupdf
166
167 %files static
168 %defattr(644,root,root,755)
169 %{_libdir}/libmupdf.a
170 %{_libdir}/libmupdf-third.a
This page took 0.079475 seconds and 2 git commands to generate.