/[packages]/cauldron/java-1.6.0-sun/current/SPECS/java-1.6.0-sun.spec
ViewVC logotype

Contents of /cauldron/java-1.6.0-sun/current/SPECS/java-1.6.0-sun.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 111765 - (show annotations) (download)
Tue Jun 21 21:19:29 2011 UTC (10 years, 3 months ago) by lmenut
File size: 23545 byte(s)
SILENT try to build without conditionnal mkrel
1 %define origin sun
2 %define priority 1600
3 %define javaver 1.6.0
4 %define cvsver 6u26
5 %define over %{cvsver}
6 %define buildver 26
7
8 %define cvsversion %{cvsver}
9
10 %define javaws_ver %{javaver}
11 %define javaws_version %{cvsversion}
12
13 %define ubuntu_svnrev r361
14
15 %define jdkbundle jdk%{javaver}_%{buildver}
16 %define sdklnk java-%{javaver}-%{origin}
17 %define jrelnk jre-%{javaver}-%{origin}
18 %define sdkdir %{name}-%{version}
19 %define jredir %{sdkdir}/jre
20 %define sdkbindir %{_jvmdir}/%{sdklnk}/bin
21 %define sdklibdir %{_jvmdir}/%{sdklnk}/lib
22 %define jrebindir %{_jvmdir}/%{jrelnk}/bin
23 %define jvmjardir %{_jvmjardir}/%{name}-%{version}
24
25 %define fontdir %{_datadir}/fonts/java
26
27 %ifarch %{ix86}
28 %define target_cpu i586
29 %define pluginname %{_jvmdir}/%{jredir}/lib/i386/libnpjp2.so
30 %define oldpluginname %{_jvmdir}/%{jredir}/plugin/i386/ns7/libjavaplugin_oji.so
31 %define priority2 1590
32 %define javaplugin libjavaplugin.so
33 %endif
34 %ifarch x86_64
35 %define target_cpu amd64
36 %define pluginname %{_jvmdir}/%{jredir}/lib/amd64/libnpjp2.so
37 %define javaplugin libjavaplugin.so.%{_arch}
38 %endif
39
40 %define cgibindir %{_var}/www/cgi-bin
41
42 # Avoid RPM 4.2+'s internal dep generator, it may produce bogus
43 # Provides/Requires here.
44 %define _use_internal_dependency_generator 0
45
46 # This prevents aggressive stripping.
47 %define _enable_debug_packages %{nil}
48 %define debug_package %{nil}
49 %define __debug_install_post /bin/true %{nil}
50
51 %define release %mkrel 1
52
53 Name: java-%{javaver}-%{origin}
54 Version: %{javaver}.%{buildver}
55 Release: %{release}
56 Summary: Java Runtime Environment for %{name}
57 License: Operating System Distributor License for Java (DLJ)
58 Group: Development/Java
59 URL: http://java.sun.com/j2se/%{javaver}
60 Source0: http://dlc.sun.com/dlj/binaries/jdk-%{cvsversion}-dlj-linux-i586.bin
61 Source1: http://dlc.sun.com/dlj/binaries/jdk-%{cvsversion}-dlj-linux-amd64.bin
62 # svn co -%{ubuntu_svnrev} --username guest --password "" https://jdk-distros.dev.java.net/svn/jdk-distros/trunk/linux/ubuntu/sun-java6/debian/
63 Source2: jdk-6-dlj-ubuntu-%{ubuntu_svnrev}.tar.bz2
64 # (anssi) make javaws entry really point to javaws and create a different
65 # entry for the cache viewer where to it pointed previously (#31347):
66 Patch0: jdk6-fix-javaws-desktop.patch
67 Provides: jre-%{javaver}-%{origin} = %{version}-%{release}
68 Provides: jre-%{origin} = %{version}-%{release}
69 Provides: jre-%{javaver} java-%{javaver} jre = %{javaver}
70 Provides: java-%{origin} = %{version}-%{release}
71 Provides: java = %{javaver}
72 Provides: %{_lib}%{name} = %{version}-%{release}
73 Requires(post): update-alternatives
74 Requires(postun): update-alternatives
75 Requires: jpackage-utils >= 0:1.5.38
76 ExclusiveArch: %{ix86} x86_64
77 BuildRequires: jpackage-utils >= 0:1.5.38 sed desktop-file-utils
78 Provides: javaws = %{javaws_ver}
79 Provides: jndi = %{version} jndi-ldap = %{version}
80 Provides: jndi-cos = %{version} jndi-rmi = %{version}
81 Provides: jndi-dns = %{version}
82 Provides: jaas = %{version}
83 Provides: jsse = %{version}
84 Provides: jce = %{version}
85 Provides: jdbc-stdext = 3.0 jdbc-stdext = %{version}
86 Provides: java-sasl = %{version}
87 %ifnarch x86_64
88 Obsoletes: javaws-menu
89 Provides: javaws-menu
90 %endif
91 # DLJ license requires these to be part of the JRE
92 Requires: %{_lib}%{name}-plugin = %{version}-%{release}
93 Requires: %{_lib}%{name}-alsa = %{version}-%{release}
94 Requires: %{_lib}%{name}-jdbc = %{version}-%{release}
95 Requires: %{name}-fonts = %{version}-%{release}
96 Provides: j2re = %{version}-%{release}
97 Provides: jre2 = %{version}-%{release}
98 Obsoletes: j2re < %{version}-%{release}
99 Obsoletes: jre2 < %{version}-%{release}
100 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
101
102 %description
103 This package contains the Java Runtime Environment for %{name}.
104
105 %package devel
106 Summary: Java Development Kit for %{name}
107 Group: Development/Java
108 Requires(post): update-alternatives
109 Requires(postun): update-alternatives
110 Provides: java-sdk-%{javaver}-%{origin} = %{version}-%{release}
111 Provides: java-sdk-%{origin} = %{version}-%{release}
112 Provides: java-sdk-%{javaver} java-sdk = %{javaver} jdk = %{javaver}
113 Provides: java-devel-%{origin} = %{version}-%{release}
114 Provides: java-%{javaver}-devel java-devel = %{javaver}
115 Requires: %{_lib}%{name} = %{version}-%{release}
116 Provides: jdk = %{version}-%{release}
117 Provides: jdk2 = %{version}-%{release}
118 Provides: j2sdk = %{version}-%{release}
119 Obsoletes: jdk < %{version}-%{release}
120 Obsoletes: jdk2 < %{version}-%{release}
121 Obsoletes: j2sdk < %{version}-%{release}
122
123 %description devel
124 The Java(tm) Development Kit (JDK(tm)) contains the software and tools that
125 developers need to compile, debug, and run applets and applications
126 written using the Java programming language.
127
128 %package src
129 Summary: Source files for %{name}
130 Group: Development/Java
131 Requires: %{name} = %{version}-%{release}
132
133 %description src
134 This package contains source files for %{name}.
135
136 %package demo
137 Summary: Demonstration files for %{name}
138 Group: Development/Java
139 Requires: %{_lib}%{name} = %{version}-%{release}
140 # Without this a requirement on libjava_crw_demo_g.so is added which
141 # is not in the main java package. libjava_crw_demo.so is but not "_g".
142 AutoReq: 0
143
144 %description demo
145 This package contains demonstration files for %{name}.
146
147 %package plugin
148 Summary: Browser plugin files for %{name}
149 Group: Networking/WWW
150 Requires(post): update-alternatives
151 Requires(postun): update-alternatives
152 Requires: %{_lib}%{name} = %{version}-%{release}
153 Provides: java-plugin = %{javaver} java-%{javaver}-plugin = %{version}
154 Provides: %{_lib}%{name}-plugin = %{version}-%{release}
155 Conflicts: java-%{javaver}-ibm-plugin java-%{javaver}-blackdown-plugin
156 Conflicts: java-%{javaver}-bea-plugin
157 Obsoletes: java-1.3.1-plugin java-1.4.0-plugin java-1.4.1-plugin java-1.4.2-plugin
158
159 %description plugin
160 This package contains browser plugin files for %{name}.
161 Note! This package supports browsers built with GCC 3.2 and later.
162
163 %package fonts
164 Summary: TrueType fonts for %{origin} JVMs
165 Group: System/Fonts/True type
166 Requires(post): update-alternatives
167 Requires(postun): update-alternatives
168 Requires: %{name} = %{version}-%{release} freetype-tools
169 Requires: mkfontdir
170 Provides: java-fonts = %{javaver} java-%{javaver}-fonts
171 Conflicts: java-%{javaver}-ibm-fonts java-%{javaver}-blackdown-fonts
172 Conflicts: java-%{javaver}-bea-fonts
173 Obsoletes: java-1.3.1-fonts java-1.4.0-fonts java-1.4.1-fonts java-1.4.2-fonts
174
175 %description fonts
176 This package contains the TrueType fonts for %{origin} JVMs.
177
178 %package alsa
179 Summary: ALSA support for %{name}
180 Group: Development/Java
181 Requires: %{_lib}%{name} = %{version}-%{release}
182 Provides: %{_lib}%{name}-alsa = %{version}-%{release}
183
184 %description alsa
185 This package contains Advanced Linux Sound Architecture (ALSA) support
186 libraries for %{name}.
187
188 %package jdbc
189 Summary: JDBC/ODBC bridge driver for %{name}
190 Group: Development/Java
191 Requires: %{_lib}%{name} = %{version}-%{release}
192 Provides: %{_lib}%{name}-jdbc = %{version}-%{release}
193 AutoReq: 0
194
195 %description jdbc
196 This package contains the JDBC/ODBC bridge driver for %{name}.
197
198 %prep
199 %setup -q -T -c -n %{name}-%{version} -a2
200 %patch0 -p0
201 %ifarch i586
202 sh %{SOURCE0} --accept-license --unpack
203 %else
204 sh %{SOURCE1} --accept-license --unpack
205 %endif
206 cd %{jdkbundle}
207 %ifarch x86_64
208 rm -f man/man1/javaws.1
209 %endif
210
211 # fix perms
212 chmod -R go=u-w *
213 chmod -R u+w *
214
215 %build
216 for xdgmenu in debian/*desktop.in; do
217 sed $xdgmenu \
218 -e "s#@vendor@#Sun#g" \
219 -e "s#@RELEASE@#%{javaver}#g" \
220 -e "s#/@basedir@/bin#%{jrebindir}#g" \
221 -e "s#Icon=.*#Icon=%{name}#g" \
222 -e "s#@ia32txt@##g" \
223 > %{name}-`echo $xdgmenu|cut -d- -f2|cut -d. -f1-2`
224 done
225 sed -i -e "s#%{jrebindir}#%{sdkbindir}#g" %{name}-jconsole.desktop
226 mv %{name}-java.desktop debian/sharedmimeinfo %{jdkbundle}/jre/lib
227
228 %install
229 rm -rf %{buildroot}
230
231 export DONT_STRIP=1
232
233 cd %{jdkbundle}
234 %ifnarch x86_64
235 # install java-rmi-cgi
236 install -m755 bin/java-rmi.cgi -D %{buildroot}%{cgibindir}/java-rmi-%{version}.cgi
237 %endif
238
239 # main files
240 install -d %{buildroot}%{_jvmdir}/%{sdkdir}
241 cp -a COPYRIGHT LICENSE THIRDPARTYLICENSEREADME.txt bin include lib %{buildroot}%{_jvmdir}/%{sdkdir}
242 install -m644 src.zip -D %{buildroot}%{_prefix}/src/%{name}-%{version}.zip
243 ln -s %{_prefix}/src/%{name}-%{version}.zip %{buildroot}%{_jvmdir}/%{sdkdir}/src.zip
244
245 install -d %{buildroot}%{_jvmdir}/%{jredir}
246
247 # extensions handling
248 install -d %{buildroot}%{jvmjardir}
249 pushd %{buildroot}%{jvmjardir}
250 ln -s %{_jvmdir}/%{jredir}/lib/jsse.jar jsse-%{version}.jar
251 ln -s %{_jvmdir}/%{jredir}/lib/jce.jar jce-%{version}.jar
252 for jar in jndi jndi-ldap jndi-cos jndi-rmi jaas jdbc-stdext sasl; do
253 ln -s %{_jvmdir}/%{jredir}/lib/rt.jar $jar-%{version}.jar; done
254 ln -s jdbc-stdext-%{version}.jar jdbc-stdext-3.0.jar
255 for jar in *-%{version}.jar ; do
256 if [ x%{version} != x%{javaver} ]; then
257 ln -fs ${jar} $(echo $jar | sed "s|-%{version}.|-%{javaver}.|g")
258 fi
259 ln -fs ${jar} $(echo $jar | sed "s|-%{version}.|.|g")
260 done
261 popd
262
263 # rest of the jre
264 cp -a jre/bin jre/lib %{buildroot}%{_jvmdir}/%{jredir}
265 cp -a jre/javaws jre/plugin %{buildroot}%{_jvmdir}/%{jredir}
266 install -d %{buildroot}%{_jvmdir}/%{jredir}/lib/endorsed
267
268 # jce policy file handling
269 install -d %{buildroot}%{_jvmprivdir}/%{name}/jce/vanilla
270 for file in local_policy.jar US_export_policy.jar; do
271 mv %{buildroot}%{_jvmdir}/%{jredir}/lib/security/$file \
272 %{buildroot}%{_jvmprivdir}/%{name}/jce/vanilla
273 # for ghosts
274 touch %{buildroot}%{_jvmdir}/%{jredir}/lib/security/$file
275 done
276
277 # versionless symlinks
278 pushd %{buildroot}%{_jvmdir}
279 ln -s %{jredir} %{jrelnk}
280 ln -s %{sdkdir} %{sdklnk}
281 popd
282
283 pushd %{buildroot}%{_jvmjardir}
284 ln -s %{sdkdir} %{jrelnk}
285 ln -s %{sdkdir} %{sdklnk}
286 popd
287
288 install -m644 jre/plugin/desktop/sun_java.png -D %{buildroot}%{_datadir}/pixmaps/%{name}.png
289
290 for desktop in ../*.desktop; do
291 desktop-file-install --vendor="" \
292 --remove-category="Application" \
293 --remove-category="X-Red-Hat-Base" \
294 --remove-category="AdvancedSettings" \
295 --add-category="X-MandrivaLinux-System-SunJava%{over}" \
296 --dir %{buildroot}%{_datadir}/applications $desktop
297 done
298
299 # make sure that this directory exist so update-alternatvies won't fail if shared-mime-info isn't installed
300 install -d %{buildroot}%{_datadir}/mime/packages
301
302 # man pages
303 install -d %{buildroot}%{_mandir}/man1
304 pushd man
305 for manpage in man1/*; do
306 iconv -f iso-8859-1 -t utf-8 $manpage -o %{buildroot}%{_mandir}/man1/`basename $manpage .1`-%{name}.1
307 install -m644 ja_JP.eucJP/$manpage -D %{buildroot}%{_mandir}/ja_JP.eucJP/man1/`basename $manpage .1`-%{name}.1
308 done
309 popd
310
311 # demo
312 install -d %{buildroot}%{_datadir}/%{name}
313 cp -a demo %{buildroot}%{_datadir}/%{name}
314 ln -s %{_datadir}/%{name}/demo %{buildroot}%{_jvmdir}
315
316 ### font handling
317 # (anssi) This dir is used with java-1.5.0-sun as well, do not modify to avoid conflicts
318 install -d %{buildroot}%{fontdir}
319 #mv %{buildroot}%{_jvmdir}/%{jredir}/lib/fonts %{buildroot}%{fontdir}
320 #ln -s %{fontdir} %{buildroot}%{_jvmdir}/%{jredir}/lib/fonts
321 ln -s %{_sysconfdir}/java/font.properties %{buildroot}%{_jvmdir}/%{jredir}/lib
322
323 # These %ghost'd files are created properly in %post -- Rex
324 touch %{buildroot}%{fontdir}/{fonts.{alias,dir,scale,cache-1},XftCache,encodings.dir}
325
326 # fontpath.d symlink
327 mkdir -p %{buildroot}%_sysconfdir/X11/fontpath.d/
328 ln -s ../../..%{fontdir} \
329 %{buildroot}%_sysconfdir/X11/fontpath.d/java:pri=50
330
331 # make sure that plugin dir exists so update-alternatives won't fail if mozilla/firefox isn't installed
332 install -d %{buildroot}%{_libdir}/mozilla/plugins
333
334 cd ..
335
336 # Most of this shamelessly stolen from redhat's kdebase-2.2.2 specfile
337 find %{buildroot}%{_jvmdir}/%{jredir} -type d \
338 | sed 's|'%{buildroot}'|%dir |' > %{name}-%{version}-all.files
339 find %{buildroot}%{_jvmdir}/%{jredir} -type f -o -type l \
340 | sed 's|'%{buildroot}'||' >> %{name}-%{version}-all.files
341
342 grep "plugin\|libnpjp2\|lib/locale" %{name}-%{version}-all.files | sort \
343 > %{name}-%{version}-plugin.files
344 grep Jdbc %{name}-%{version}-all.files | sort \
345 > %{name}-%{version}-jdbc.files
346 grep -F alsa.so %{name}-%{version}-all.files | sort \
347 > %{name}-%{version}-alsa.files
348 cat %{name}-%{version}-all.files \
349 | grep -v plugin \
350 | grep -v libnpjp2 \
351 | grep -v Jdbc \
352 | grep -v lib/fonts \
353 | grep -v lib/oblique-fonts \
354 | grep -v lib/locale \
355 | grep -vF alsa.so \
356 | grep -v jre/lib/security \
357 > %{name}-%{version}.files
358
359 %ifarch x86_64
360 %define jreext %{nil}
361 %else
362 %define jreext javaws
363 %endif
364 %define jrebin keytool orbd policytool rmid rmiregistry servertool tnameserv
365 %define jreman java %{jreext} %{jrebin} jvisualvm
366 %ifarch x86_64
367 %define jdkext %{nil}
368 %else
369 %define jdkext HtmlConverter
370 %endif
371 %define jdkboth appletviewer extcheck idlj jar jarsigner javadoc javah javap jdb native2ascii rmic serialver jconsole pack200 unpack200 apt jinfo jmap jps jsadebugd jstack jstat jstatd jhat jrunscript schemagen wsgen wsimport xjc
372 %define jdkman %{jdkboth} javac
373 %define jdkbin %{jdkboth} %{jdkext}
374
375 for man in %{jreman}; do
376 echo %{_mandir}/man1/${man}-%{name}.1%{_extension} >> %{name}-%{version}.files
377 echo %{_mandir}/ja_JP.eucJP/man1/${man}-%{name}.1%{_extension} >> %{name}-%{version}.files
378 done
379 rm -f %{name}-%{version}-devel.files
380 for man in %{jdkman}; do
381 echo %{_mandir}/man1/${man}-%{name}.1%{_extension} >> %{name}-%{version}-devel.files
382 echo %{_mandir}/ja_JP.eucJP/man1/${man}-%{name}.1%{_extension} >> %{name}-%{version}-devel.files
383 done
384
385 # Allow banco do brasil applet to work on 64bits architecture
386 mkdir -p %{buildroot}%_sysconfdir/.java/.systemPrefs
387 chmod 755 %{buildroot}%_sysconfdir/.java/.systemPrefs
388
389 %clean
390 rm -rf %{buildroot}
391
392 %post
393 update-alternatives --install %{_bindir}/java java %{jrebindir}/java %{priority}%{expand:%(for bin in %{jrebin}; do echo -n -e \ \\\\\\n\
394 --slave %{_bindir}/${bin} ${bin} %{jrebindir}/${bin}; done)}%{expand:%(for man in %{jreman}; do echo -n -e \ \\\\\\n\
395 --slave %{_mandir}/man1/${man}.1%{_extension} ${man}.1%{_extension} %{_mandir}/man1/${man}-%{name}.1%{_extension}; done)}%{expand:%(for man in %{jreman}; do echo -n -e \ \\\\\\n\
396 --slave %{_mandir}/ja_JP.eucJP/man1/${man}.1%{_extension} ${man}%{_extension}.ja_JP.eucJP %{_mandir}/ja_JP.eucJP/man1/${man}-%{name}.1%{_extension}; done)} \
397 --slave %{_bindir}/ControlPanel ControlPanel %{jrebindir}/ControlPanel \
398 --slave %{_bindir}/javaws javaws %{jrebindir}/javaws \
399 --slave %{_datadir}/mime/packages/java.xml java.xml %{_jvmdir}/%{jrelnk}/lib/sharedmimeinfo \
400 --slave %{_jvmdir}/jre jre %{_jvmdir}/%{jrelnk} \
401 --slave %{_jvmjardir}/jre jre_exports %{_jvmjardir}/%{jrelnk}
402
403 # (Anssi 04/2008) bug #40201
404 # These used to be broken real files:
405 for file in %{_jvmdir}/%{jredir}/lib/security/local_policy.jar %{_jvmdir}/%{jrelnk}/lib/security/US_export_policy.jar; do
406 [ -L "$file" ] || rm -f "$file"
407 done
408 update-alternatives \
409 --install \
410 %{_jvmdir}/%{jrelnk}/lib/security/local_policy.jar \
411 jce_%{javaver}_%{origin}_local_policy \
412 %{_jvmprivdir}/%{name}/jce/vanilla/local_policy.jar \
413 %{priority} \
414 --slave \
415 %{_jvmdir}/%{jrelnk}/lib/security/US_export_policy.jar \
416 jce_%{javaver}_%{origin}_us_export_policy \
417 %{_jvmprivdir}/%{name}/jce/vanilla/US_export_policy.jar
418
419 update-alternatives --install %{_jvmdir}/jre-%{origin} jre_%{origin} %{_jvmdir}/%{jrelnk} %{priority} \
420 --slave %{_jvmjardir}/jre-%{origin} jre_%{origin}_exports %{_jvmjardir}/%{jrelnk}
421
422 update-alternatives --install %{_jvmdir}/jre-%{javaver} jre_%{javaver} %{_jvmdir}/%{jrelnk} %{priority} \
423 --slave %{_jvmjardir}/jre-%{javaver} jre_%{javaver}_exports %{_jvmjardir}/%{jrelnk}
424
425
426 %{update_desktop_database}
427 %{update_mime_database}
428
429 %post devel
430 update-alternatives --install %{_bindir}/javac javac %{sdkbindir}/javac %{priority}%{expand:%(for bin in %{jdkbin}; do echo -n -e \ \\\\\\n\
431 --slave %{_bindir}/${bin} ${bin} %{sdkbindir}/${bin}; done)}%{expand:%(for man in %{jdkman}; do echo -n -e \ \\\\\\n\
432 --slave %{_mandir}/man1/${man}.1%{_extension} ${man}.1%{_extension} %{_mandir}/man1/${man}-%{name}.1%{_extension}; done)}%{expand:%(for man in %{jdkman}; do echo -n -e \ \\\\\\n\
433 --slave %{_mandir}/ja_JP.eucJP/man1/${man}.1%{_extension} ${man}%{_extension}.ja_JP.eucJP %{_mandir}/ja_JP.eucJP/man1/${man}-%{name}.1%{_extension}; done)} \
434 --slave %{_jvmdir}/java java_sdk %{_jvmdir}/%{sdklnk} \
435 --slave %{_jvmjardir}/java java_sdk_exports %{_jvmjardir}/%{sdklnk}
436
437 update-alternatives --install %{_jvmdir}/java-%{origin} java_sdk_%{origin} %{_jvmdir}/%{sdklnk} %{priority} \
438 --slave %{_jvmjardir}/java-%{origin} java_sdk_%{origin}_exports %{_jvmjardir}/%{sdklnk}
439
440 update-alternatives --install %{_jvmdir}/java-%{javaver} java_sdk_%{javaver} %{_jvmdir}/%{sdklnk} %{priority} \
441 --slave %{_jvmjardir}/java-%{javaver} java_sdk_%{javaver}_exports %{_jvmjardir}/%{sdklnk}
442
443 %post plugin
444 %ifarch %ix86
445 update-alternatives --install %{_libdir}/mozilla/plugins/libjavaplugin.so %{javaplugin} %{pluginname} %{priority}
446 update-alternatives --install %{_libdir}/mozilla/plugins/libjavaplugin.so %{javaplugin} %{oldpluginname} %{priority2}
447 %endif
448
449 %ifarch x86_64
450 update-alternatives --install %{_libdir}/mozilla/plugins/libjavaplugin.so %{javaplugin} %{pluginname} %{priority}
451 %endif
452
453 %postun plugin
454 %ifarch %ix86
455 if ! [ -e "%{oldpluginname}" ]; then
456 update-alternatives --remove %{javaplugin} %{oldpluginname}
457 fi
458 %endif
459 if ! [ -e "%{pluginname}" ]; then
460 update-alternatives --remove %{javaplugin} %{pluginname}
461 fi
462
463 %postun
464 if ! [ -e "%{jrebindir}/java" ]; then
465 update-alternatives --remove java %{jrebindir}/java
466 update-alternatives --remove \
467 jce_%{javaver}_%{origin}_local_policy \
468 %{_jvmprivdir}/%{name}/jce/vanilla/local_policy.jar
469 update-alternatives --remove jre_%{origin} %{_jvmdir}/%{jrelnk}
470 update-alternatives --remove jre_%{javaver} %{_jvmdir}/%{jrelnk}
471 fi
472
473 %{clean_desktop_database}
474 %{clean_mime_database}
475
476 %postun devel
477 if ! [ -e "%{sdkbindir}/javac" ]; then
478 update-alternatives --remove javac %{sdkbindir}/javac
479 update-alternatives --remove java_sdk_%{origin} %{_jvmdir}/%{sdklnk}
480 update-alternatives --remove java_sdk_%{javaver} %{_jvmdir}/%{sdklnk}
481 fi
482
483 %post fonts
484 %define fonts LucidaBrightItalic.ttf LucidaSansDemiBold.ttf LucidaTypewriterBold.ttf LucidaBrightDemiItalic.ttf LucidaBrightRegular.ttf LucidaSansRegular.ttf LucidaTypewriterRegular.ttf
485
486 update-alternatives --install %{fontdir}/LucidaBrightDemiBold.ttf LucidaBrightDemiBold.ttf %{_jvmdir}/%{jredir}/lib/fonts/LucidaBrightDemiBold.ttf %{priority} \
487 %{expand:%(for font in %{fonts}; do echo -n -e \ \\\\\\n\
488 --slave %{fontdir}/$font $font %{_jvmdir}/%{jredir}/lib/fonts/$font; done)}
489
490 mkfontscale %{fontdir}
491 mkfontdir %{fontdir}
492
493 %postun fonts
494 if ! [ -e %{_jvmdir}/%{jredir}/lib/fonts/LucidaBrightDemiBold.ttf ]; then
495 update-alternatives --remove LucidaBrightDemiBold.ttf %{_jvmdir}/%{jredir}/lib/fonts/LucidaBrightDemiBold.ttf
496
497 if [ -d %{fontdir} ]; then
498 mkfontscale %{fontdir}
499 mkfontdir %{fontdir}
500 fi
501
502
503 # (Anssi 02/2008) The previous versions of this package were buggy and did
504 # not always remove the old alternative, causing it to be left enabled,
505 # leading to broken symlinks.
506 %posttrans
507 if ! [ -e %{_bindir}/java ]; then
508 update-alternatives --auto java
509 fi
510 %posttrans devel
511 if ! [ -e %{_bindir}/javac ]; then
512 update-alternatives --auto javac
513 fi
514 %posttrans plugin
515 if ! [ -e %{_libdir}/mozilla/plugins/libjavaplugin.so ]; then
516 update-alternatives --auto %{javaplugin}
517 fi
518
519 %posttrans fonts
520 if ! [ -e %{fontdir}/LucidaBrightDemiBold.ttf ]; then
521 update-alternatives --auto LucidaBrightDemiBold.ttf
522 fi
523
524 %files -f %{name}-%{version}.files
525 %defattr(-,root,root,-)
526 %doc %{jdkbundle}/jre/{COPYRIGHT,LICENSE,README}
527 %doc %{jdkbundle}/jre/Welcome.html
528 %dir %{_jvmdir}/%{sdkdir}
529 %{_jvmdir}/%{sdkdir}/COPYRIGHT
530 %{_jvmdir}/%{sdkdir}/LICENSE
531 %{_jvmdir}/%{sdkdir}/THIRDPARTYLICENSEREADME.txt
532 %{jvmjardir}
533 %dir %{_jvmdir}/%{jredir}/lib/security
534 %config(noreplace) %{_jvmdir}/%{jredir}/lib/security/cacerts
535 %config(noreplace) %{_jvmdir}/%{jredir}/lib/security/java.policy
536 %config(noreplace) %{_jvmdir}/%{jredir}/lib/security/java.security
537 %config(noreplace) %{_jvmdir}/%{jredir}/lib/security/javaws.policy
538 %ghost %{_jvmdir}/%{jredir}/lib/security/local_policy.jar
539 %ghost %{_jvmdir}/%{jredir}/lib/security/US_export_policy.jar
540 %{_jvmdir}/%{jrelnk}
541 %{_jvmjardir}/%{jrelnk}
542 %{_jvmprivdir}/*
543 %{_datadir}/applications/*.desktop
544 %exclude %{_datadir}/applications/%{name}-jconsole.desktop
545 %{_datadir}/pixmaps/*.png
546 %dir %{_datadir}/mime
547 %dir %{_datadir}/mime/packages
548 %{_jvmdir}/%{jredir}/lib/security/blacklist
549 %{_jvmdir}/%{jredir}/lib/security/trusted.libraries
550
551 %files devel -f %{name}-%{version}-devel.files
552 %defattr(-,root,root,-)
553 %doc %{jdkbundle}/{COPYRIGHT,LICENSE,README.html}
554 %dir %{_jvmdir}/%{sdkdir}/bin
555 %dir %{_jvmdir}/%{sdkdir}/include
556 %dir %{_jvmdir}/%{sdkdir}/lib
557 %{_jvmdir}/%{sdkdir}/bin/*
558 %{_jvmdir}/%{sdkdir}/include/*
559 %{_jvmdir}/%{sdkdir}/lib/*
560 %{_jvmdir}/%{sdklnk}
561 %{_jvmjardir}/%{sdklnk}
562 %ifnarch x86_64
563 %{cgibindir}/java-rmi-%{version}.cgi
564 %endif
565 %{_datadir}/applications/%{name}-jconsole.desktop
566
567 %files src
568 %defattr(-,root,root,-)
569 %{_jvmdir}/%{sdkdir}/src.zip
570 %{_prefix}/src/%{name}-%{version}.zip
571
572 %files demo
573 %defattr(-,root,root,-)
574 %dir %{_datadir}/%{name}
575 %{_datadir}/%{name}/demo
576 %{_jvmdir}/demo
577
578 %files alsa -f %{name}-%{version}-alsa.files
579 %defattr(-,root,root,-)
580
581 %files jdbc -f %{name}-%{version}-jdbc.files
582 %defattr(-,root,root,-)
583
584 %files plugin -f %{name}-%{version}-plugin.files
585 %defattr(-,root,root,-)
586 %dir %{_libdir}/mozilla
587 %dir %{_libdir}/mozilla/plugins
588 %dir %{_sysconfdir}/.java/.systemPrefs
589
590 %files fonts
591 %defattr(0644,root,root,0755)
592 %{_jvmdir}/%{jredir}/lib/fonts
593 %{_jvmdir}/%{jredir}/lib/oblique-fonts
594 %dir %{fontdir}
595 %config(noreplace) %{fontdir}/fonts.alias
596 %ghost %{fontdir}/fonts.dir
597 %ghost %{fontdir}/fonts.scale
598 %ghost %{fontdir}/fonts.cache-1
599 %ghost %{fontdir}/XftCache
600 %ghost %{fontdir}/encodings.dir
601 %{_sysconfdir}/X11/fontpath.d/java:pri=50
602
603

  ViewVC Help
Powered by ViewVC 1.1.28