]> git.pld-linux.org Git - packages/acroread.git/blob - acroread.spec
- added missing defines
[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.1
16 Release:        2.1%{?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:        http://ardownload.adobe.com/pub/adobe/reader/unix/7x/7.0/enu/AdbeRdr701_linux_enu.tar.gz
25 %else
26 Source0:        license-installer.sh
27 %endif
28 Source1:        %{base_name}.desktop
29 Source2:        %{base_name}.png
30 URL:            http://www.adobe.com/products/acrobat/
31 %if %{with license_agreement}
32 BuildRequires:  rpmbuild(macros) >= 1.236
33 Requires:       openldap-libs >= 2.2
34 %endif
35 ExclusiveArch:  %{ix86}
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %define         _plugindir      %{_libdir}/browser-plugins
39
40 # TODO: galeon and skipstone, konqueror, opera.
41 # use macro, otherwise extra LF inserted along with the ifarch
42 %define browsers mozilla, mozilla-firefox
43
44 %define         platform        intellinux
45 %define         tar0            ILINXR.TAR
46 %define         tar1            COMMON.TAR
47
48 %define         _noautostrip    .*\.api
49 %define         _noautoreq      '^lib.*\.so$' '^lib.*\(VERSION\)$'
50
51 %description
52 Adobe(R) Reader(R) is free software that lets you view and print
53 PDF files (Portable Document Format) on a variety of hardware and
54 operating system platforms.
55
56 %description -l pl
57 Adobe(R) Reader(R) jest darmowym oprogramowaniem umo¿liwiaj±cym ogl±danie
58 oraz drukowanie plików PDF (Portable Document Format) na ró¿nych platformach
59 sprzêtowych oraz ró¿nych systemach operacyjnych.
60
61 %description -l ru
62 ðÒÏÇÒÁÍÍÁ ÄÌÑ ÞÔÅÎÉÑ ÄÏËÕÍÅÎÔÏ× × ÆÏÒÍÁÔÅ Portable Document Format
63 (PDF), ÓÇÅÎÅÒÉÒÏ×ÁÎÎÙÈ Adobe Acrobat'ÏÍ.
64
65 %description -l uk
66 ðÒÏÇÒÁÍÁ ÄÌÑ ÞÉÔÁÎÎÑ ÄÏËÕÍÅÎԦנՠÆÏÒÍÁÔ¦ Portable Document Format
67 (PDF), ÚÇÅÎÅÒÏ×ÁÎÉÈ Adobe Acrobat'ÏÍ.
68
69 %package plugin
70 Summary:        PDF plugin for Mozilla compatible browsers
71 Summary(pl):    Wtyczka PDF dla przegl±darek zgodnych Mozilla
72 Group:          X11/Applications
73 Prereq:         mozilla-embedded
74 Requires:       %{base_name} = %{epoch}:%{version}
75 Requires:       browser-plugins(%{_target_cpu})
76 Obsoletes:      mozilla-plugin-acroread
77
78 %description plugin
79 A Mozilla plugin for displaying PDF (Portable Document Format) files.
80
81 %description plugin -l pl
82 Wtyczka Mozilli do wy¶wietlania plików PDF (Portable Document Format).
83
84 %prep
85 %if %{with license_agreement}
86 %setup -q -c
87 cd AdobeReader
88 tar xf %{tar0}
89 tar xf %{tar1}
90 %endif
91
92 %install
93 rm -rf $RPM_BUILD_ROOT
94 %if %{without license_agreement}
95 install -d $RPM_BUILD_ROOT{%{_bindir},%{_datadir}/%{base_name}}
96
97 sed -e '
98         s/@BASE_NAME@/%{base_name}/g
99         s/@TARGET_CPU@/%{_target_cpu}/g
100         s-@VERSION@-%{version}-g
101         s-@RELEASE@-%{release}-g
102         s,@SPECFILE@,%{_datadir}/%{base_name}/%{base_name}.spec,g
103         s,@DATADIR@,%{_datadir}/%{base_name},g
104         s/@COPYSOURCES@/%{base_name}{.desktop,.png}/g
105 ' %{SOURCE0} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}.install
106
107 install %{_specdir}/%{base_name}.spec $RPM_BUILD_ROOT%{_datadir}/%{base_name}
108 install %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{base_name}
109 install %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/%{base_name}
110
111 %else
112 install -d $RPM_BUILD_ROOT{%{_bindir},%{_libdir}/%{base_name},%{_plugindir}} \
113         $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}}
114
115 cd AdobeReader
116 cp -a Reader Resource $RPM_BUILD_ROOT%{_libdir}/%{base_name}
117 awk -v INSTDIR=%{_libdir}/%{base_name}/Reader \
118         '/^install_dir=/ {print "install_dir="INSTDIR; next} \
119         {print}' \
120         bin/%{base_name} > $RPM_BUILD_ROOT%{_bindir}/%{base_name}
121 install Browser/%{platform}/* $RPM_BUILD_ROOT%{_plugindir}
122 install %{SOURCE1} $RPM_BUILD_ROOT%{_desktopdir}
123 install %{SOURCE2} $RPM_BUILD_ROOT%{_pixmapsdir}
124
125 ln -sf /usr/lib/liblber-2.2.so.7 $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/%{platform}/lib/liblber.so
126 ln -sf /usr/lib/libldap-2.2.so.7 $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/%{platform}/lib/libldap.so
127 ln -sf /usr/share/ssl/ca-bundle.crt $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/Cert/curl-ca-bundle.crt
128
129 chmod a-x $RPM_BUILD_ROOT%{_libdir}/%{base_name}/Reader/%{platform}/lib/*.so.*
130 %endif
131
132 %clean
133 rm -rf $RPM_BUILD_ROOT
134
135 %if %{without license_agreement}
136 %pre
137 %{_bindir}/%{base_name}.install
138
139 %else
140
141 %triggerin -- mozilla-firefox
142 %nsplugin_install -d %{_libdir}/mozilla-firefox/plugins nppdf.so
143
144 %triggerun -- mozilla-firefox
145 %nsplugin_uninstall -d %{_libdir}/mozilla-firefox/plugins nppdf.so
146
147 %triggerin -- mozilla
148 %nsplugin_install -d %{_libdir}/mozilla/plugins nppdf.so
149 if [ -d /usr/%{_lib}/mozilla ]; then
150         umask 022
151         rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
152         if [ -x /usr/bin/regxpcom ]; then
153                 MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
154         fi
155 fi
156
157 %triggerun -- mozilla
158 %nsplugin_uninstall -d %{_libdir}/mozilla/plugins nppdf.so
159 if [ -d /usr/%{_lib}/mozilla ]; then
160         umask 022
161         rm -f /usr/%{_lib}/mozilla/components/{compreg,xpti}.dat
162         if [ -x /usr/bin/regxpcom ]; then
163                 MOZILLA_FIVE_HOME=/usr/%{_lib}/mozilla /usr/bin/regxpcom
164         fi
165 fi
166
167 # % triggerin -- konqueror
168 # % nsplugin_install -d %{_libdir}/kde3/plugins/konqueror nppdf.so
169
170 # % triggerun -- konqueror
171 # % nsplugin_uninstall -d %{_libdir}/kde3/plugins/konqueror nppdf.so
172
173 # % triggerin -- opera
174 # % nsplugin_install -d %{_libdir}/opera/plugins nppdf.so
175
176 # % triggerun -- opera
177 # % nsplugin_uninstall -d %{_libdir}/opera/plugins nppdf.so
178
179 # as rpm removes the old obsoleted package files after the triggers
180 # above are ran, add another trigger to make the links there.
181 %triggerpostun -- mozilla-plugin-acroread
182 %nsplugin_install -f -d %{_libdir}/mozilla/plugins nppdf.so
183
184 %endif
185
186 %files
187 %defattr(644,root,root,755)
188 %if %{without license_agreement}
189 %attr(755,root,root) %{_bindir}/%{base_name}.install
190 %{_datadir}/%{base_name}
191 %else
192 %doc AdobeReader/{LICREAD.TXT,README}
193 %attr(755,root,root) %{_bindir}/*
194 %dir %{_libdir}/%{base_name}
195 %{_libdir}/%{base_name}/Resource
196 %dir %{_libdir}/%{base_name}/Reader
197 %{_libdir}/%{base_name}/Reader/help
198 %{_libdir}/%{base_name}/Reader/AcroVersion
199 %{_libdir}/%{base_name}/Reader/Cert
200 %{_libdir}/%{base_name}/Reader/GlobalPrefs
201 %{_libdir}/%{base_name}/Reader/HowTo
202 %{_libdir}/%{base_name}/Reader/Legal
203 %{_libdir}/%{base_name}/Reader/JavaScripts
204 %{_libdir}/%{base_name}/Reader/Messages
205 %{_libdir}/%{base_name}/Reader/WebSearch
206 %dir %{_libdir}/%{base_name}/Reader/%{platform}
207 %dir %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins
208 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/SPPlugins
209 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/bin
210 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/lib
211 %attr(755,root,root) %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/*.api
212 %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/AcroForm
213 %{_libdir}/%{base_name}/Reader/%{platform}/plug_ins/Annotations
214 %{_libdir}/%{base_name}/Reader/%{platform}/res
215 %{_desktopdir}/acroread.desktop
216 %{_pixmapsdir}/*
217
218 %files plugin
219 %defattr(644,root,root,755)
220 %attr(755,root,root) %{_plugindir}/*
221 %endif
This page took 0.0636910000000001 seconds and 4 git commands to generate.