]> git.pld-linux.org Git - packages/acroread.git/blob - acroread.spec
- updated to 7.0.5; STBR
[packages/acroread.git] / acroread.spec
1 #
2 # Conditional build:
3 %bcond_with     license_agreement       # generates package
4 #
5 Summary:        Acrobat Reader
6 Summary(pl):    Acrobat Reader - czytnik plików PDF
7 Summary(ru):    ðÒÏÇÒÁÍÍÁ ÄÌÑ ÞÔÅÎÉÑ ÄÏËÕÍÅÎÔÏ× × ÆÏÒÍÁÔÅ PDF ÏÔ Adobe
8 Summary(uk):    ðÒÏÇÒÁÍÁ ÄÌÑ ÞÉÔÁÎÎÑ ÄÏËÕÍÅÎԦנՠÆÏÒÍÁÔ¦ PDF ×¦Ä Adobe
9 %define         base_name       acroread
10 %if %{with license_agreement}
11 Name:           %{base_name}
12 %else
13 Name:           %{base_name}-installer
14 %endif
15 Version:        7.0.5
16 %define _rel    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/7x/7.0.5/enu/AdobeReader_enu-7.0.5-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 URL:            http://www.adobe.com/products/acrobat/
33 %if %{with license_agreement}
34 BuildRequires:  rpmbuild(macros) >= 1.236
35 Requires:       openldap-libs >= 2.3
36 %endif
37 ExclusiveArch:  %{ix86}
38 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40 %define         _plugindir      %{_libdir}/browser-plugins
41
42 # TODO: galeon and skipstone, konqueror, opera.
43 # use macro, otherwise extra LF inserted along with the ifarch
44 %define browsers mozilla, mozilla-firefox
45
46 %define         platform        intellinux
47 %define         tar0            ILINXR.TAR
48 %define         tar1            COMMON.TAR
49
50 %define         _noautostrip    .*\.api
51 %define         _noautoreq      '^lib.*\.so$' '^lib.*\(VERSION\)$'
52
53 %description
54 Adobe(R) Reader(R) is free software that lets you view and print
55 PDF files (Portable Document Format) on a variety of hardware and
56 operating system platforms.
57
58 %description -l pl
59 Adobe(R) Reader(R) jest darmowym oprogramowaniem umo¿liwiaj±cym ogl±danie
60 oraz drukowanie plików PDF (Portable Document Format) na ró¿nych platformach
61 sprzêtowych oraz ró¿nych systemach operacyjnych.
62
63 %description -l ru
64 ðÒÏÇÒÁÍÍÁ ÄÌÑ ÞÔÅÎÉÑ ÄÏËÕÍÅÎÔÏ× × ÆÏÒÍÁÔÅ Portable Document Format
65 (PDF), ÓÇÅÎÅÒÉÒÏ×ÁÎÎÙÈ Adobe Acrobat'ÏÍ.
66
67 %description -l uk
68 ðÒÏÇÒÁÍÁ ÄÌÑ ÞÉÔÁÎÎÑ ÄÏËÕÍÅÎԦנՠÆÏÒÍÁÔ¦ Portable Document Format
69 (PDF), ÚÇÅÎÅÒÏ×ÁÎÉÈ Adobe Acrobat'ÏÍ.
70
71 %package plugin
72 Summary:        PDF plugin for Mozilla compatible browsers
73 Summary(pl):    Wtyczka PDF dla przegl±darek zgodnych Mozilla
74 Group:          X11/Applications
75 Prereq:         mozilla-embedded
76 Requires:       %{base_name} = %{epoch}:%{version}
77 Requires:       browser-plugins(%{_target_cpu})
78 Obsoletes:      mozilla-plugin-acroread
79
80 %description plugin
81 A Mozilla plugin for displaying PDF (Portable Document Format) files.
82
83 %description plugin -l pl
84 Wtyczka Mozilli do wy¶wietlania plików PDF (Portable Document Format).
85
86 %prep
87 %if %{with license_agreement}
88 %setup -q -c
89 cd AdobeReader
90 tar xf %{tar0}
91 tar xf %{tar1}
92 %endif
93
94 %install
95 rm -rf $RPM_BUILD_ROOT
96 %if %{without license_agreement}
97 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
98
99 sed -e '
100         s/@BASE_NAME@/%{base_name}/g
101         s/@TARGET_CPU@/%{_target_cpu}/g
102         s-@VERSION@-%{version}-g
103         s-@RELEASE@-%{release}-g
104         s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g
105         s,@DATADIR@,%{_datadir}/%{base_name},g
106         s/@COPYSOURCES@/%{base_name}{.desktop,.png}/g
107 ' %{SOURCE0} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
108
109 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
110 install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{base_name}
111 install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/%{base_name}
112
113 %else
114 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{base_name},%{_plugindir}} \
115         $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
116
117 cd AdobeReader
118 cp -a Reader Resource $RPM_BUILD_ROOT%{_libdir}/%{base_name}
119 awk -v INSTDIR=%{_libdir}/%{base_name}/Reader \
120         '/^install_dir=/ {print "install_dir="INSTDIR; next} \
121         {print}' \
122         bin/%{base_name} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}
123 install Browser/%{platform}/* $RPM_BUILD_ROOT%{_plugindir}
124 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
125 install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
126
127 rm -rf $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/Patch
128
129 ln -sf /usr/lib/liblber-2.3.so.0 $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/%{platform}/lib/liblber.so
130 ln -sf /usr/lib/libldap-2.3.so.0 $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/%{platform}/lib/libldap.so
131 ln -sf /usr/share/ssl/ca-bundle.crt $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/Cert/curl-ca-bundle.crt
132
133 chmod a-x $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/%{platform}/lib/*.so.*
134 %endif
135
136 %clean
137 rm -rf $RPM_BUILD_ROOT
138
139 %if %{without license_agreement}
140 %post
141 %{_bindir}/%{base_name}.install
142
143 %else
144
145 %triggerin plugin -- mozilla-firefox
146 %nsplugin_install -d %{_libdir}/mozilla-firefox/plugins nppdf.so
147
148 %triggerun plugin -- mozilla-firefox
149 %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins nppdf.so
150
151 %triggerin plugin -- mozilla
152 %nsplugin_install -d %{_libdir}/mozilla/plugins nppdf.so
153 if [ -d /usr/%{_lib}/mozilla ]; then
154         umask 022
155         rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
156         if [ -x /usr/bin/regxpcom ]; then
157                 MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
158         fi
159 fi
160
161 %triggerun plugin -- mozilla
162 %nsplugin_uninstall -d %{_libdir}/mozilla/plugins nppdf.so
163 if [ -d /usr/%{_lib}/mozilla ]; then
164         umask 022
165         rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
166         if [ -x /usr/bin/regxpcom ]; then
167                 MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
168         fi
169 fi
170
171 # % triggerin plugin -- konqueror
172 # % nsplugin_install -d %{_libdir}/kde3/plugins/konqueror nppdf.so
173
174 # % triggerun plugin -- konqueror
175 # % nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror nppdf.so
176
177 # % triggerin plugin -- opera
178 # % nsplugin_install -d %{_libdir}/opera/plugins nppdf.so
179
180 # % triggerun plugin -- 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 plugin -- mozilla-plugin-acroread
186 %nsplugin_install -f -d %{_libdir}/mozilla/plugins nppdf.so
187
188 %endif
189
190 %files
191 %defattr(644,root,root,755)
192 %if %{without 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 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/SPPlugins
213 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/bin
214 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/lib
215 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/*.api
216 %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/AcroForm
217 %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/Annotations
218 %{_libdir}/%{base_name}/Reader/%{platform}/res
219 %{_desktopdir}/acroread.desktop
220 %{_pixmapsdir}/*
221
222 %files plugin
223 %defattr(644,root,root,755)
224 %attr(755,root,root) %{_plugindir}/*
225 %endif
This page took 0.059846 seconds and 3 git commands to generate.