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