3 %bcond_with license_agreement # generates package
5 %define base_name acroread
6 Summary: Adobe Acrobat Reader
7 Summary(pl.UTF-8): Adobe Acrobat Reader - czytnik plików PDF
8 Summary(ru.UTF-8): Программа для чтения документов в формате PDF от Adobe
9 Summary(uk.UTF-8): Програма для читання документів у форматі PDF від Adobe
10 %if %{with license_agreement}
13 Name: %{base_name}-installer
17 Release: %{_rel}%{?with_license_agreement:wla}
19 License: distribution restricted (http://www.adobe.com/products/acrobat/distribute.html)
21 # - not distributable on public sites (only linking to adobe.com permitted)
22 # - distribution on CD requires signing Distribution Agreement (see URL above)
23 Group: X11/Applications/Graphics
24 %if %{with license_agreement}
25 Source0: http://ardownload.adobe.com/pub/adobe/reader/unix/8.x/%{version}/enu/AdobeReader_enu-%{version}-1.i486.tar.gz
26 # NoSource0-md5: e7630311c597feff26024c3383eab110
29 Source0: license-installer.sh
31 # please update @COPYSOURCES@ below if you add more Sources or Patches.
32 Source1: %{base_name}.desktop
33 Source2: %{base_name}.png
34 URL: http://www.adobe.com/products/acrobat/
35 %if %{with license_agreement}
36 BuildRequires: rpmbuild(macros) >= 1.236
37 Requires: openldap-libs >= 2.3
39 Requires: rpm-build-tools
41 ExclusiveArch: %{ix86}
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 %define _plugindir %{_libdir}/browser-plugins
47 # TODO: galeon and skipstone, konqueror, opera.
48 # use macro, otherwise extra LF inserted along with the ifarch
49 %define browsers mozilla, mozilla-firefox, seamonkey
51 %define platform intellinux
52 %define tar0 ILINXR.TAR
53 %define tar1 COMMON.TAR
55 %define _noautostrip .*\.api
56 %define _noautoreq '^lib.*\.so$' '^lib.*\(VERSION\)$'
59 Adobe(R) Reader(R) is free software that lets you view and print PDF
60 files (Portable Document Format) on a variety of hardware and
61 operating system platforms.
63 %description -l pl.UTF-8
64 Adobe(R) Reader(R) jest darmowym oprogramowaniem umożliwiającym
65 oglądanie oraz drukowanie plików PDF (Portable Document Format) na
66 różnych platformach sprzętowych oraz różnych systemach operacyjnych.
68 %description -l ru.UTF-8
69 Программа для чтения документов в формате Portable Document Format
70 (PDF), сгенерированных Adobe Acrobat'ом.
72 %description -l uk.UTF-8
73 Програма для читання документів у форматі Portable Document Format
74 (PDF), згенерованих Adobe Acrobat'ом.
76 %package -n browser-plugin-%{name}
77 Summary: PDF plugin for Mozilla compatible browsers
78 Summary(pl.UTF-8): Wtyczka PDF dla przeglądarek zgodnych Mozilla
79 Group: X11/Applications
80 Requires: %{base_name} = %{epoch}:%{version}-%{release}
81 Requires: browser-plugins(%{_target_base_arch})
82 Obsoletes: acroread-plugin
83 Obsoletes: mozilla-plugin-acroread
85 %description -n browser-plugin-%{name}
86 A Mozilla plugin for displaying PDF (Portable Document Format) files.
88 %description -n browser-plugin-%{name} -l pl.UTF-8
89 Wtyczka Mozilli do wyświetlania plików PDF (Portable Document Format).
92 %if %{with license_agreement}
100 rm -rf $RPM_BUILD_ROOT
101 %if %{without license_agreement}
102 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
105 s/@BASE_NAME@/%{base_name}/g
106 s/@TARGET_CPU@/%{_target_cpu}/g
107 s-@VERSION@-%{version}-g
108 s-@RELEASE@-%{release}-g
109 s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g
110 s,@DATADIR@,%{_datadir}/%{base_name},g
111 s/@COPYSOURCES@/%{base_name}{.desktop,.png}/g
112 ' %{SOURCE0} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
114 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
115 install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{base_name}
116 install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/%{base_name}
119 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{base_name},%{_plugindir}} \
120 $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
122 # note: there're also AdobeReader/Adobe/Help{,Viewer}
123 cd AdobeReader/Adobe/Reader8
124 cp -a Reader Resource $RPM_BUILD_ROOT%{_libdir}/%{base_name}
125 awk -v INSTDIR=%{_libdir}/%{base_name}/Reader \
126 '/^install_dir=/ {print "install_dir="INSTDIR; next} \
128 bin/%{base_name} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}
129 install Browser/%{platform}/* $RPM_BUILD_ROOT%{_plugindir}
130 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
131 install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
133 rm -rf $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/Patch
135 ln -sf /usr/lib/liblber-2.3.so.0 $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/%{platform}/lib/liblber.so
136 ln -sf /usr/lib/libldap-2.3.so.0 $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/%{platform}/lib/libldap.so
137 ln -sf /usr/share/ssl/ca-bundle.crt $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/Cert/curl-ca-bundle.crt
139 chmod a-x $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/%{platform}/lib/*.so.*
143 rm -rf $RPM_BUILD_ROOT
145 %if %{without license_agreement}
147 %{_bindir}/%{base_name}.install
151 %triggerin -n browser-plugin-%{name} -- mozilla-firefox
152 %nsplugin_install -d %{_libdir}/mozilla-firefox/plugins nppdf.so
154 %triggerun -n browser-plugin-%{name} -- mozilla-firefox
155 %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins nppdf.so
157 %triggerin -n browser-plugin-%{name} -- mozilla
158 %nsplugin_install -d %{_libdir}/mozilla/plugins nppdf.so
160 %triggerun -n browser-plugin-%{name} -- mozilla
161 %nsplugin_uninstall -d %{_libdir}/mozilla/plugins nppdf.so
163 %triggerin -n browser-plugin-%{name} -- seamonkey
164 %nsplugin_install -d %{_libdir}/seamonkey/plugins nppdf.so
166 %triggerun -n browser-plugin-%{name} -- seamonkey
167 %nsplugin_uninstall -d %{_libdir}/seamonkey/plugins nppdf.so
169 # % triggerin -n browser-plugin-%{name} -- konqueror
170 # % nsplugin_install -d %{_libdir}/kde3/plugins/konqueror nppdf.so
172 # % triggerun -n browser-plugin-%{name} -- konqueror
173 # % nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror nppdf.so
175 # % triggerin -n browser-plugin-%{name} -- opera
176 # % nsplugin_install -d %{_libdir}/opera/plugins nppdf.so
178 # % triggerun -n browser-plugin-%{name} -- opera
179 # % nsplugin_uninstall -d %{_libdir}/opera/plugins nppdf.so
181 # as rpm removes the old obsoleted package files after the triggers
182 # above are ran, add another trigger to make the links there.
183 %triggerpostun -n browser-plugin-%{name} -- mozilla-plugin-acroread, acroread-plugin
184 %nsplugin_install -f -d %{_libdir}/mozilla/plugins nppdf.so
189 %defattr(644,root,root,755)
190 %if %{without license_agreement}
191 %attr(755,root,root) %{_bindir}/%{base_name}.install
192 %{_datadir}/%{base_name}
194 %doc AdobeReader/ReadMe.htm
195 %attr(755,root,root) %{_bindir}/*
196 %dir %{_libdir}/%{base_name}
197 %{_libdir}/%{base_name}/Resource
198 %dir %{_libdir}/%{base_name}/Reader
199 %{_libdir}/%{base_name}/Reader/help
200 %{_libdir}/%{base_name}/Reader/AcroVersion
201 %{_libdir}/%{base_name}/Reader/BeyondReader
202 %{_libdir}/%{base_name}/Reader/Cert
203 %{_libdir}/%{base_name}/Reader/GlobalPrefs
204 %{_libdir}/%{base_name}/Reader/HowTo
205 %{_libdir}/%{base_name}/Reader/IDTemplates
206 %{_libdir}/%{base_name}/Reader/JavaScripts
207 %{_libdir}/%{base_name}/Reader/Legal
208 %{_libdir}/%{base_name}/Reader/Tracker
209 %{_libdir}/%{base_name}/Reader/PDFSigQFormalRep.pdf
210 %{_libdir}/%{base_name}/Reader/pmd.cer
211 %{_libdir}/%{base_name}/Reader/%{platform}/mozilla
212 %dir %{_libdir}/%{base_name}/Reader/%{platform}
213 %dir %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins
214 %dir %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/Multimedia
215 %dir %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins3d
216 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/SPPlugins
217 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/bin
218 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/lib
219 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/*.api
220 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins3d/*.x3d
221 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/Multimedia/MPP
222 %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/AcroForm
223 %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/Annotations
224 %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins3d/prc
225 %{_desktopdir}/acroread.desktop
228 %files -n browser-plugin-%{name}
229 %defattr(644,root,root,755)
230 %attr(755,root,root) %{_plugindir}/*