]> git.pld-linux.org Git - packages/djvulibre.git/blob - djvulibre.spec
- breowsers macro extended
[packages/djvulibre.git] / djvulibre.spec
1 # TODO
2 # - test and add other browsers
3 #
4 # Conditional build:
5 %bcond_without  qt      # disable qt wrapper
6 #
7 Summary:        DjVu viewers, encoders and utilities
8 Summary(pl):    DjVu - przegl±darki, dekodery oraz narzêdzia
9 Name:           djvulibre
10 Version:        3.5.16
11 Release:        3
12 License:        GPL
13 Group:          Applications/Graphics
14 Source0:        http://dl.sourceforge.net/djvu/%{name}-%{version}.tar.gz
15 # Source0-md5:  5591c99a50aed1613a796a5aa4978fc0
16 Patch0:         %{name}-opt.patch
17 Patch1:         %{name}-nostrip.patch
18 Patch2:         %{name}-desktop.patch
19 Patch3:         %{name}-c++.patch
20 URL:            http://djvu.sourceforge.net/
21 BuildRequires:  autoconf >= 2.50
22 BuildRequires:  automake
23 BuildRequires:  libjpeg-devel
24 BuildRequires:  libstdc++-devel
25 %{?with_qt:BuildRequires:       qt-devel >= 3.0.5}
26 BuildRequires:  rpmbuild(macros) >= 1.236
27 Obsoletes:      djvu
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %define         _plugindir      %{_libdir}/browser-plugins
31
32 # list of supported browsers, in free form text
33 %define         browsers mozilla, mozilla-firefox, netscape, seamonkey
34
35 %description
36 DjVu is a web-centric format and software platform for distributing
37 documents and images. DjVu content downloads faster, displays and
38 renders faster, looks nicer on a screen, and consume less client
39 resources than competing formats. DjVu was originally developed at
40 AT&T Labs-Research by Leon Bottou, Yann LeCun, Patrick Haffner, and
41 many others. In March 2000, AT&T sold DjVu to LizardTech Inc. who now
42 distributes Windows/Mac plug-ins, and commercial encoders (mostly on
43 Windows).
44
45 In an effort to promote DjVu as a Web standard, the LizardTech
46 management was enlightened enough to release the reference
47 implementation of DjVu under the GNU GPL in October 2000. DjVuLibre
48 (which means free DjVu), is an enhanced version of that code
49 maintained by the original inventors of DjVu. It is compatible with
50 version 3.5 of the LizardTech DjVu software suite.
51
52 This package of DjVulibre 3.5 contains:
53 - A full-fledged wavelet-based compressor for pictures.
54 - A simple compressor for bitonal (black and white) scanned pages.
55 - A compressor for palettized images (a la GIF/PNG).
56 - A set of utilities to manipulate and assemble DjVu images and
57   documents.
58 - A set of decoders to convert DjVu to a number of other formats.
59 - An up-to-date version of the C++ DjVu Reference Library.
60
61 Following elements are placed in other subpackages:
62 - a standalone DjVu viewer based on the Qt library.
63 - A browser plugin that works with most Unix browsers.
64
65 %description -l pl
66 DjVu jest przeznaczonym g³ównie dla WWW formatem i platform±
67 programow± do dystrybucji dokumentów i obrazków. Dane w DjVu ¶ci±gaj±
68 siê szybciej, wy¶wietlaj± szybciej, wygl±daj± ³adniej na ekranie i
69 zajmuj± mniej zasobów po stronie klienckiej ni¿ inne formaty. DjVu
70 oryginalnie zosta³ stworzony w AT&T Labs-Research przez Leona Bottou,
71 Yanna LeCun, Patricka Haffnera i wielu innych. W marcu 2000 AT&T
72 sprzeda³o DjVu firmie LizardTech Inc., które teraz rozpowszechnia
73 wtyczki dla Windows i Maca oraz komercyjne kodery (g³ównie dla
74 Windows).
75
76 Aby wypromowaæ DjVu jako sieciowy standard, LizardTech udostêpni³
77 wzorcow± implementacjê DjVu na licencji GPL w pa¼dzierniku 2000.
78 DjVuLibre (czyli wolne DjVu) jest rozszerzon± wersj± tego kodu
79 rozwijan± przez pomys³odawców DjVu. Jest kompatybilna z wersj± 3.5
80 oprogramowania LizardTech DjVu.
81
82 Ten pakiet zawiera: bibliotekê w C++, zestaw kompresorów, dekoderów i
83 narzêdzi do plików w formacie DjVu. Przegl±darka oraz wtyczki do
84 przegl±darek znajduj± siê w innych podpakietach.
85
86 %package devel
87 Summary:        Header file for DjVu library
88 Summary(pl):    Plik nag³ówkowy biblioteki DjVu
89 Group:          Development/Libraries
90 Requires:       %{name} = %{version}-%{release}
91 Requires:       libjpeg-devel
92 Requires:       libstdc++-devel
93
94 %description devel
95 Header file for DjVu library.
96
97 %description devel -l pl
98 Plik nag³ówkowy biblioteki DjVu.
99
100 %package djview
101 Summary:        Qt-based DjVu viewer
102 Summary(pl):    Oparta o Qt przegl±darka DjVu
103 Group:          X11/Applications
104 Requires:       %{name} = %{version}-%{release}
105 Obsoletes:      djview
106
107 %description djview
108 Qt-based DjVu viewer.
109
110 %description djview -l pl
111 Oparta o Qt przegl±darka DjVu.
112
113 %package -n browser-plugin-%{name}
114 Summary:        DjVu browser plugin
115 Summary(pl):    Wtyczka DjVu do przegl±derek WWW
116 Group:          X11/Libraries
117 Requires:       %{name}-djview = %{version}-%{release}
118 Requires:       browser-plugins(%{_target_base_arch})
119 Obsoletes:      mozilla-plugin-djvulibre
120 Obsoletes:      netscape-plugin-djvulibre
121 Obsoletes:      djview-netscape
122 # for migrate purposes (greedy poldek upgrade)
123 Provides:       mozilla-plugin-djvulibre
124 Provides:       netscape-plugin-djvulibre
125
126 %description -n browser-plugin-%{name}
127 DjVu plugin for Mozilla and Mozilla-based browsers.
128
129 Supported browsers: %{browsers}.
130
131 %description -n browser-plugin-%{name} -l pl
132 Wtyczka DjVu do przegl±darek zgodnych z Mozill±.
133
134 Obs³ugiwane przegl±darki: %{browsers}.
135
136 %prep
137 %setup -q
138 %patch0 -p1
139 %patch1 -p1
140 %patch2 -p1
141 %patch3 -p1
142
143 %build
144 cp -f /usr/share/automake/config.sub config
145 %{__aclocal} -I config -I gui/desktop
146 %{__autoconf}
147 QT_LIBS="-L%{_libdir} -lqt-mt"; export QT_LIBS
148 QT_CFLAGS="-I%{_includedir}/qt"; export QT_CFLAGS
149 %configure \
150         PTHREAD_LIBS="-lpthread"
151
152 %{__make}
153
154 %install
155 rm -rf $RPM_BUILD_ROOT
156 install -d $RPM_BUILD_ROOT%{_plugindir}
157
158 # pass dtop_* to allow build w/o gnome/kde/etc. installed
159 %{__make} install \
160         DESTDIR=$RPM_BUILD_ROOT \
161         plugindir=%{_plugindir} \
162         dtop_applications=%{_desktopdir} \
163         dtop_icons=%{_iconsdir} \
164         dtop_mimelnk=%{_datadir}/mimelnk \
165         dtop_applnk= \
166         dtop_pixmaps=%{_pixmapsdir} \
167         dtop_mime_info= \
168         dtop_application_registry=
169
170 %clean
171 rm -rf $RPM_BUILD_ROOT
172
173 %post   -p /sbin/ldconfig
174 %postun -p /sbin/ldconfig
175
176 %triggerin -n browser-plugin-%{name} -- mozilla
177 %nsplugin_install -d %{_libdir}/mozilla/plugins nsdejavu.so
178
179 %triggerun -n browser-plugin-%{name} -- mozilla
180 %nsplugin_uninstall -d %{_libdir}/mozilla/plugins nsdejavu.so
181
182 %triggerin -n browser-plugin-%{name} -- mozilla-firefox
183 %nsplugin_install -d %{_libdir}/mozilla-firefox/plugins nsdejavu.so
184
185 %triggerun -n browser-plugin-%{name} -- mozilla-forefox
186 %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins nsdejavu.so
187
188 %triggerin -n browser-plugin-%{name} -- netscape-common
189 %nsplugin_install -d %{_libdir}/netscape/plugins nsdejavu.so
190
191 %triggerun -n browser-plugin-%{name} -- netscape-common
192 %nsplugin_uninstall -d %{_libdir}/netscape/plugins nsdejavu.so
193
194 %triggerin -n browser-plugin-%{name} -- seamonkey
195 %nsplugin_install -d %{_libdir}/seamonkey/plugins nsdejavu.so
196
197 %triggerun -n browser-plugin-%{name} -- seamonkey
198 %nsplugin_uninstall -d %{_libdir}/seamonkey/plugins nsdejavu.so
199
200 # as rpm removes the old obsoleted package files after the triggers
201 # are ran, add another trigger to make the links there.
202 %triggerpostun -n browser-plugin-%{name} -- mozilla-plugin-%{name}
203 %nsplugin_install -f -d %{_libdir}/mozilla/plugins nsdejavu.so
204
205 %triggerpostun -n browser-plugin-%{name} -- netscape-plugin-%{name}
206 %nsplugin_install -f -d %{_libdir}/netscape/plugins nsdejavu.so
207
208 %files
209 %defattr(644,root,root,755)
210 %doc COPYRIGHT NEWS README TODO doc/*
211 %attr(755,root,root) %{_bindir}/[!d]*
212 %attr(755,root,root) %{_bindir}/d[!j]*
213 %attr(755,root,root) %{_bindir}/djv[!i]*
214 %attr(755,root,root) %{_libdir}/libdjvulibre.so.*.*.*
215 %{_mandir}/man1/[!dn]*
216 %{_mandir}/man1/d[!j]*
217 %{_mandir}/man1/djv[!i]*
218 %lang(ja) %{_mandir}/ja/man1/[!dn]*
219 %lang(ja) %{_mandir}/ja/man1/d[!j]*
220 %lang(ja) %{_mandir}/ja/man1/djv[!i]*
221 %dir %{_datadir}/djvu
222 %{_datadir}/djvu/languages.xml
223 %dir %{_datadir}/djvu/osi
224 %lang(de) %{_datadir}/djvu/osi/de
225 %{_datadir}/djvu/osi/en
226 %lang(fr) %{_datadir}/djvu/osi/fr
227 %lang(ja) %{_datadir}/djvu/osi/ja
228 %lang(zh) %{_datadir}/djvu/osi/zh
229 %{_datadir}/djvu/pubtext
230
231 %files devel
232 %defattr(644,root,root,755)
233 %attr(755,root,root) %{_libdir}/libdjvulibre.so
234 %{_libdir}/libdjvulibre.la
235 %{_includedir}/libdjvu
236
237 %if %{with qt}
238 %files djview
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{_bindir}/djview
241 %{_mandir}/man1/djview.1*
242 %lang(ja) %{_mandir}/ja/man1/djview.1*
243 %{_datadir}/mimelnk/image/x-djvu.desktop
244 %{_desktopdir}/djview.desktop
245 %{_iconsdir}/hicolor/*/mimetypes/djvu.png
246 %{_pixmapsdir}/djvu.png
247
248 %files -n browser-plugin-%{name}
249 %defattr(644,root,root,755)
250 %attr(755,root,root) %{_plugindir}/*.so
251 %{_mandir}/man1/nsdejavu.1*
252 %lang(ja) %{_mandir}/ja/man1/nsdejavu.1*
253 %endif
This page took 0.049338 seconds and 3 git commands to generate.