]> git.pld-linux.org Git - packages/acroread.git/blob - acroread.spec
- one more CVE note
[packages/acroread.git] / acroread.spec
1 # TODO:
2 # - upgrade to 9.1
3 #
4 # Conditional build:
5 %bcond_with     license_agreement       # generates package
6 #
7 %define         base_name       acroread
8 Summary:        Adobe Acrobat Reader
9 Summary(pl.UTF-8):      Adobe Acrobat Reader - czytnik plików PDF
10 Summary(ru.UTF-8):      Программа для чтения документов в формате PDF от Adobe
11 Summary(uk.UTF-8):      Програма для читання документів у форматі PDF від Adobe
12 %if %{with license_agreement}
13 Name:           %{base_name}
14 %else
15 Name:           %{base_name}-installer
16 %endif
17 %define _rel    1
18 Version:        8.1.3
19 Release:        %{_rel}%{?with_license_agreement:wla}
20 Epoch:          1
21 License:        distribution restricted (http://www.adobe.com/products/acrobat/distribute.html)
22 # in short:
23 # - not distributable on public sites (only linking to adobe.com permitted)
24 # - distribution on CD requires signing Distribution Agreement (see URL above)
25 Group:          X11/Applications/Graphics
26 %if %{with license_agreement}
27 Source0:        http://ardownload.adobe.com/pub/adobe/reader/unix/8.x/8.1.3/enu/AdobeReader_enu-%{version}-1.i486.tar.bz2
28 # NoSource0-md5:        c85096f401772f435866a66ec06352f1
29 NoSource:       0
30 %else
31 Source1:        license-installer.sh
32 %endif
33 # please update @COPYSOURCES@ below if you add more Sources or Patches.
34 Source2:        %{base_name}.desktop
35 Source3:        %{base_name}.png
36 URL:            http://www.adobe.com/products/acrobat/
37 %if %{with license_agreement}
38 BuildRequires:  rpmbuild(macros) >= 1.357
39 Requires:       openldap-libs < 2.5
40 Requires:       openldap-libs >= 2.4
41 %else
42 Requires:       rpm-build-tools
43 %endif
44 ExclusiveArch:  %{ix86}
45 ExcludeArch:    i386
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %define         platform        intellinux
49 %define         tar0            ILINXR.TAR
50 %define         tar1            COMMON.TAR
51
52 %define         _noautostrip    .*\.api
53 %define         _noautoprov     libcrypto\.so.* libssl\.so.* libcurl\.so.* libicu.* libstdc++\.so.* libgcc_s\.so.*
54 %define         _noautoreq      %{_noautoprov} '^lib.*\.so$' '^lib.*\(VERSION\)$'
55
56 %description
57 Adobe(R) Reader(R) is free software that lets you view and print PDF
58 files (Portable Document Format) on a variety of hardware and
59 operating system platforms.
60
61 %description -l pl.UTF-8
62 Adobe(R) Reader(R) jest darmowym oprogramowaniem umożliwiającym
63 oglądanie oraz drukowanie plików PDF (Portable Document Format) na
64 różnych platformach sprzętowych oraz różnych systemach operacyjnych.
65
66 %description -l ru.UTF-8
67 Программа для чтения документов в формате Portable Document Format
68 (PDF), сгенерированных Adobe Acrobat'ом.
69
70 %description -l uk.UTF-8
71 Програма для читання документів у форматі Portable Document Format
72 (PDF), згенерованих Adobe Acrobat'ом.
73
74 %package -n browser-plugin-%{name}
75 Summary:        PDF plugin for Mozilla compatible browsers
76 Summary(pl.UTF-8):      Wtyczka PDF dla przeglądarek zgodnych Mozilla
77 Group:          X11/Applications
78 Requires:       %{base_name} = %{epoch}:%{version}-%{release}
79 Requires:       browser-plugins >= 2.0
80 Obsoletes:      acroread-plugin
81 Obsoletes:      mozilla-plugin-acroread
82
83 %description -n browser-plugin-%{name}
84 A Mozilla plugin for displaying PDF (Portable Document Format) files.
85
86 %description -n browser-plugin-%{name} -l pl.UTF-8
87 Wtyczka Mozilli do wyświetlania plików PDF (Portable Document Format).
88
89 %prep
90 %if %{with license_agreement}
91 %setup -q -c
92 cd AdobeReader
93 tar xf %{tar0}
94 tar xf %{tar1}
95 %endif
96
97 %install
98 rm -rf $RPM_BUILD_ROOT
99 %if %{without license_agreement}
100 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
101
102 sed -e '
103         s/@BASE_NAME@/%{base_name}/g
104         s/@TARGET_CPU@/%{_target_cpu}/g
105         s-@VERSION@-%{version}-g
106         s-@RELEASE@-%{release}-g
107         s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g
108         s,@DATADIR@,%{_datadir}/%{base_name},g
109         s/@COPYSOURCES@/%{base_name}{.desktop,.png}/g
110 ' %{SOURCE1} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
111
112 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
113 install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/%{base_name}
114 install %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/%{base_name}
115
116 %else
117 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{base_name},%{_browserpluginsdir}} \
118         $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
119
120 # note: there're also AdobeReader/Adobe/Help{,Viewer}
121 cd AdobeReader/Adobe/Reader8
122 cp -a Reader Resource $RPM_BUILD_ROOT%{_libdir}/%{base_name}
123 awk -v INSTDIR=%{_libdir}/%{base_name}/Reader \
124         '/^install_dir=/ {print "install_dir="INSTDIR; next} \
125         {print}' \
126         bin/%{base_name} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}
127 install Browser/%{platform}/* $RPM_BUILD_ROOT%{_browserpluginsdir}
128 install %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}
129 install %{SOURCE3} $RPM_BUILD_ROOT%{_pixmapsdir}
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/BeyondReader
172 %{_libdir}/%{base_name}/Reader/Cert
173 %{_libdir}/%{base_name}/Reader/GlobalPrefs
174 %{_libdir}/%{base_name}/Reader/HowTo
175 %{_libdir}/%{base_name}/Reader/IDTemplates
176 %{_libdir}/%{base_name}/Reader/JavaScripts
177 %{_libdir}/%{base_name}/Reader/Legal
178 %{_libdir}/%{base_name}/Reader/Tracker
179 %{_libdir}/%{base_name}/Reader/PDFSigQFormalRep.pdf
180 %{_libdir}/%{base_name}/Reader/pmd.cer
181 %{_libdir}/%{base_name}/Reader/%{platform}/mozilla
182 %dir %{_libdir}/%{base_name}/Reader/%{platform}
183 %dir %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins
184 %dir %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/Multimedia
185 %dir %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins3d
186 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/SPPlugins
187 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/bin
188 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/lib
189 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/*.api
190 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins3d/*.x3d
191 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/Multimedia/MPP
192 %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/AcroForm
193 %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/Annotations
194 %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins3d/prc
195 %{_desktopdir}/acroread.desktop
196 %{_pixmapsdir}/*
197
198 %files -n browser-plugin-%{name}
199 %defattr(644,root,root,755)
200 %attr(755,root,root) %{_browserpluginsdir}/*
201 %endif
This page took 0.06356 seconds and 4 git commands to generate.