]>
Commit | Line | Data |
---|---|---|
1 | Summary: MuPDF - lightweight PDF, XPS and CBZ viewer and parser/rendering library | |
2 | Summary(pl.UTF-8): MuPDF - lekka przeglądarka oraz biblioteka renderująca PDF, XPS, CBZ | |
3 | Name: mupdf | |
4 | Version: 1.9a | |
5 | Release: 1 | |
6 | License: AGPL v3+ | |
7 | Group: Applications/Text | |
8 | Source0: http://www.mupdf.com/downloads/%{name}-%{version}-source.tar.gz | |
9 | # Source0-md5: 658b90788a57d858dcb069cf326e11c3 | |
10 | Patch0: %{name}-openjpeg.patch | |
11 | Patch1: %{name}-shared.patch | |
12 | URL: http://www.mupdf.com/ | |
13 | BuildRequires: OpenGL-glut-devel | |
14 | BuildRequires: curl-devel | |
15 | BuildRequires: freetype-devel >= 2 | |
16 | BuildRequires: glfw-devel | |
17 | BuildRequires: jbig2dec-devel | |
18 | BuildRequires: libjpeg-devel | |
19 | BuildRequires: libstdc++-devel | |
20 | BuildRequires: mujs-devel >= 0-0.20160302 | |
21 | BuildRequires: openjpeg2-devel >= 2.1.0 | |
22 | BuildRequires: openssl-devel | |
23 | BuildRequires: pkgconfig | |
24 | BuildRequires: xorg-lib-libX11-devel | |
25 | BuildRequires: xorg-lib-libXext-devel | |
26 | BuildRequires: zlib-devel | |
27 | Requires: %{name}-libs = %{version}-%{release} | |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
29 | ||
30 | %description | |
31 | MuPDF is a lightweight PDF, XPS and CBZ viewer and parser/rendering | |
32 | library. | |
33 | ||
34 | %description -l pl.UTF-8 | |
35 | MuPDF to lekka przeglądarka oraz biblioteka analizująca/renderująca | |
36 | pliki PDF, XPS i CBZ. | |
37 | ||
38 | %package libs | |
39 | Summary: Shared MuPDF libraries | |
40 | Summary(pl.UTF-8): Biblioteki współdzielone MuPDF | |
41 | Group: Libraries | |
42 | ||
43 | %description libs | |
44 | Shared MuPDF libraries. | |
45 | ||
46 | %description libs -l pl.UTF-8 | |
47 | Biblioteki współdzielone MuPDF. | |
48 | ||
49 | %package devel | |
50 | Summary: Header files for MuPDF libraries | |
51 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek MuPDF | |
52 | Group: Development/Libraries | |
53 | Requires: %{name}-libs = %{version}-%{release} | |
54 | Requires: freetype-devel >= 2 | |
55 | Requires: jbig2dec-devel | |
56 | Requires: libjpeg-devel | |
57 | Requires: libstdc++-devel | |
58 | Requires: mujs-devel | |
59 | Requires: openjpeg2-devel >= 2.1.0 | |
60 | Requires: openssl-devel | |
61 | Requires: zlib-devel | |
62 | ||
63 | %description devel | |
64 | Header files for MuPDF libraries. | |
65 | ||
66 | %description devel -l pl.UTF-8 | |
67 | Pliki nagłówkowe bibliotek MuPDF. | |
68 | ||
69 | %package static | |
70 | Summary: Static MuPDF libraries | |
71 | Summary(pl.UTF-8): Statyczne biblioteki MuPDF | |
72 | Group: Development/Libraries | |
73 | Requires: %{name}-devel = %{version}-%{release} | |
74 | ||
75 | %description static | |
76 | Static MuPDF libraries. | |
77 | ||
78 | %description static -l pl.UTF-8 | |
79 | Statyczne biblioteki MuPDF. | |
80 | ||
81 | %prep | |
82 | %setup -q -n %{name}-%{version}-source | |
83 | %patch0 -p1 | |
84 | %patch1 -p1 | |
85 | ||
86 | # use system libs instead | |
87 | %{__rm} -r thirdparty/{curl,freetype,glfw,jbig2dec,jpeg,mujs,openjpeg,zlib} | |
88 | ||
89 | %build | |
90 | CFLAGS="%{rpmcflags} %{rpmcppflags}" \ | |
91 | LDFLAGS="%{rpmldflags}" \ | |
92 | %{__make} -j1 \ | |
93 | CC="%{__cc}" \ | |
94 | CXX="%{__cxx}" \ | |
95 | HAVE_MUJS=yes \ | |
96 | MUJS_CFLAGS= \ | |
97 | MUJS_LIBS="-lmujs" \ | |
98 | SYS_OPENJPEG_CFLAGS="$(pkg-config --cflags libopenjp2)" \ | |
99 | build=release \ | |
100 | libdir=%{_libdir} \ | |
101 | verbose=1 | |
102 | ||
103 | %install | |
104 | rm -rf $RPM_BUILD_ROOT | |
105 | ||
106 | %{__make} install \ | |
107 | DESTDIR=$RPM_BUILD_ROOT \ | |
108 | HAVE_MUJS=yes \ | |
109 | build=release \ | |
110 | prefix=%{_prefix} \ | |
111 | libdir=%{_libdir} | |
112 | ||
113 | # packaged as %doc | |
114 | %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mupdf | |
115 | ||
116 | %clean | |
117 | rm -rf $RPM_BUILD_ROOT | |
118 | ||
119 | %post libs -p /sbin/ldconfig | |
120 | %postun libs -p /sbin/ldconfig | |
121 | ||
122 | %files | |
123 | %defattr(644,root,root,755) | |
124 | %doc CHANGES CONTRIBUTORS README | |
125 | %attr(755,root,root) %{_bindir}/mujstest | |
126 | %attr(755,root,root) %{_bindir}/mupdf-x11 | |
127 | %attr(755,root,root) %{_bindir}/mupdf-x11-curl | |
128 | %attr(755,root,root) %{_bindir}/mutool | |
129 | %{_mandir}/man1/mupdf.1* | |
130 | %{_mandir}/man1/mutool.1* | |
131 | ||
132 | %files libs | |
133 | %defattr(644,root,root,755) | |
134 | %attr(755,root,root) %{_libdir}/libmupdf.so.*.*.* | |
135 | %attr(755,root,root) %ghost %{_libdir}/libmupdf.so.0 | |
136 | ||
137 | %files devel | |
138 | %defattr(644,root,root,755) | |
139 | %doc docs/{naming,overview,progressive,refcount,thirdparty}.txt | |
140 | %attr(755,root,root) %{_libdir}/libmupdf.so | |
141 | %{_libdir}/libmupdf.la | |
142 | %{_includedir}/mupdf | |
143 | ||
144 | %files static | |
145 | %defattr(644,root,root,755) | |
146 | %{_libdir}/libmupdf.a |