]> git.pld-linux.org Git - packages/acroread.git/blob - acroread.spec
- use system openldap-libs (symlinks) for PPKLite plugin
[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
16 Release:        3%{?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:        ftp://ftp.adobe.com/pub/adobe/reader/unix/7x/7.0/enu/AdbeRdr70_linux_enu.tar.gz
25 %endif
26 Source1:        %{base_name}.desktop
27 Source2:        %{base_name}.png
28 URL:            http://www.adobe.com/products/acrobat/
29 %{?with_license_agreement:Requires:     openldap-libs >= 2.2}
30 ExclusiveArch:  %{ix86}
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %define         mozdir          %{_libdir}/mozilla/plugins
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 -n mozilla-plugin-%{base_name}
61 Summary:        Mozilla PDF plugin
62 Summary(pl):    Wtyczka PDF do Mozilli
63 Group:          X11/Applications
64 Prereq:         mozilla-embedded
65 Requires:       %{base_name} = %{epoch}:%{version}
66
67 %description -n mozilla-plugin-%{base_name}
68 A Mozilla plugin for displaying PDF (Portable Document Format) files.
69
70 %description -n mozilla-plugin-%{base_name} -l pl
71 Wtyczka Mozilli do wy¶wietlania plików PDF (Portable Document Format).
72
73 %prep
74 %if %{with license_agreement}
75 %setup -q -c
76 cd AdobeReader
77 tar xf %{tar0}
78 tar xf %{tar1}
79 %endif
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83 %if ! %{with license_agreement}
84 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
85
86 cat <<EOF >$RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
87 #!/bin/sh
88 if [ "\$1" = "--with" -a "\$2" = "license_agreement" ]; then
89         TMPDIR=\`rpm --eval "%%{tmpdir}"\`; export TMPDIR
90         SPECDIR=\`rpm --eval "%%{_specdir}"\`; export SPECDIR
91         SRPMDIR=\`rpm --eval "%%{_srcrpmdir}"\`; export SRPMDIR
92         SOURCEDIR=\`rpm --eval "%%{_sourcedir}"\`; export SOURCEDIR
93         BUILDDIR=\`rpm --eval "%%{_builddir}"\`; export BUILDDIR
94         RPMDIR=\`rpm --eval "%%{_rpmdir}"\`; export RPMDIR
95         BACKUP=0
96         mkdir -p \$TMPDIR \$SPECDIR \$SRPMDIR \$RPMDIR \$SRPMDIR \$SOURCEDIR \$BUILDDIR
97         if [ -f \$SPECDIR/%{base_name}.spec ]; then
98                 BACKUP=1
99                 mv -f \$SPECDIR/%{base_name}.spec \$SPECDIR/%{base_name}.spec.prev
100         fi
101         for i in %{base_name}.desktop %{base_name}.png %{base_name}-locale.patch; do
102                 if [ -f \$SOURCEDIR/\$i ]; then
103                         mv -f \$SOURCEDIR/\$i \$SOURCEDIR/\$i.prev
104                         BACKUP=1
105                 fi
106         done
107         if echo "\$3" | grep '\.src\.rpm$' >/dev/null; then
108                 ( cd \$SRPMDIR
109                 if echo "\$3" | grep '://' >/dev/null; then
110                         wget --passive-ftp -t0 "\$3"
111                 else
112                         cp -f "\$3" .
113                 fi
114                 rpm2cpio \`basename "\$3"\` | ( cd \$TMPDIR; cpio -i %{base_name}.spec )
115                 for i in %{base_name}.desktop %{base_name}.png; do
116                         rpm2cpio \$i | ( cd \$TMPDIR; cpio -i \$i )
117                 done )
118                 cp -i \$TMPDIR/%{base_name}.spec \$SPECDIR/%{base_name}.spec \
119                         || exit 1
120                 for i in %{base_name}.desktop %{base_name}.png; do
121                         cp -i \$TMPDIR/\$i \$SOURCEDIR/\$i || exit 1
122                 done
123         else
124                 cp -i "\$3" \$SPECDIR || exit 1
125                 for i in %{base_name}.desktop %{base_name}.png; do
126                         cp -i %{_datadir}/%{base_name}/\$i \$SOURCEDIR/\$i || exit 1
127                 done
128         fi
129         ( cd \$SPECDIR
130         %{_bindir}/builder -nc -ncs --with license_agreement --opts --target=%{_target_cpu} %{base_name}.spec
131         if [ "\$?" -ne 0 ]; then
132                 exit 2
133         fi
134         RPMNAME1=%{base_name}-%{version}-%{release}wla.%{_target_cpu}.rpm
135         RPMNAME2=mozilla-plugin-%{base_name}-%{version}-%{release}wla.%{_target_cpu}.rpm
136         echo "Installing \$RPMNAME1"
137         RPMNAMES=\$RPMDIR/\$RPMNAME1
138         if rpm -q --whatprovides mozilla-embedded >/dev/null 2>&1; then
139                 RPMNAMES="\$RPMNAMES \$RPMDIR/\$RPMNAME2"
140                 echo "Installing \$RPMNAME2"
141         else
142                 echo "Not installing \$RPMNAME2"
143         fi
144         rpm -U \$RPMNAMES || \
145                 echo -e "Install manually the file(s):\n   \$RPMNAMES" )
146         if [ "\$BACKUP" -eq 1 ]; then
147                 if [ -f \$SPECDIR/%{base_name}.spec.prev ]; then
148                         mv -f \$SPECDIR/%{base_name}.spec.prev \$SPECDIR/%{base_name}.spec
149                 fi
150                 for i in %{base_name}.desktop %{base_name}.png %{base_name}-locale.patch; do
151                         if [ -f \$SOURCEDIR/\$i.prev ]; then
152                                 mv -f \$SOURCEDIR/\$i.prev \$SOURCEDIR/\$i
153                         fi
154                 done
155         fi
156 else
157         echo "
158 License issues made us not to include inherent files into
159 this package by default. If you want to create full working
160 package please build it with the following command:
161
162 \$0 --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
163 "
164 fi
165 EOF
166
167 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
168 install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{base_name}
169 install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/%{base_name}
170
171 %else
172 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{base_name},%{mozdir}} \
173         $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
174
175 cd AdobeReader
176 cp -a Reader Resource $RPM_BUILD_ROOT%{_libdir}/%{base_name}
177 awk -v INSTDIR=%{_libdir}/%{base_name}/Reader \
178         '/^install_dir=/ {print "install_dir="INSTDIR; next} \
179         {print}' \
180         bin/%{base_name} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}
181 install Browser/%{platform}/* $RPM_BUILD_ROOT%{mozdir}
182 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
183 install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
184
185 ln -sf /usr/lib/liblber-2.2.so.7 $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/%{platform}/lib/liblber.so
186 ln -sf /usr/lib/libldap-2.2.so.7 $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/%{platform}/lib/libldap.so
187 ln -sf /usr/share/ssl/ca-bundle.crt $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/Cert/curl-ca-bundle.crt
188
189 chmod a-x $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/%{platform}/lib/*.so.*
190 %endif
191
192 %clean
193 rm -rf $RPM_BUILD_ROOT
194
195 %if ! %{with license_agreement}
196 %pre
197 echo "
198 License issues made us not to include inherent files into
199 this package by default. If you want to create full working
200 package please build it with the following command:
201
202 %{base_name}.install --with license_agreement %{_datadir}/%{base_name}/%{base_name}.spec
203 "
204 %endif
205
206 %files
207 %defattr(644,root,root,755)
208 %if ! %{with license_agreement}
209 %attr(755,root,root) %{_bindir}/%{base_name}.install
210 %{_datadir}/%{base_name}
211 %else
212 %doc AdobeReader/{LICREAD.TXT,README}
213 %attr(755,root,root) %{_bindir}/*
214 %dir %{_libdir}/%{base_name}
215 %{_libdir}/%{base_name}/Resource
216 %dir %{_libdir}/%{base_name}/Reader
217 %{_libdir}/%{base_name}/Reader/help
218 %{_libdir}/%{base_name}/Reader/AcroVersion
219 %{_libdir}/%{base_name}/Reader/Cert
220 %{_libdir}/%{base_name}/Reader/GlobalPrefs
221 %{_libdir}/%{base_name}/Reader/HowTo
222 %{_libdir}/%{base_name}/Reader/Legal
223 %{_libdir}/%{base_name}/Reader/JavaScripts
224 %{_libdir}/%{base_name}/Reader/Messages
225 %{_libdir}/%{base_name}/Reader/WebSearch
226 %dir %{_libdir}/%{base_name}/Reader/%{platform}
227 %dir %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins
228 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/SPPlugins
229 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/bin
230 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/lib
231 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/*.api
232 %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/AcroForm
233 %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/Annotations
234 %{_libdir}/%{base_name}/Reader/%{platform}/res
235 %{_desktopdir}/acroread.desktop
236 %{_pixmapsdir}/*
237
238 %files -n mozilla-plugin-%{base_name}
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{mozdir}/*
241 %endif
This page took 0.052628 seconds and 4 git commands to generate.