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