]> git.pld-linux.org Git - packages/acroread.git/blob - acroread.spec
- up to 9.5.4
[packages/acroread.git] / acroread.spec
1 #
2 # Conditional build:
3 %bcond_with     license_agreement       # generates package
4 #
5 %define         base_name       acroread
6 %define         rel             1
7 Summary:        Adobe Acrobat Reader
8 Summary(pl.UTF-8):      Adobe Acrobat Reader - czytnik plików PDF
9 Summary(ru.UTF-8):      Программа для чтения документов в формате PDF от Adobe
10 Summary(uk.UTF-8):      Програма для читання документів у форматі PDF від Adobe
11 %if %{with license_agreement}
12 Name:           %{base_name}
13 %else
14 Name:           %{base_name}-installer
15 %endif
16 Version:        9.5.4
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:        9fd583a6ebf000cae507f128a58e79b5
27 NoSource:       0
28 %else
29 Source1:        http://svn.pld-linux.org/svn/license-installer/license-installer.sh
30 # Source1-md5:  329c25f457fea66ec502b7ef70cb9ede
31 %endif
32 # please update @COPYSOURCES@ below if you add more Sources or Patches.
33 Source2:        %{base_name}.desktop
34 Source3:        %{base_name}.png
35 URL:            http://www.adobe.com/products/acrobat/
36 %if %{with license_agreement}
37 BuildRequires:  rpmbuild(macros) >= 1.357
38 Requires:       ca-certificates >= 20080809-4
39 Requires:       iconv
40 Requires:       openldap-libs < 2.5
41 Requires:       openldap-libs >= 2.4
42 %else
43 Requires:       rpm-build-tools >= 4.4.37
44 Requires:       rpmbuild(macros) >= 1.544
45 %endif
46 ExclusiveArch:  %{ix86}
47 ExcludeArch:    i386
48 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49
50 %define         platform        intellinux
51 %define         tar0            ILINXR.TAR
52 %define         tar1            COMMON.TAR
53
54 %define         _noautostrip    .*\.api
55 %define         _noautoprov     libcrypto\.so.* libssl\.so.* libcurl\.so.* libicu.* libstdc++\.so.* libgcc_s\.so.*
56 %if "%{_rpmversion}" >= "5.0"
57 %define         _noautoreq      %{_noautoprov} '^lib.*\.so$' '^lib.*\\(VERSION\\)$'
58 %else
59 %define         _noautoreq      %{_noautoprov} '^lib.*\.so$' '^lib.*\(VERSION\)$'
60 %endif
61 %define         no_install_post_check_so        1
62
63 %description
64 Adobe(R) Reader(R) is free software that lets you view and print PDF
65 files (Portable Document Format) on a variety of hardware and
66 operating system platforms.
67
68 %description -l pl.UTF-8
69 Adobe(R) Reader(R) jest darmowym oprogramowaniem umożliwiającym
70 oglądanie oraz drukowanie plików PDF (Portable Document Format) na
71 różnych platformach sprzętowych oraz różnych systemach operacyjnych.
72
73 %description -l ru.UTF-8
74 Программа для чтения документов в формате Portable Document Format
75 (PDF), сгенерированных Adobe Acrobat'ом.
76
77 %description -l uk.UTF-8
78 Програма для читання документів у форматі Portable Document Format
79 (PDF), згенерованих Adobe Acrobat'ом.
80
81 %package -n browser-plugin-%{name}
82 Summary:        PDF plugin for Mozilla compatible browsers
83 Summary(pl.UTF-8):      Wtyczka PDF dla przeglądarek zgodnych Mozilla
84 Group:          X11/Applications
85 Requires:       %{base_name} = %{epoch}:%{version}-%{release}
86 Requires:       browser-plugins >= 2.0
87 Obsoletes:      acroread-plugin
88 Obsoletes:      mozilla-plugin-acroread
89
90 %description -n browser-plugin-%{name}
91 A Mozilla plugin for displaying PDF (Portable Document Format) files.
92
93 %description -n browser-plugin-%{name} -l pl.UTF-8
94 Wtyczka Mozilli do wyświetlania plików PDF (Portable Document Format).
95
96 %prep
97 %if %{with license_agreement}
98 %setup -q -c
99 cd AdobeReader
100 tar xf %{tar0}
101 tar xf %{tar1}
102 %endif
103
104 %install
105 rm -rf $RPM_BUILD_ROOT
106 %if %{without license_agreement}
107 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
108
109 sed -e '
110         s/@BASE_NAME@/%{base_name}/g
111         s/@TARGET_CPU@/%{_target_cpu}/g
112         s-@VERSION@-%{version}-g
113         s-@RELEASE@-%{release}-g
114         s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g
115         s,@DATADIR@,%{_datadir}/%{base_name},g
116         s/@COPYSOURCES@/%{base_name}{.desktop,.png}/g
117 ' %{SOURCE1} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
118
119 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
120 install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/%{base_name}
121 install %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/%{base_name}
122
123 %else
124 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{base_name}/bin} \
125         $RPM_BUILD_ROOT{%{_browserpluginsdir},%{_desktopdir},%{_pixmapsdir}}
126
127 cd AdobeReader/Adobe/Reader9
128 cp -a Browser Reader Resource $RPM_BUILD_ROOT%{_libdir}/%{base_name}
129 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Browser/install_browser_plugin
130 awk -v INSTDIR=%{_libdir}/%{base_name}/Reader \
131         '/^install_dir=/ {print "install_dir="INSTDIR; next} \
132         {print}' \
133         bin/%{base_name} > $RPM_BUILD_ROOT%{_libdir}/%{base_name}/bin/%{base_name}
134
135 # IMPORTANT NOTE: Here symlinks must be used instead of moving parts of tree
136 # for compatibility with other binary-only Adobe software (like AIR).
137 # This one is required to find Reader tree (relative to symlink target)...
138 ln -sf %{_libdir}/%{base_name}/bin/%{base_name} $RPM_BUILD_ROOT%{_bindir}/%{base_name}
139 # ...and nppdf plugin is expected in Browser subdir...
140 # ...so just symlink it to be used as browsers plugin.
141 ln -sf %{_libdir}/%{base_name}/Browser/%{platform}/nppdf.so $RPM_BUILD_ROOT%{_browserpluginsdir}/nppdf.so
142
143 install %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
144 install %{SOURCE3} $RPM_BUILD_ROOT%{_pixmapsdir}
145
146 ln -sf /usr/lib/liblber-2.4.so.2 $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/%{platform}/lib/liblber.so
147 ln -sf /usr/lib/libldap-2.4.so.2 $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/%{platform}/lib/libldap.so
148 ln -sf /etc/certs/ca-certificates.crt $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/Cert/curl-ca-bundle.crt
149
150 # don't generate dependencies for internal libs
151 chmod a-x $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/%{platform}/lib/*.so.*
152 %endif
153
154 %clean
155 rm -rf $RPM_BUILD_ROOT
156
157 %if %{without license_agreement}
158 %post
159 %{_bindir}/%{base_name}.install
160 %endif
161
162 %if %{with license_agreement}
163 %post -n browser-plugin-%{name}
164 %update_browser_plugins
165
166 %postun -n browser-plugin-%{name}
167 if [ "$1" = 0 ]; then
168         %update_browser_plugins
169 fi
170 %endif
171
172 %files
173 %defattr(644,root,root,755)
174 %if %{without license_agreement}
175 %attr(755,root,root) %{_bindir}/%{base_name}.install
176 %{_datadir}/%{base_name}
177 %else
178 %doc AdobeReader/ReadMe.htm
179 %attr(755,root,root) %{_bindir}/acroread
180 %dir %{_libdir}/%{base_name}
181 %dir %{_libdir}/%{base_name}/Browser
182 %dir %{_libdir}/%{base_name}/Browser/%{platform}
183 %attr(755,root,root) %{_libdir}/%{base_name}/Browser/%{platform}/nppdf.so
184 %{_libdir}/%{base_name}/Browser/HowTo
185 %dir %{_libdir}/%{base_name}/Reader
186 %{_libdir}/%{base_name}/Reader/help
187 %{_libdir}/%{base_name}/Reader/AcroVersion
188 %{_libdir}/%{base_name}/Reader/Cert
189 %{_libdir}/%{base_name}/Reader/GlobalPrefs
190 %{_libdir}/%{base_name}/Reader/IDTemplates
191 %{_libdir}/%{base_name}/Reader/JavaScripts
192 %{_libdir}/%{base_name}/Reader/Legal
193 %{_libdir}/%{base_name}/Reader/Tracker
194 %{_libdir}/%{base_name}/Reader/PDFSigQFormalRep.pdf
195 %{_libdir}/%{base_name}/Reader/pmd.cer
196 %{_libdir}/%{base_name}/Reader/%{platform}/mozilla
197 %dir %{_libdir}/%{base_name}/Reader/%{platform}
198 %dir %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins
199 %dir %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/Multimedia
200 %dir %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins3d
201 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/SPPlugins
202 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/bin
203 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/lib
204 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/*.api
205 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins3d/*.x3d
206 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/Multimedia/MPP
207 %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/AcroForm
208 %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/Annotations
209 %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins3d/prc
210 %{_libdir}/%{base_name}/Resource
211 %dir %{_libdir}/%{base_name}/bin
212 %attr(755,root,root) %{_libdir}/%{base_name}/bin/acroread
213 %{_desktopdir}/acroread.desktop
214 %{_pixmapsdir}/acroread.png
215
216 %files -n browser-plugin-%{name}
217 %defattr(644,root,root,755)
218 %attr(755,root,root) %{_browserpluginsdir}/nppdf.so
219 %endif
This page took 0.04004 seconds and 3 git commands to generate.