- new
[packages/mupdf.git] / mupdf.spec
1 # TODO: build shared library
2 Summary:        MuPDF - lightweight PDF, XPS and CBZ viewer and parser/rendering library
3 Summary(pl.UTF-8):      MuPDF - lekka przeglądarka oraz biblioteka renderująca PDF, XPS, CBZ
4 Name:           mupdf
5 Version:        1.3
6 Release:        0.1
7 License:        AGPL v3
8 Group:          Libraries
9 #Source0Download: http://code.google.com/p/mupdf/downloads/list?q=source
10 Source0:        http://mupdf.googlecode.com/files/%{name}-%{version}-source.tar.gz
11 # Source0-md5:  fe53c2a56ebd7759f5f965bc4ff66359
12 Patch0:         %{name}-openjpeg.patch
13 Patch1:         %{name}-curl.patch
14 Patch2:         %{name}-v8.patch
15 URL:            http://www.mupdf.com/
16 BuildRequires:  curl-devel
17 BuildRequires:  freetype-devel >= 2
18 BuildRequires:  jbig2dec-devel
19 BuildRequires:  libjpeg-devel
20 BuildRequires:  openjpeg2-devel >= 2
21 BuildRequires:  openssl-devel
22 BuildRequires:  pkgconfig
23 BuildRequires:  v8-devel
24 BuildRequires:  xorg-lib-libX11-devel
25 BuildRequires:  xorg-lib-libXext-devel
26 BuildRequires:  zlib-devel
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
30 MuPDF is a lightweight PDF, XPS and CBZ viewer and parser/rendering
31 library.
32
33 %description -l pl.UTF-8
34 MuPDF to lekka przeglądarka oraz biblioteka analizująca/renderująca
35 pliki PDF, XPS i CBZ.
36
37 %package devel
38 Summary:        Header files for MuPDF library
39 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki MuPDF
40 Group:          Development/Libraries
41 Requires:       %{name} = %{version}-%{release}
42
43 %description devel
44 Header files for MuPDF library.
45
46 %description devel -l pl.UTF-8
47 Pliki nagłówkowe biblioteki MuPDF.
48
49 %package static
50 Summary:        Static MuPDF library
51 Summary(pl.UTF-8):      Statyczna biblioteka MuPDF
52 Group:          Development/Libraries
53 Requires:       %{name}-devel = %{version}-%{release}
54
55 %description static
56 Static MuPDF library.
57
58 %description static -l pl.UTF-8
59 Statyczna biblioteka MuPDF.
60
61 %prep
62 %setup -q -n %{name}-%{version}-source
63 %patch0 -p1
64 %patch1 -p1
65 %patch2 -p1
66
67 %{__rm} -r thirdparty/{curl,freetype,jbig2dec,jpeg,openjpeg,zlib}
68
69 %build
70 CFLAGS="%{rpmcflags} %{rpmcppflags}" \
71 %{__make} \
72         CC="%{__cc}" \
73         V8_PRESENT=yes \
74         build=release
75
76 %install
77 rm -rf $RPM_BUILD_ROOT
78
79 %{__make} install \
80         DESTDIR=$RPM_BUILD_ROOT \
81         V8_PRESENT=yes \
82         build=release \
83         prefix=%{_prefix} \
84         libdir=%{_libdir}
85
86 # packaged as %doc
87 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/mupdf
88
89 %clean
90 rm -rf $RPM_BUILD_ROOT
91
92 #%post  -p /sbin/ldconfig
93 #%postun        -p /sbin/ldconfig
94
95 %files
96 %defattr(644,root,root,755)
97 %doc CHANGES CONTRIBUTORS README
98 %attr(755,root,root) %{_bindir}/mudraw
99 %attr(755,root,root) %{_bindir}/mujstest-v8
100 %attr(755,root,root) %{_bindir}/mupdf-x11
101 %attr(755,root,root) %{_bindir}/mupdf-x11-curl
102 %attr(755,root,root) %{_bindir}/mupdf-x11-v8
103 %attr(755,root,root) %{_bindir}/mutool
104 %{_mandir}/man1/mudraw.1*
105 %{_mandir}/man1/mupdf.1*
106 %{_mandir}/man1/mutool.1*
107
108 %files devel
109 %defattr(644,root,root,755)
110 %doc docs/{naming,overview,progressive,refcount,thirdparty}.txt
111 %{_libdir}/libmupdf.a
112 %{_libdir}/libmupdf-js-none.a
113 %{_libdir}/libmupdf-js-v8.a
114 %{_includedir}/mupdf
115
116 %if 0
117 %files static
118 %defattr(644,root,root,755)
119 %{_libdir}/libmupdf.a
120 %{_libdir}/libmupdf-js-none.a
121 %{_libdir}/libmupdf-js-v8.a
122 %endif
This page took 0.05829 seconds and 3 git commands to generate.