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