]>
Commit | Line | Data |
---|---|---|
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: 9.1.3 | |
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: ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/%{version}/enu/AdbeRdr%{version}-1_i486linux_enu.tar.bz2 | |
26 | # NoSource0-md5: fec3eed6dfc921a6dcc4deab400e207e | |
27 | NoSource: 0 | |
28 | %else | |
29 | Source1: license-installer.sh | |
30 | %endif | |
31 | # please update @COPYSOURCES@ below if you add more Sources or Patches. | |
32 | Source2: %{base_name}.desktop | |
33 | Source3: %{base_name}.png | |
34 | URL: http://www.adobe.com/products/acrobat/ | |
35 | %if %{with license_agreement} | |
36 | BuildRequires: rpmbuild(macros) >= 1.357 | |
37 | Requires: openldap-libs < 2.5 | |
38 | Requires: openldap-libs >= 2.4 | |
39 | %else | |
40 | Requires: rpm-build-tools >= 0:4.4.35 | |
41 | %endif | |
42 | ExclusiveArch: %{ix86} | |
43 | ExcludeArch: i386 | |
44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
45 | ||
46 | %define platform intellinux | |
47 | %define tar0 ILINXR.TAR | |
48 | %define tar1 COMMON.TAR | |
49 | ||
50 | %define _noautostrip .*\.api | |
51 | %define _noautoprov libcrypto\.so.* libssl\.so.* libcurl\.so.* libicu.* libstdc++\.so.* libgcc_s\.so.* | |
52 | %define _noautoreq %{_noautoprov} '^lib.*\.so$' '^lib.*\(VERSION\)$' | |
53 | ||
54 | %description | |
55 | Adobe(R) Reader(R) is free software that lets you view and print PDF | |
56 | files (Portable Document Format) on a variety of hardware and | |
57 | operating system platforms. | |
58 | ||
59 | %description -l pl.UTF-8 | |
60 | Adobe(R) Reader(R) jest darmowym oprogramowaniem umożliwiającym | |
61 | oglądanie oraz drukowanie plików PDF (Portable Document Format) na | |
62 | różnych platformach sprzętowych oraz różnych systemach operacyjnych. | |
63 | ||
64 | %description -l ru.UTF-8 | |
65 | Программа для чтения документов в формате Portable Document Format | |
66 | (PDF), сгенерированных Adobe Acrobat'ом. | |
67 | ||
68 | %description -l uk.UTF-8 | |
69 | Програма для читання документів у форматі Portable Document Format | |
70 | (PDF), згенерованих Adobe Acrobat'ом. | |
71 | ||
72 | %package -n browser-plugin-%{name} | |
73 | Summary: PDF plugin for Mozilla compatible browsers | |
74 | Summary(pl.UTF-8): Wtyczka PDF dla przeglądarek zgodnych Mozilla | |
75 | Group: X11/Applications | |
76 | Requires: %{base_name} = %{epoch}:%{version}-%{release} | |
77 | Requires: browser-plugins >= 2.0 | |
78 | Obsoletes: acroread-plugin | |
79 | Obsoletes: mozilla-plugin-acroread | |
80 | ||
81 | %description -n browser-plugin-%{name} | |
82 | A Mozilla plugin for displaying PDF (Portable Document Format) files. | |
83 | ||
84 | %description -n browser-plugin-%{name} -l pl.UTF-8 | |
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 | ' %{SOURCE1} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install | |
109 | ||
110 | install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name} | |
111 | install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/%{base_name} | |
112 | install %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/%{base_name} | |
113 | ||
114 | %else | |
115 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{base_name},%{_browserpluginsdir}} \ | |
116 | $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}} | |
117 | ||
118 | # note: there're also AdobeReader/Adobe/Help{,Viewer} | |
119 | cd AdobeReader/Adobe/Reader9 | |
120 | cp -a Reader Resource $RPM_BUILD_ROOT%{_libdir}/%{base_name} | |
121 | awk -v INSTDIR=%{_libdir}/%{base_name}/Reader \ | |
122 | '/^install_dir=/ {print "install_dir="INSTDIR; next} \ | |
123 | {print}' \ | |
124 | bin/%{base_name} > $RPM_BUILD_ROOT%{_bindir}/%{base_name} | |
125 | install Browser/%{platform}/* $RPM_BUILD_ROOT%{_browserpluginsdir} | |
126 | install %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir} | |
127 | install %{SOURCE3} $RPM_BUILD_ROOT%{_pixmapsdir} | |
128 | ||
129 | cp -a Browser/HowTo $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/ | |
130 | ||
131 | rm -rf $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/Patch | |
132 | ||
133 | ln -sf /usr/lib/liblber-2.4.so.2 $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/%{platform}/lib/liblber.so | |
134 | ln -sf /usr/lib/libldap-2.4.so.2 $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/%{platform}/lib/libldap.so | |
135 | ln -sf /usr/share/ssl/ca-bundle.crt $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/Cert/curl-ca-bundle.crt | |
136 | ||
137 | chmod a-x $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/%{platform}/lib/*.so.* | |
138 | %endif | |
139 | ||
140 | %clean | |
141 | rm -rf $RPM_BUILD_ROOT | |
142 | ||
143 | %if %{without license_agreement} | |
144 | %post | |
145 | %{_bindir}/%{base_name}.install | |
146 | %endif | |
147 | ||
148 | %if %{with license_agreement} | |
149 | %post -n browser-plugin-%{name} | |
150 | %update_browser_plugins | |
151 | ||
152 | %postun -n browser-plugin-%{name} | |
153 | if [ "$1" = 0 ]; then | |
154 | %update_browser_plugins | |
155 | fi | |
156 | %endif | |
157 | ||
158 | %files | |
159 | %defattr(644,root,root,755) | |
160 | %if %{without license_agreement} | |
161 | %attr(755,root,root) %{_bindir}/%{base_name}.install | |
162 | %{_datadir}/%{base_name} | |
163 | %else | |
164 | %doc AdobeReader/ReadMe.htm | |
165 | %attr(755,root,root) %{_bindir}/* | |
166 | %dir %{_libdir}/%{base_name} | |
167 | %{_libdir}/%{base_name}/Resource | |
168 | %dir %{_libdir}/%{base_name}/Reader | |
169 | %{_libdir}/%{base_name}/Reader/help | |
170 | %{_libdir}/%{base_name}/Reader/AcroVersion | |
171 | %{_libdir}/%{base_name}/Reader/Cert | |
172 | %{_libdir}/%{base_name}/Reader/GlobalPrefs | |
173 | %{_libdir}/%{base_name}/Reader/HowTo | |
174 | %{_libdir}/%{base_name}/Reader/IDTemplates | |
175 | %{_libdir}/%{base_name}/Reader/JavaScripts | |
176 | %{_libdir}/%{base_name}/Reader/Legal | |
177 | %{_libdir}/%{base_name}/Reader/Tracker | |
178 | %{_libdir}/%{base_name}/Reader/PDFSigQFormalRep.pdf | |
179 | %{_libdir}/%{base_name}/Reader/pmd.cer | |
180 | %{_libdir}/%{base_name}/Reader/%{platform}/mozilla | |
181 | %dir %{_libdir}/%{base_name}/Reader/%{platform} | |
182 | %dir %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins | |
183 | %dir %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/Multimedia | |
184 | %dir %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins3d | |
185 | %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/SPPlugins | |
186 | %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/bin | |
187 | %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/lib | |
188 | %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/*.api | |
189 | %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins3d/*.x3d | |
190 | %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/Multimedia/MPP | |
191 | %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/AcroForm | |
192 | %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/Annotations | |
193 | %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins3d/prc | |
194 | %{_desktopdir}/acroread.desktop | |
195 | %{_pixmapsdir}/* | |
196 | ||
197 | %files -n browser-plugin-%{name} | |
198 | %defattr(644,root,root,755) | |
199 | %attr(755,root,root) %{_browserpluginsdir}/* | |
200 | %endif |