]> git.pld-linux.org Git - packages/acroread.git/blob - acroread.spec
- 7.0.9
[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):    Adobe Acrobat Reader - czytnik plików PDF
8 Summary(ru):    ðÒÏÇÒÁÍÍÁ ÄÌÑ ÞÔÅÎÉÑ ÄÏËÕÍÅÎÔÏ× × ÆÏÒÍÁÔÅ PDF ÏÔ Adobe
9 Summary(uk):    ðÒÏÇÒÁÍÁ ÄÌÑ ÞÉÔÁÎÎÑ ÄÏËÕÍÅÎԦנՠÆÏÒÍÁÔ¦ 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:        7.0.9
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/7x/%{version}/enu/AdobeReader_enu-%{version}-1.i386.tar.gz
26 # Source0-md5:  a8e79a1af58f90640cf9e7e1532a5745
27 %else
28 Source0:        license-installer.sh
29 # Source0-md5:  a8e79a1af58f90640cf9e7e1532a5745
30 %endif
31 # please update @COPYSOURCES@ below if you add more Sources.
32 Source1:        %{base_name}.desktop
33 Source2:        %{base_name}.png
34 Patch0:         %{base_name}-expr.patch
35 Patch1:         %{base_name}-scim.patch
36 Patch2:         %{base_name}-gtk.patch
37 URL:            http://www.adobe.com/products/acrobat/
38 %if %{with license_agreement}
39 BuildRequires:  rpmbuild(macros) >= 1.236
40 Requires:       openldap-libs >= 2.3
41 %else
42 Requires:       rpm-build-tools
43 %endif
44 ExclusiveArch:  %{ix86}
45 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47 %define         _plugindir      %{_libdir}/browser-plugins
48
49 # TODO: galeon and skipstone, konqueror, opera.
50 # use macro, otherwise extra LF inserted along with the ifarch
51 %define browsers mozilla, mozilla-firefox, seamonkey
52
53 %define         platform        intellinux
54 %define         tar0            ILINXR.TAR
55 %define         tar1            COMMON.TAR
56
57 %define         _noautostrip    .*\.api
58 %define         _noautoreq      '^lib.*\.so$' '^lib.*\(VERSION\)$'
59
60 %description
61 Adobe(R) Reader(R) is free software that lets you view and print PDF
62 files (Portable Document Format) on a variety of hardware and
63 operating system platforms.
64
65 %description -l pl
66 Adobe(R) Reader(R) jest darmowym oprogramowaniem umo¿liwiaj±cym
67 ogl±danie oraz drukowanie plików PDF (Portable Document Format) na
68 ró¿nych platformach sprzêtowych oraz ró¿nych systemach operacyjnych.
69
70 %description -l ru
71 ðÒÏÇÒÁÍÍÁ ÄÌÑ ÞÔÅÎÉÑ ÄÏËÕÍÅÎÔÏ× × ÆÏÒÍÁÔÅ Portable Document Format
72 (PDF), ÓÇÅÎÅÒÉÒÏ×ÁÎÎÙÈ Adobe Acrobat'ÏÍ.
73
74 %description -l uk
75 ðÒÏÇÒÁÍÁ ÄÌÑ ÞÉÔÁÎÎÑ ÄÏËÕÍÅÎԦנՠÆÏÒÍÁÔ¦ Portable Document Format
76 (PDF), ÚÇÅÎÅÒÏ×ÁÎÉÈ Adobe Acrobat'ÏÍ.
77
78 %package -n browser-plugin-%{name}
79 Summary:        PDF plugin for Mozilla compatible browsers
80 Summary(pl):    Wtyczka PDF dla przegl±darek zgodnych Mozilla
81 Group:          X11/Applications
82 Requires:       %{base_name} = %{epoch}:%{version}-%{release}
83 Requires:       browser-plugins(%{_target_base_arch})
84 Obsoletes:      acroread-plugin
85 Obsoletes:      mozilla-plugin-acroread
86
87 %description -n browser-plugin-%{name}
88 A Mozilla plugin for displaying PDF (Portable Document Format) files.
89
90 %description -n browser-plugin-%{name} -l pl
91 Wtyczka Mozilli do wy¶wietlania plików PDF (Portable Document Format).
92
93 %prep
94 %if %{with license_agreement}
95 %setup -q -c
96 cd AdobeReader
97 tar xf %{tar0}
98 tar xf %{tar1}
99 %patch0 -p1
100 %patch1 -p1
101 %patch2 -p1
102 %endif
103
104 %install
105 rm -rf $RPM_BUILD_ROOT
106 %if %{without license_agreement}
107 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
108
109 sed -e '
110         s/@BASE_NAME@/%{base_name}/g
111         s/@TARGET_CPU@/%{_target_cpu}/g
112         s-@VERSION@-%{version}-g
113         s-@RELEASE@-%{release}-g
114         s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g
115         s,@DATADIR@,%{_datadir}/%{base_name},g
116         s/@COPYSOURCES@/%{base_name}{.desktop,.png}/g
117 ' %{SOURCE0} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
118
119 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
120 install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{base_name}
121 install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/%{base_name}
122
123 %else
124 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{base_name},%{_plugindir}} \
125         $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
126
127 cd AdobeReader
128 cp -a Reader Resource $RPM_BUILD_ROOT%{_libdir}/%{base_name}
129 awk -v INSTDIR=%{_libdir}/%{base_name}/Reader \
130         '/^install_dir=/ {print "install_dir="INSTDIR; next} \
131         {print}' \
132         bin/%{base_name} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}
133 install Browser/%{platform}/* $RPM_BUILD_ROOT%{_plugindir}
134 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
135 install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
136
137 rm -rf $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/Patch
138
139 ln -sf /usr/lib/liblber-2.3.so.0 $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/%{platform}/lib/liblber.so
140 ln -sf /usr/lib/libldap-2.3.so.0 $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/%{platform}/lib/libldap.so
141 ln -sf /usr/share/ssl/ca-bundle.crt $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/Cert/curl-ca-bundle.crt
142
143 chmod a-x $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/%{platform}/lib/*.so.*
144 %endif
145
146 %clean
147 rm -rf $RPM_BUILD_ROOT
148
149 %if %{without license_agreement}
150 %post
151 %{_bindir}/%{base_name}.install
152
153 %else
154
155 %triggerin -n browser-plugin-%{name} -- mozilla-firefox
156 %nsplugin_install -d %{_libdir}/mozilla-firefox/plugins nppdf.so
157
158 %triggerun -n browser-plugin-%{name} -- mozilla-firefox
159 %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins nppdf.so
160
161 %triggerin -n browser-plugin-%{name} -- mozilla
162 %nsplugin_install -d %{_libdir}/mozilla/plugins nppdf.so
163
164 %triggerun -n browser-plugin-%{name} -- mozilla
165 %nsplugin_uninstall -d %{_libdir}/mozilla/plugins nppdf.so
166
167 %triggerin -n browser-plugin-%{name} -- seamonkey
168 %nsplugin_install -d %{_libdir}/seamonkey/plugins nppdf.so
169
170 %triggerun -n browser-plugin-%{name} -- seamonkey
171 %nsplugin_uninstall -d %{_libdir}/seamonkey/plugins nppdf.so
172
173 # % triggerin -n browser-plugin-%{name} -- konqueror
174 # % nsplugin_install -d %{_libdir}/kde3/plugins/konqueror nppdf.so
175
176 # % triggerun -n browser-plugin-%{name} -- konqueror
177 # % nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror nppdf.so
178
179 # % triggerin -n browser-plugin-%{name} -- opera
180 # % nsplugin_install -d %{_libdir}/opera/plugins nppdf.so
181
182 # % triggerun -n browser-plugin-%{name} -- opera
183 # % nsplugin_uninstall -d %{_libdir}/opera/plugins nppdf.so
184
185 # as rpm removes the old obsoleted package files after the triggers
186 # above are ran, add another trigger to make the links there.
187 %triggerpostun -n browser-plugin-%{name} -- mozilla-plugin-acroread, acroread-plugin
188 %nsplugin_install -f -d %{_libdir}/mozilla/plugins nppdf.so
189
190 %endif
191
192 %files
193 %defattr(644,root,root,755)
194 %if %{without license_agreement}
195 %attr(755,root,root) %{_bindir}/%{base_name}.install
196 %{_datadir}/%{base_name}
197 %else
198 %doc AdobeReader/{LICREAD.TXT,ReadMe.htm}
199 %attr(755,root,root) %{_bindir}/*
200 %dir %{_libdir}/%{base_name}
201 %{_libdir}/%{base_name}/Resource
202 %dir %{_libdir}/%{base_name}/Reader
203 %{_libdir}/%{base_name}/Reader/help
204 %{_libdir}/%{base_name}/Reader/AcroVersion
205 %{_libdir}/%{base_name}/Reader/Cert
206 %{_libdir}/%{base_name}/Reader/GlobalPrefs
207 %{_libdir}/%{base_name}/Reader/HowTo
208 %{_libdir}/%{base_name}/Reader/Legal
209 %{_libdir}/%{base_name}/Reader/JavaScripts
210 %{_libdir}/%{base_name}/Reader/Messages
211 %{_libdir}/%{base_name}/Reader/WebSearch
212 %dir %{_libdir}/%{base_name}/Reader/%{platform}
213 %dir %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins
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 %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/AcroForm
221 %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/Annotations
222 %{_libdir}/%{base_name}/Reader/%{platform}/res
223 %{_desktopdir}/acroread.desktop
224 %{_pixmapsdir}/*
225
226 %files -n browser-plugin-%{name}
227 %defattr(644,root,root,755)
228 %attr(755,root,root) %{_plugindir}/*
229 %endif
This page took 0.051596 seconds and 3 git commands to generate.