]> git.pld-linux.org Git - packages/acroread.git/blob - acroread.spec
- the binary is for i486 at least...
[packages/acroread.git] / acroread.spec
1 #
2 # Conditional build:
3 %bcond_with     license_agreement       # generates package
4 #
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}
11 Name:           %{base_name}
12 %else
13 Name:           %{base_name}-installer
14 %endif
15 %define _rel    1
16 Version:        8.1.1
17 Release:        %{_rel}%{?with_license_agreement:wla}
18 Epoch:          1
19 License:        distribution restricted (http://www.adobe.com/products/acrobat/distribute.html)
20 # in short:
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
27 %else
28 Source0:        license-installer.sh
29 %endif
30 # please update @COPYSOURCES@ below if you add more Sources or Patches.
31 Source1:        %{base_name}.desktop
32 Source2:        %{base_name}.png
33 URL:            http://www.adobe.com/products/acrobat/
34 %if %{with license_agreement}
35 BuildRequires:  rpmbuild(macros) >= 1.236
36 Requires:       openldap-libs >= 2.3
37 %else
38 Requires:       rpm-build-tools
39 %endif
40 ExclusiveArch:  %{ix86}
41 ExcludeArch:    i386
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %define         _plugindir      %{_libdir}/browser-plugins
45
46 # TODO: galeon and skipstone, konqueror, opera.
47 # use macro, otherwise extra LF inserted along with the ifarch
48 %define browsers mozilla, mozilla-firefox, seamonkey
49
50 %define         platform        intellinux
51 %define         tar0            ILINXR.TAR
52 %define         tar1            COMMON.TAR
53
54 %define         _noautostrip    .*\.api
55 %define         _noautoreq      '^lib.*\.so$' '^lib.*\(VERSION\)$'
56
57 %description
58 Adobe(R) Reader(R) is free software that lets you view and print PDF
59 files (Portable Document Format) on a variety of hardware and
60 operating system platforms.
61
62 %description -l pl.UTF-8
63 Adobe(R) Reader(R) jest darmowym oprogramowaniem umożliwiającym
64 oglądanie oraz drukowanie plików PDF (Portable Document Format) na
65 różnych platformach sprzętowych oraz różnych systemach operacyjnych.
66
67 %description -l ru.UTF-8
68 Программа для чтения документов в формате Portable Document Format
69 (PDF), сгенерированных Adobe Acrobat'ом.
70
71 %description -l uk.UTF-8
72 Програма для читання документів у форматі Portable Document Format
73 (PDF), згенерованих Adobe Acrobat'ом.
74
75 %package -n browser-plugin-%{name}
76 Summary:        PDF plugin for Mozilla compatible browsers
77 Summary(pl.UTF-8):      Wtyczka PDF dla przeglądarek zgodnych Mozilla
78 Group:          X11/Applications
79 Requires:       %{base_name} = %{epoch}:%{version}-%{release}
80 Requires:       browser-plugins(%{_target_base_arch})
81 Obsoletes:      acroread-plugin
82 Obsoletes:      mozilla-plugin-acroread
83
84 %description -n browser-plugin-%{name}
85 A Mozilla plugin for displaying PDF (Portable Document Format) files.
86
87 %description -n browser-plugin-%{name} -l pl.UTF-8
88 Wtyczka Mozilli do wyświetlania plików PDF (Portable Document Format).
89
90 %prep
91 %if %{with license_agreement}
92 %setup -q -c
93 cd AdobeReader
94 tar xf %{tar0}
95 tar xf %{tar1}
96 %endif
97
98 %install
99 rm -rf $RPM_BUILD_ROOT
100 %if %{without license_agreement}
101 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
102
103 sed -e '
104         s/@BASE_NAME@/%{base_name}/g
105         s/@TARGET_CPU@/%{_target_cpu}/g
106         s-@VERSION@-%{version}-g
107         s-@RELEASE@-%{release}-g
108         s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g
109         s,@DATADIR@,%{_datadir}/%{base_name},g
110         s/@COPYSOURCES@/%{base_name}{.desktop,.png}/g
111 ' %{SOURCE0} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
112
113 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
114 install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{base_name}
115 install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/%{base_name}
116
117 %else
118 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{base_name},%{_plugindir}} \
119         $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
120
121 # note: there're also AdobeReader/Adobe/Help{,Viewer}
122 cd AdobeReader/Adobe/Reader8
123 cp -a Reader Resource $RPM_BUILD_ROOT%{_libdir}/%{base_name}
124 awk -v INSTDIR=%{_libdir}/%{base_name}/Reader \
125         '/^install_dir=/ {print "install_dir="INSTDIR; next} \
126         {print}' \
127         bin/%{base_name} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}
128 install Browser/%{platform}/* $RPM_BUILD_ROOT%{_plugindir}
129 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
130 install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
131
132 rm -rf $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/Patch
133
134 ln -sf /usr/lib/liblber-2.3.so.0 $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/%{platform}/lib/liblber.so
135 ln -sf /usr/lib/libldap-2.3.so.0 $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/%{platform}/lib/libldap.so
136 ln -sf /usr/share/ssl/ca-bundle.crt $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/Cert/curl-ca-bundle.crt
137
138 chmod a-x $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/%{platform}/lib/*.so.*
139 %endif
140
141 %clean
142 rm -rf $RPM_BUILD_ROOT
143
144 %if %{without license_agreement}
145 %post
146 %{_bindir}/%{base_name}.install
147
148 %else
149
150 %triggerin -n browser-plugin-%{name} -- mozilla-firefox
151 %nsplugin_install -d %{_libdir}/mozilla-firefox/plugins nppdf.so
152
153 %triggerun -n browser-plugin-%{name} -- mozilla-firefox
154 %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins nppdf.so
155
156 %triggerin -n browser-plugin-%{name} -- mozilla
157 %nsplugin_install -d %{_libdir}/mozilla/plugins nppdf.so
158
159 %triggerun -n browser-plugin-%{name} -- mozilla
160 %nsplugin_uninstall -d %{_libdir}/mozilla/plugins nppdf.so
161
162 %triggerin -n browser-plugin-%{name} -- seamonkey
163 %nsplugin_install -d %{_libdir}/seamonkey/plugins nppdf.so
164
165 %triggerun -n browser-plugin-%{name} -- seamonkey
166 %nsplugin_uninstall -d %{_libdir}/seamonkey/plugins nppdf.so
167
168 # % triggerin -n browser-plugin-%{name} -- konqueror
169 # % nsplugin_install -d %{_libdir}/kde3/plugins/konqueror nppdf.so
170
171 # % triggerun -n browser-plugin-%{name} -- konqueror
172 # % nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror nppdf.so
173
174 # % triggerin -n browser-plugin-%{name} -- opera
175 # % nsplugin_install -d %{_libdir}/opera/plugins nppdf.so
176
177 # % triggerun -n browser-plugin-%{name} -- opera
178 # % nsplugin_uninstall -d %{_libdir}/opera/plugins nppdf.so
179
180 # as rpm removes the old obsoleted package files after the triggers
181 # above are ran, add another trigger to make the links there.
182 %triggerpostun -n browser-plugin-%{name} -- mozilla-plugin-acroread, acroread-plugin
183 %nsplugin_install -f -d %{_libdir}/mozilla/plugins nppdf.so
184
185 %endif
186
187 %files
188 %defattr(644,root,root,755)
189 %if %{without license_agreement}
190 %attr(755,root,root) %{_bindir}/%{base_name}.install
191 %{_datadir}/%{base_name}
192 %else
193 %doc AdobeReader/ReadMe.htm
194 %attr(755,root,root) %{_bindir}/*
195 %dir %{_libdir}/%{base_name}
196 %{_libdir}/%{base_name}/Resource
197 %dir %{_libdir}/%{base_name}/Reader
198 %{_libdir}/%{base_name}/Reader/help
199 %{_libdir}/%{base_name}/Reader/AcroVersion
200 %{_libdir}/%{base_name}/Reader/BeyondReader
201 %{_libdir}/%{base_name}/Reader/Cert
202 %{_libdir}/%{base_name}/Reader/GlobalPrefs
203 %{_libdir}/%{base_name}/Reader/HowTo
204 %{_libdir}/%{base_name}/Reader/IDTemplates
205 %{_libdir}/%{base_name}/Reader/JavaScripts
206 %{_libdir}/%{base_name}/Reader/Legal
207 %{_libdir}/%{base_name}/Reader/Tracker
208 %{_libdir}/%{base_name}/Reader/PDFSigQFormalRep.pdf
209 %{_libdir}/%{base_name}/Reader/pmd.cer
210 %{_libdir}/%{base_name}/Reader/%{platform}/mozilla
211 %dir %{_libdir}/%{base_name}/Reader/%{platform}
212 %dir %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins
213 %dir %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/Multimedia
214 %dir %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins3d
215 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/SPPlugins
216 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/bin
217 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/lib
218 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/*.api
219 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins3d/*.x3d
220 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/Multimedia/MPP
221 %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/AcroForm
222 %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/Annotations
223 %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins3d/prc
224 %{_desktopdir}/acroread.desktop
225 %{_pixmapsdir}/*
226
227 %files -n browser-plugin-%{name}
228 %defattr(644,root,root,755)
229 %attr(755,root,root) %{_plugindir}/*
230 %endif
This page took 0.08479 seconds and 4 git commands to generate.