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