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