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