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