]> git.pld-linux.org Git - packages/djvulibre.git/blob - djvulibre.spec
- release 2
[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:        2
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 URL:            http://djvu.sourceforge.net/
20 BuildRequires:  autoconf >= 2.50
21 BuildRequires:  automake
22 BuildRequires:  libjpeg-devel
23 BuildRequires:  libstdc++-devel
24 BuildRequires:  rpmbuild(macros) >= 1.236
25 %{?with_qt:BuildRequires:       qt-devel >= 3.0.5}
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, netscape
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±
79 3.5 oprogramowania LizardTech DjVu.
80
81 Ten pakiet zawiera: bibliotekê w C++, zestaw kompresorów, dekoderów
82 i 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_cpu})
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} -- netscape-common
187 %nsplugin_install -d %{_libdir}/netscape/plugins nsdejavu.so
188
189 %triggerun -n browser-plugin-%{name} -- netscape-common
190 %nsplugin_uninstall -d %{_libdir}/netscape/plugins nsdejavu.so
191
192 # as rpm removes the old obsoleted package files after the triggers
193 # are ran, add another trigger to make the links there.
194 %triggerpostun -n browser-plugin-%{name} -- mozilla-plugin-%{name}
195 %nsplugin_install -f -d %{_libdir}/mozilla/plugins nsdejavu.so
196
197 %triggerpostun -n browser-plugin-%{name} -- netscape-plugin-%{name}
198 %nsplugin_install -f -d %{_libdir}/netscape/plugins nsdejavu.so
199
200 %files
201 %defattr(644,root,root,755)
202 %doc COPYRIGHT NEWS README TODO doc/*
203 %attr(755,root,root) %{_bindir}/[!d]*
204 %attr(755,root,root) %{_bindir}/d[!j]*
205 %attr(755,root,root) %{_bindir}/djv[!i]*
206 %attr(755,root,root) %{_libdir}/libdjvulibre.so.*.*.*
207 %{_mandir}/man1/[!dn]*
208 %{_mandir}/man1/d[!j]*
209 %{_mandir}/man1/djv[!i]*
210 %lang(ja) %{_mandir}/ja/man1/[!dn]*
211 %lang(ja) %{_mandir}/ja/man1/d[!j]*
212 %lang(ja) %{_mandir}/ja/man1/djv[!i]*
213 %dir %{_datadir}/djvu
214 %{_datadir}/djvu/languages.xml
215 %dir %{_datadir}/djvu/osi
216 %lang(de) %{_datadir}/djvu/osi/de
217 %{_datadir}/djvu/osi/en
218 %lang(fr) %{_datadir}/djvu/osi/fr
219 %lang(ja) %{_datadir}/djvu/osi/ja
220 %lang(zh) %{_datadir}/djvu/osi/zh
221 %{_datadir}/djvu/pubtext
222
223 %files devel
224 %defattr(644,root,root,755)
225 %attr(755,root,root) %{_libdir}/libdjvulibre.so
226 %{_libdir}/libdjvulibre.la
227 %{_includedir}/libdjvu
228
229 %if %{with qt}
230 %files djview
231 %defattr(644,root,root,755)
232 %attr(755,root,root) %{_bindir}/djview
233 %{_mandir}/man1/djview.1*
234 %lang(ja) %{_mandir}/ja/man1/djview.1*
235 %{_datadir}/mimelnk/image/x-djvu.desktop
236 %{_desktopdir}/djview.desktop
237 %{_iconsdir}/hicolor/*/mimetypes/djvu.png
238 %{_pixmapsdir}/djvu.png
239
240 %files -n browser-plugin-%{name}
241 %defattr(644,root,root,755)
242 %attr(755,root,root) %{_plugindir}/*.so
243 %{_mandir}/man1/nsdejavu.1*
244 %lang(ja) %{_mandir}/ja/man1/nsdejavu.1*
245 %endif
This page took 0.074106 seconds and 3 git commands to generate.