java-1.6.0-sun-vl.spec 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784
  1. %define origin sun
  2. %define priority 1600
  3. %define javaver 1.6.0
  4. %define cvsver 6u24
  5. %define over %{cvsver}
  6. %define buildver 24
  7. %define cvsversion %{cvsver}
  8. %define javaws_ver %{javaver}
  9. %define javaws_version %{cvsversion}
  10. %define ubuntu_svnrev r364
  11. %define jdkbundle jdk%{javaver}_%{buildver}
  12. %define sdklnk java-%{javaver}-%{origin}
  13. %define jrelnk jre-%{javaver}-%{origin}
  14. %define sdkdir %{name}-%{version}
  15. %define jredir %{sdkdir}/jre
  16. %define sdkbindir %{_jvmdir}/%{sdklnk}/bin
  17. %define sdklibdir %{_jvmdir}/%{sdklnk}/lib
  18. %define jrebindir %{_jvmdir}/%{jrelnk}/bin
  19. %define jvmjardir %{_jvmjardir}/%{name}-%{version}
  20. %define fontdir %{_datadir}/fonts/java
  21. %ifarch %{ix86}
  22. %define target_cpu i586
  23. %define pluginname %{_jvmdir}/%{jredir}/lib/i386/libnpjp2.so
  24. %endif
  25. %ifarch x86_64
  26. %define target_cpu amd64
  27. %define pluginname %{_jvmdir}/%{jredir}/lib/amd64/libnpjp2.so
  28. %endif
  29. %define cgibindir %{_var}/www/cgi-bin
  30. # Avoid RPM 4.2+'s internal dep generator, it may produce bogus
  31. # Provides/Requires here.
  32. %define _use_internal_dependency_generator 0
  33. # This prevents aggressive stripping.
  34. %define debug_package %{nil}
  35. Name: java-%{javaver}-%{origin}
  36. Version: %{javaver}.%{buildver}
  37. Release: 1%{?_dist_release}
  38. Summary: Java Runtime Environment for %{name}
  39. Summary(ja): Java 実行環境 (%{name})
  40. License: Operating System Distributor License for Java (DLJ)
  41. Group: Development/Languages
  42. URL: http://java.sun.com/j2se/%{javaver}
  43. Source0: http://download.java.net/dlj/binaries/jdk-%{cvsversion}-dlj-linux-i586.bin
  44. Source1: http://download.java.net/dlj/binaries/jdk-%{cvsversion}-dlj-linux-amd64.bin
  45. # svn co -%{ubuntu_svnrev} --username guest --password "" https://jdk-distros.dev.java.net/svn/jdk-distros/trunk/linux/ubuntu/sun-java6/debian/
  46. Source2: jdk-6-dlj-ubuntu-%{ubuntu_svnrev}.tar.bz2
  47. # fontconfig.properties
  48. Source10: fontconfig.Vine5.properties
  49. Provides: jre-%{javaver}-%{origin} = %{version}-%{release}
  50. Provides: jre-%{origin} = %{version}-%{release}
  51. Provides: jre-%{javaver} java-%{javaver} jre = %{javaver}
  52. Provides: java-%{origin} = %{version}-%{release}
  53. Provides: java = %{javaver}
  54. Provides: %{name} = %{version}-%{release}
  55. Requires(post): alternatives
  56. Requires(postun): alternatives
  57. Requires: jpackage-utils >= 1.7.4
  58. ExclusiveArch: %{ix86} x86_64
  59. BuildArch: i586 x86_64
  60. BuildRequires: jpackage-utils >= 1.7.4 sed desktop-file-utils
  61. %ifnarch x86_64
  62. Provides: javaws = %{javaws_ver}
  63. %endif
  64. Provides: jndi = %{version} jndi-ldap = %{version}
  65. Provides: jndi-cos = %{version} jndi-rmi = %{version}
  66. Provides: jndi-dns = %{version}
  67. Provides: jaas = %{version}
  68. Provides: jsse = %{version}
  69. Provides: jce = %{version}
  70. Provides: jdbc-stdext = 3.0 jdbc-stdext = %{version}
  71. Provides: java-sasl = %{version}
  72. %ifnarch x86_64
  73. Obsoletes: javaws-menu
  74. Provides: javaws-menu
  75. %endif
  76. # DLJ license requires these to be part of the JRE
  77. Requires: %{name}-plugin = %{version}-%{release}
  78. Requires: %{name}-alsa = %{version}-%{release}
  79. Requires: %{name}-jdbc = %{version}-%{release}
  80. Requires: %{name}-fonts = %{version}-%{release}
  81. Provides: j2re = %{version}-%{release}
  82. Provides: jre2 = %{version}-%{release}
  83. Obsoletes: j2re < %{version}-%{release}
  84. Obsoletes: jre2 < %{version}-%{release}
  85. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  86. %description
  87. This package contains the Java Runtime Environment for %{name}
  88. %package devel
  89. Summary: Java Development Kit for %{name}
  90. Group: Development/Languages
  91. Requires(post): alternatives
  92. Requires(postun): alternatives
  93. Provides: java-sdk-%{javaver}-%{origin} = %{version}-%{release}
  94. Provides: java-sdk-%{origin} = %{version}-%{release}
  95. Provides: java-sdk-%{javaver} java-sdk = %{javaver} jdk = %{javaver}
  96. Provides: java-devel-%{origin} = %{version}-%{release}
  97. Provides: java-%{javaver}-devel java-devel = %{javaver}
  98. Requires: %{name} = %{version}-%{release}
  99. Provides: jdk = %{version}-%{release}
  100. Provides: jdk2 = %{version}-%{release}
  101. Provides: j2sdk = %{version}-%{release}
  102. Obsoletes: jdk < %{version}-%{release}
  103. Obsoletes: jdk2 < %{version}-%{release}
  104. Obsoletes: j2sdk < %{version}-%{release}
  105. %description devel
  106. The Java(tm) Development Kit (JDK(tm)) contains the software and tools that
  107. developers need to compile, debug, and run applets and applications
  108. written using the Java programming language.
  109. %package src
  110. Summary: Source files for %{name}
  111. Group: Development/Languages
  112. Requires: %{name} = %{version}-%{release}
  113. %description src
  114. This package contains source files for %{name}.
  115. %package demo
  116. Summary: Demonstration files for %{name}
  117. Group: Development/Languages
  118. Requires: %{name} = %{version}-%{release}
  119. # Without this a requirement on libjava_crw_demo_g.so is added which
  120. # is not in the main java package. libjava_crw_demo.so is but not "_g".
  121. AutoReq: 0
  122. %description demo
  123. This package contains demonstration files for %{name}.
  124. %package plugin
  125. Summary: Browser plugin files for %{name}
  126. Group: Applications/Internet
  127. Requires(post): alternatives
  128. Requires(postun): alternatives
  129. Requires: %{name} = %{version}-%{release}
  130. Provides: java-plugin = %{javaver} java-%{javaver}-plugin = %{version}
  131. Provides: %{name}-plugin = %{version}-%{release}
  132. Conflicts: java-%{javaver}-ibm-plugin java-%{javaver}-blackdown-plugin
  133. Conflicts: java-%{javaver}-bea-plugin
  134. Obsoletes: java-1.3.1-plugin java-1.4.0-plugin java-1.4.1-plugin java-1.4.2-plugin
  135. %description plugin
  136. This package contains browser plugin files for %{name}.
  137. Note! This package supports browsers built with GCC 3.2 and later.
  138. %package fonts
  139. Summary: TrueType fonts for %{origin} JVMs
  140. Group: User Interface/X
  141. Requires(post): alternatives
  142. Requires(postun): alternatives
  143. Requires: %{name} = %{version}-%{release}
  144. Requires: freetype-utils
  145. %if %{_dist_release}=="vl4"
  146. Requires: XOrg-font-utils
  147. %else
  148. Requires: xorg-x11-font-utils
  149. %endif
  150. Requires(post): fontconfig
  151. Requires(postun): fontconfig
  152. Provides: java-fonts = %{javaver} java-%{javaver}-fonts
  153. Conflicts: java-%{javaver}-ibm-fonts java-%{javaver}-blackdown-fonts
  154. Conflicts: java-%{javaver}-bea-fonts
  155. Obsoletes: java-1.3.1-fonts java-1.4.0-fonts java-1.4.1-fonts java-1.4.2-fonts
  156. %description fonts
  157. This package contains the TrueType fonts for %{origin} JVMs.
  158. %package alsa
  159. Summary: ALSA support for %{name}
  160. Group: Development/Languages
  161. Requires: %{name} = %{version}-%{release}
  162. Provides: %{name}-alsa = %{version}-%{release}
  163. %description alsa
  164. This package contains Advanced Linux Sound Architecture (ALSA) support
  165. libraries for %{name}.
  166. %package jdbc
  167. Summary: JDBC/ODBC bridge driver for %{name}
  168. Group: Development/Languages
  169. Requires: %{name} = %{version}-%{release}
  170. Provides: %{name}-jdbc = %{version}-%{release}
  171. AutoReq: 0
  172. %description jdbc
  173. This package contains the JDBC/ODBC bridge driver for %{name}.
  174. %prep
  175. %setup -q -T -c -n %{name}-%{version} -a2
  176. %ifarch %{ix86}
  177. sh %{SOURCE0} --accept-license --unpack
  178. %else
  179. sh %{SOURCE1} --accept-license --unpack
  180. %endif
  181. cd %{jdkbundle}
  182. %ifarch x86_64
  183. rm -f man/man1/javaws.1
  184. %endif
  185. # fix perms
  186. chmod -R go=u-w *
  187. chmod -R u+w *
  188. %build
  189. for xdgmenu in debian/*desktop.in; do
  190. sed $xdgmenu \
  191. -e "s#@vendor@#Sun#g" \
  192. -e "s#@RELEASE@#%{javaver}#g" \
  193. -e "s#/@basedir@/bin#%{jrebindir}#g" \
  194. -e "s#Icon=.*#Icon=%{name}#g" \
  195. -e "s#@ia32txt@##g" \
  196. > %{name}-`echo $xdgmenu|cut -d- -f2|cut -d. -f1-2`
  197. done
  198. sed -i -e "s#%{jrebindir}#%{sdkbindir}#g" %{name}-jconsole.desktop
  199. mv %{name}-java.desktop debian/sharedmimeinfo %{jdkbundle}/jre/lib
  200. %ifnarch x86_64
  201. #sed -i -e "s#PATH=/usr/local/java/bin#PATH=%{jrebindir}#" %{jdkbundle}/bin/java-rmi.cgi
  202. # fix up (create new) HtmlConverter
  203. #cat >%{jdkbundle}/bin/HtmlConverter << EOF
  204. #%{jrebindir}/java -jar %{sdklibdir}/htmlconverter.jar $*
  205. #EOF
  206. %endif
  207. %install
  208. rm -rf %{buildroot}
  209. cd %{jdkbundle}
  210. %ifnarch x86_64
  211. # install java-rmi-cgi
  212. install -m755 bin/java-rmi.cgi -D %{buildroot}%{cgibindir}/java-rmi-%{version}.cgi
  213. %endif
  214. # main files
  215. install -d %{buildroot}%{_jvmdir}/%{sdkdir}
  216. cp -a COPYRIGHT LICENSE THIRDPARTYLICENSEREADME.txt bin include lib %{buildroot}%{_jvmdir}/%{sdkdir}
  217. install -m644 src.zip -D %{buildroot}%{_prefix}/src/%{name}-%{version}.zip
  218. ln -s %{_prefix}/src/%{name}-%{version}.zip %{buildroot}%{_jvmdir}/%{sdkdir}/src.zip
  219. install -d %{buildroot}%{_jvmdir}/%{jredir}
  220. # extensions handling
  221. install -d %{buildroot}%{jvmjardir}
  222. pushd %{buildroot}%{jvmjardir}
  223. ln -s %{_jvmdir}/%{jredir}/lib/jsse.jar jsse-%{version}.jar
  224. ln -s %{_jvmdir}/%{jredir}/lib/jce.jar jce-%{version}.jar
  225. for jar in jndi jndi-ldap jndi-cos jndi-rmi jaas jdbc-stdext sasl; do
  226. ln -s %{_jvmdir}/%{jredir}/lib/rt.jar $jar-%{version}.jar; done
  227. ln -s jdbc-stdext-%{version}.jar jdbc-stdext-3.0.jar
  228. for jar in *-%{version}.jar ; do
  229. if [ x%{version} != x%{javaver} ]; then
  230. ln -fs ${jar} $(echo $jar | sed "s|-%{version}.|-%{javaver}.|g")
  231. fi
  232. ln -fs ${jar} $(echo $jar | sed "s|-%{version}.|.|g")
  233. done
  234. popd
  235. # rest of the jre
  236. cp -a jre/bin jre/lib %{buildroot}%{_jvmdir}/%{jredir}
  237. cp -a jre/javaws jre/plugin %{buildroot}%{_jvmdir}/%{jredir}
  238. install -d %{buildroot}%{_jvmdir}/%{jredir}/lib/endorsed
  239. # jce policy file handling
  240. install -d %{buildroot}%{_jvmprivdir}/%{name}/jce/vanilla
  241. for file in local_policy.jar US_export_policy.jar; do
  242. ln -s %{_jvmdir}/%{jredir}/lib/security/$file \
  243. %{buildroot}%{_jvmprivdir}/%{name}/jce/vanilla
  244. # for ghosts
  245. touch %{buildroot}%{_jvmdir}/%{jredir}/lib/security/$file
  246. done
  247. # versionless symlinks
  248. pushd %{buildroot}%{_jvmdir}
  249. ln -s %{jredir} %{jrelnk}
  250. ln -s %{sdkdir} %{sdklnk}
  251. popd
  252. pushd %{buildroot}%{_jvmjardir}
  253. ln -s %{sdkdir} %{jrelnk}
  254. ln -s %{sdkdir} %{sdklnk}
  255. popd
  256. %ifnarch x86_64
  257. install -m644 jre/plugin/desktop/sun_java.png -D %{buildroot}%{_datadir}/pixmaps/%{name}.png
  258. for desktop in ../*.desktop; do
  259. desktop-file-install --vendor="" \
  260. --remove-category="Application" \
  261. --remove-category="X-Red-Hat-Base" \
  262. --remove-category="AdvancedSettings" \
  263. --add-category="X-MandrivaLinux-System-SunJava%{over}" \
  264. --dir %{buildroot}%{_datadir}/applications $desktop
  265. done
  266. %endif
  267. # make sure that this directory exist so update-alternatvies won't fail if shared-mime-info isn't installed
  268. install -d %{buildroot}%{_datadir}/mime/packages
  269. # man pages
  270. install -d %{buildroot}%{_mandir}/man1
  271. pushd man
  272. for manpage in man1/*; do
  273. #iconv -f iso-8859-1 -t utf-8 $manpage -o %{buildroot}%{_mandir}/man1/`basename $manpage .1`-%{name}.1
  274. install -m644 $manpage -D $RPM_BUILD_ROOT%{_mandir}/man1/`basename $manpage .1`-%{name}.1
  275. [ -f ja_JP.eucJP/$manpage ] && install -m644 ja_JP.eucJP/$manpage -D $RPM_BUILD_ROOT%{_mandir}/ja/man1/`basename $manpage .1`-%{name}.1
  276. done
  277. popd
  278. # demo
  279. install -d %{buildroot}%{_datadir}/%{name}
  280. cp -a demo %{buildroot}%{_datadir}/%{name}
  281. ln -s %{_datadir}/%{name}/demo %{buildroot}%{_jvmdir}
  282. ### font handling
  283. # (anssi) This dir is used with java-1.5.0-sun as well, do not modify to avoid conflicts
  284. install -d %{buildroot}%{fontdir}
  285. ln -s %{_sysconfdir}/java/font.properties %{buildroot}%{_jvmdir}/%{jredir}/lib
  286. # fontconfig.properties
  287. install -m644 %{SOURCE10} %{buildroot}%{_jvmdir}/%{jredir}/lib/fontconfig.Vine5.properties
  288. ln -sf fontconfig.Vine5.properties %{buildroot}%{_jvmdir}/%{jredir}/lib/fontconfig.properties
  289. # These %ghost'd files are created properly in %post -- Rex
  290. touch %{buildroot}%{fontdir}/{fonts.{alias,dir,scale,cache-1},XftCache,encodings.dir}
  291. # fontpath.d symlink
  292. mkdir -p %{buildroot}%_sysconfdir/X11/fontpath.d/
  293. ln -s ../../..%{fontdir} \
  294. %{buildroot}%_sysconfdir/X11/fontpath.d/java:pri=50
  295. # make sure that plugin dir exists so update-alternatives won't fail if mozilla/firefox isn't installed
  296. install -d %{buildroot}%{_libdir}/mozilla/plugins
  297. cd ..
  298. # Most of this shamelessly stolen from redhat's kdebase-2.2.2 specfile
  299. find %{buildroot}%{_jvmdir}/%{jredir} -type d \
  300. | sed 's|'%{buildroot}'|%dir |' > %{name}-%{version}-all.files
  301. find %{buildroot}%{_jvmdir}/%{jredir} -type f -o -type l \
  302. | sed 's|'%{buildroot}'||' >> %{name}-%{version}-all.files
  303. grep plugin %{name}-%{version}-all.files | sort \
  304. > %{name}-%{version}-plugin.files
  305. grep npjp2 %{name}-%{version}-all.files | sort \
  306. >> %{name}-%{version}-plugin.files
  307. grep Jdbc %{name}-%{version}-all.files | sort \
  308. > %{name}-%{version}-jdbc.files
  309. grep -F alsa.so %{name}-%{version}-all.files | sort \
  310. > %{name}-%{version}-alsa.files
  311. cat %{name}-%{version}-all.files \
  312. | grep -v plugin \
  313. | grep -v npjp2 \
  314. | grep -v Jdbc \
  315. | grep -v lib/fonts \
  316. | grep -vF alsa.so \
  317. | grep -v jre/lib/security \
  318. > %{name}-%{version}.files
  319. %ifarch x86_64
  320. %define jreext %{nil}
  321. %else
  322. %define jreext javaws
  323. %endif
  324. %define jrebin keytool orbd policytool rmid rmiregistry servertool tnameserv
  325. %define jreman java %{jreext} %{jrebin}
  326. %ifarch x86_64
  327. %define jdkext %{nil}
  328. %else
  329. %define jdkext HtmlConverter
  330. %endif
  331. %define jdkboth appletviewer extcheck idlj jar jarsigner javadoc javah javap jdb jvisualvm native2ascii rmic serialver jconsole pack200 unpack200 apt jinfo jmap jps jsadebugd jstack jstat jstatd jhat jrunscript schemagen wsgen wsimport xjc
  332. %define jdkman %{jdkboth} javac
  333. %define jdkbin %{jdkboth} %{jdkext}
  334. %define _extension .gz
  335. for man in %{jreman}; do
  336. echo %{_mandir}/man1/${man}-%{name}.1%{_extension} >> %{name}-%{version}.files
  337. echo %{_mandir}/ja/man1/${man}-%{name}.1%{_extension} >> %{name}-%{version}.files
  338. done
  339. rm -f %{name}-%{version}-devel.files
  340. for man in %{jdkman}; do
  341. echo %{_mandir}/man1/${man}-%{name}.1%{_extension} >> %{name}-%{version}-devel.files
  342. echo %{_mandir}/ja/man1/${man}-%{name}.1%{_extension} >> %{name}-%{version}-devel.files
  343. done
  344. %clean
  345. rm -rf %{buildroot}
  346. %post
  347. update-alternatives --install %{_bindir}/java java %{jrebindir}/java %{priority}%{expand:%(for bin in %{jrebin}; do echo -n -e \ \\\\\\n\
  348. --slave %{_bindir}/${bin} ${bin} %{jrebindir}/${bin}; done)}%{expand:%(for man in %{jreman}; do echo -n -e \ \\\\\\n\
  349. --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\
  350. --slave %{_mandir}/ja/man1/${man}.1%{_extension} ${man}%{_extension}.ja %{_mandir}/ja/man1/${man}-%{name}.1%{_extension}; done)} \
  351. %ifnarch x86_64
  352. --slave %{_bindir}/ControlPanel ControlPanel %{jrebindir}/ControlPanel \
  353. --slave %{_datadir}/javaws javaws %{jrebindir}/javaws \
  354. %endif
  355. --slave %{_datadir}/mime/packages/java.xml java.xml %{_jvmdir}/%{jrelnk}/lib/sharedmimeinfo \
  356. --slave %{_jvmdir}/jre jre %{_jvmdir}/%{jrelnk} \
  357. --slave %{_jvmjardir}/jre jre_exports %{_jvmjardir}/%{jrelnk}
  358. update-alternatives \
  359. --install \
  360. %{_jvmdir}/%{jrelnk}/lib/security/local_policy.jar \
  361. jce_%{javaver}_%{origin}_local_policy \
  362. %{_jvmprivdir}/%{name}/jce/vanilla/local_policy.jar \
  363. %{priority} \
  364. --slave \
  365. %{_jvmdir}/%{jrelnk}/lib/security/US_export_policy.jar \
  366. jce_%{javaver}_%{origin}_us_export_policy \
  367. %{_jvmprivdir}/%{name}/jce/vanilla/US_export_policy.jar
  368. update-alternatives --install %{_jvmdir}/jre-%{origin} jre_%{origin} %{_jvmdir}/%{jrelnk} %{priority} \
  369. --slave %{_jvmjardir}/jre-%{origin} jre_%{origin}_exports %{_jvmjardir}/%{jrelnk}
  370. update-alternatives --install %{_jvmdir}/jre-%{javaver} jre_%{javaver} %{_jvmdir}/%{jrelnk} %{priority} \
  371. --slave %{_jvmjardir}/jre-%{javaver} jre_%{javaver}_exports %{_jvmjardir}/%{jrelnk}
  372. # fix broken symlink if it's there
  373. if ! [ -e %{_bindir}/java ]; then
  374. update-alternatives --auto java
  375. fi
  376. %post devel
  377. update-alternatives --install %{_bindir}/javac javac %{sdkbindir}/javac %{priority}%{expand:%(for bin in %{jdkbin}; do echo -n -e \ \\\\\\n\
  378. --slave %{_bindir}/${bin} ${bin} %{sdkbindir}/${bin}; done)}%{expand:%(for man in %{jdkman}; do echo -n -e \ \\\\\\n\
  379. --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\
  380. --slave %{_mandir}/ja/man1/${man}.1%{_extension} ${man}%{_extension}.ja %{_mandir}/ja/man1/${man}-%{name}.1%{_extension}; done)} \
  381. --slave %{_jvmdir}/java java_sdk %{_jvmdir}/%{sdklnk} \
  382. --slave %{_jvmjardir}/java java_sdk_exports %{_jvmjardir}/%{sdklnk}
  383. update-alternatives --install %{_jvmdir}/java-%{origin} java_sdk_%{origin} %{_jvmdir}/%{sdklnk} %{priority} \
  384. --slave %{_jvmjardir}/java-%{origin} java_sdk_%{origin}_exports %{_jvmjardir}/%{sdklnk}
  385. update-alternatives --install %{_jvmdir}/java-%{javaver} java_sdk_%{javaver} %{_jvmdir}/%{sdklnk} %{priority} \
  386. --slave %{_jvmjardir}/java-%{javaver} java_sdk_%{javaver}_exports %{_jvmjardir}/%{sdklnk}
  387. # fix broken symlink if it's there
  388. if ! [ -e %{_bindir}/javac ]; then
  389. update-alternatives --auto javac
  390. fi
  391. %post plugin
  392. update-alternatives --install %{_libdir}/mozilla/plugins/libnpjp2.so libnpjp2.so %{pluginname} %{priority}
  393. %postun plugin
  394. if ! [ -e "%{pluginname}" ]; then
  395. update-alternatives --remove libnpjp2.so %{pluginname}
  396. fi
  397. %postun
  398. if ! [ -e "%{jrebindir}/java" ]; then
  399. update-alternatives --remove java %{jrebindir}/java
  400. update-alternatives --remove \
  401. jce_%{javaver}_%{origin}_local_policy \
  402. %{_jvmprivdir}/%{name}/jce/vanilla/local_policy.jar
  403. update-alternatives --remove jre_%{origin} %{_jvmdir}/%{jrelnk}
  404. update-alternatives --remove jre_%{javaver} %{_jvmdir}/%{jrelnk}
  405. fi
  406. %postun devel
  407. if ! [ -e "%{sdkbindir}/javac" ]; then
  408. update-alternatives --remove javac %{sdkbindir}/javac
  409. update-alternatives --remove java_sdk_%{origin} %{_jvmdir}/%{sdklnk}
  410. update-alternatives --remove java_sdk_%{javaver} %{_jvmdir}/%{sdklnk}
  411. fi
  412. %post fonts
  413. %define fonts LucidaBrightItalic.ttf LucidaSansDemiBold.ttf LucidaTypewriterBold.ttf LucidaBrightDemiItalic.ttf LucidaBrightRegular.ttf LucidaSansRegular.ttf LucidaTypewriterRegular.ttf
  414. update-alternatives \
  415. --install %{fontdir}/LucidaBrightDemiBold.ttf LucidaBrightDemiBold.ttf %{_jvmdir}/%{jredir}/lib/fonts/LucidaBrightDemiBold.ttf %{priority} \
  416. %{expand:%(for font in %{fonts}; do echo -n -e \ \\\\\\n\
  417. --slave %{fontdir}/$font $font %{_jvmdir}/%{jredir}/lib/fonts/$font; done)}
  418. mkfontscale %{fontdir}
  419. mkfontdir %{fontdir}
  420. fc-cache
  421. %postun fonts
  422. if ! [ -e %{_jvmdir}/%{jredir}/lib/fonts/LucidaBrightDemiBold.ttf ]; then
  423. update-alternatives --remove LucidaBrightDemiBold.ttf %{_jvmdir}/%{jredir}/lib/fonts/LucidaBrightDemiBold.ttf
  424. fc-cache
  425. fi
  426. if [ -d %{fontdir} ]; then
  427. mkfontscale %{fontdir}
  428. mkfontdir %{fontdir}
  429. fi
  430. # (Anssi 02/2008) The previous versions of this package were buggy and did
  431. # not always remove the old alternative, causing it to be left enabled,
  432. # leading to broken symlinks.
  433. %posttrans
  434. if ! [ -e %{_bindir}/java ]; then
  435. update-alternatives --auto java
  436. fi
  437. %posttrans devel
  438. if ! [ -e %{_bindir}/javac ]; then
  439. update-alternatives --auto javac
  440. fi
  441. %posttrans plugin
  442. if ! [ -e %{_libdir}/mozilla/plugins/libnpjp2.so ]; then
  443. update-alternatives --auto libnpjp2.so
  444. fi
  445. %posttrans fonts
  446. if ! [ -e %{fontdir}/LucidaBrightDemiBold.ttf ]; then
  447. update-alternatives --auto LucidaBrightDemiBold.ttf
  448. fi
  449. %files -f %{name}-%{version}.files
  450. %defattr(-,root,root,-)
  451. %doc %{jdkbundle}/jre/{COPYRIGHT,LICENSE,README}
  452. %doc %{jdkbundle}/jre/Welcome.html
  453. %dir %{_jvmdir}/%{sdkdir}
  454. %{_jvmdir}/%{sdkdir}/COPYRIGHT
  455. %{_jvmdir}/%{sdkdir}/LICENSE
  456. %{_jvmdir}/%{sdkdir}/THIRDPARTYLICENSEREADME.txt
  457. %{jvmjardir}
  458. %{_jvmdir}/%{jredir}/lib/fonts
  459. %dir %{_jvmdir}/%{jredir}/lib/security
  460. %config(noreplace) %{_jvmdir}/%{jredir}/lib/security/blacklist
  461. %config(noreplace) %{_jvmdir}/%{jredir}/lib/security/cacerts
  462. %config(noreplace) %{_jvmdir}/%{jredir}/lib/security/java.policy
  463. %config(noreplace) %{_jvmdir}/%{jredir}/lib/security/java.security
  464. %config(noreplace) %{_jvmdir}/%{jredir}/lib/security/trusted.libraries
  465. %ifnarch x86_64
  466. %config(noreplace) %{_jvmdir}/%{jredir}/lib/security/javaws.policy
  467. %endif
  468. %{_jvmdir}/%{jredir}/lib/security/local_policy.jar
  469. %{_jvmdir}/%{jredir}/lib/security/US_export_policy.jar
  470. %{_jvmdir}/%{jrelnk}
  471. %{_jvmjardir}/%{jrelnk}
  472. %{_jvmprivdir}/*
  473. %ifnarch x86_64
  474. %{_datadir}/applications/*.desktop
  475. %exclude %{_datadir}/applications/%{name}-jconsole.desktop
  476. %{_datadir}/pixmaps/*.png
  477. %endif
  478. %dir %{_datadir}/mime
  479. %dir %{_datadir}/mime/packages
  480. %files devel -f %{name}-%{version}-devel.files
  481. %defattr(-,root,root,-)
  482. %doc %{jdkbundle}/{COPYRIGHT,LICENSE,README.html}
  483. %dir %{_jvmdir}/%{sdkdir}/bin
  484. %dir %{_jvmdir}/%{sdkdir}/include
  485. %dir %{_jvmdir}/%{sdkdir}/lib
  486. %{_jvmdir}/%{sdkdir}/bin/*
  487. %{_jvmdir}/%{sdkdir}/include/*
  488. %{_jvmdir}/%{sdkdir}/lib/*
  489. %{_jvmdir}/%{sdklnk}
  490. %{_jvmjardir}/%{sdklnk}
  491. %ifnarch x86_64
  492. %{cgibindir}/java-rmi-%{version}.cgi
  493. %{_datadir}/applications/%{name}-jconsole.desktop
  494. %endif
  495. %files src
  496. %defattr(-,root,root,-)
  497. %{_jvmdir}/%{sdkdir}/src.zip
  498. %{_prefix}/src/%{name}-%{version}.zip
  499. %files demo
  500. %defattr(-,root,root,-)
  501. %dir %{_datadir}/%{name}
  502. %{_datadir}/%{name}/demo
  503. %{_jvmdir}/demo
  504. %files alsa -f %{name}-%{version}-alsa.files
  505. %defattr(-,root,root,-)
  506. %files jdbc -f %{name}-%{version}-jdbc.files
  507. %defattr(-,root,root,-)
  508. %files plugin -f %{name}-%{version}-plugin.files
  509. %defattr(-,root,root,-)
  510. %dir %{_libdir}/mozilla
  511. %dir %{_libdir}/mozilla/plugins
  512. %files fonts
  513. %defattr(0644,root,root,0755)
  514. %{_jvmdir}/%{jredir}/lib/fonts/*.ttf
  515. %dir %{fontdir}
  516. %config(noreplace) %{fontdir}/fonts.alias
  517. %ghost %{fontdir}/fonts.dir
  518. %ghost %{fontdir}/fonts.scale
  519. %ghost %{fontdir}/fonts.cache-1
  520. %ghost %{fontdir}/XftCache
  521. %ghost %{fontdir}/encodings.dir
  522. %{_sysconfdir}/X11/fontpath.d/java:pri=50
  523. %changelog
  524. * Tue Apr 05 2011 NAKAMURA Kenta <kenta@vinelinux.org> 1.6.0.24-1
  525. - update to 6u24
  526. * Tue Dec 07 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.0.22-2
  527. - use libnpjp2.so for java browser plugin instead of libjavaplugin_oji.so
  528. * Mon Nov 22 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.0.22-1
  529. - update to 6u22
  530. * Wed Aug 18 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.0.21-1
  531. - update to 6u21
  532. - update to jdk-6-dlj-ubuntu r364
  533. * Wed Apr 21 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.6.0.20-1
  534. - update to 6u20
  535. * Sat Apr 10 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.6.0.19-1
  536. - update to 6u19
  537. * Fri Nov 06 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.0.17-1
  538. - update to 6u17
  539. * Wed Aug 05 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.0.15-1
  540. - update to 6u15
  541. * Tue Jun 09 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.0.14-1
  542. - update to 6u14
  543. - add fontconfig.properties
  544. - enable plugin on x86_64
  545. * Thu Apr 30 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.6.0.13-1
  546. - update to 6u13
  547. - run update-alternatives --auto at %%post section if necessary
  548. * Fri Jul 11 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.0.07-1
  549. - update to 6u7
  550. * Sun May 04 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.0.06-2
  551. - change Group: to Development/Languages
  552. * Sun Apr 20 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.0.06-1
  553. - update to 6u6
  554. * Wed Apr 16 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.0.05-1
  555. - initial build for Vine Linux based on Mandriva package
  556. * Thu Mar 27 2008 Anssi Hannula <anssi@mandriva.org> 1.6.0.05-1mdv2008.1
  557. + Revision: 190664
  558. - new version
  559. * Sat Mar 01 2008 Anssi Hannula <anssi@mandriva.org> 1.6.0.04-1.0.2mdv2008.1
  560. + Revision: 177366
  561. - add workarounds for buggy scripts of earlier versions
  562. * Wed Feb 06 2008 Anssi Hannula <anssi@mandriva.org> 1.6.0.04-1.0.1mdv2008.1
  563. + Revision: 163152
  564. - add proper requires on update-alternatives
  565. - adapt postun update-alternatives calls to alternatives policy (#37507)
  566. * Tue Jan 22 2008 David Walluck <walluck@mandriva.org> 1.6.0.04-1.0.0mdv2008.1
  567. + Revision: 156375
  568. - fix mixed use of tabs and spaces
  569. - 6u4
  570. - ubuntu r273
  571. - add back BuildRoot
  572. - fix tabs
  573. - jdk-6-dlj-ubuntu 265
  574. + Thierry Vignaud <tvignaud@mandriva.com>
  575. - kill re-definition of %%buildroot on Pixel's request
  576. * Thu Nov 01 2007 David Walluck <walluck@mandriva.org> 1.6.0.03-1.0.1mdv2008.1
  577. + Revision: 104748
  578. - add jdk-6-dlj-ubuntu-r258.tar.bz2
  579. - 1.6.0.03
  580. - jdk-6-dlj-ubuntu-r258
  581. * Thu Sep 27 2007 Anssi Hannula <anssi@mandriva.org> 1.6.0.02-1.0.9mdv2008.0
  582. + Revision: 93208
  583. - make sure all installed subpackages are of compatible arch
  584. * Sun Sep 16 2007 Anssi Hannula <anssi@mandriva.org> 1.6.0.02-1.0.8mdv2008.0
  585. + Revision: 87491
  586. - provide obsoleted packages
  587. - obsolete j2sdk as well, encountered in x86_64 restricted media
  588. * Sat Sep 15 2007 Anssi Hannula <anssi@mandriva.org> 1.6.0.02-1.0.7mdv2008.0
  589. + Revision: 86313
  590. - remove icon extension from .desktop
  591. - add missing jre_sun and jre_1.6.0 alternatives
  592. - obsolete the sun java packages in the restricted repository (Anne Nicolas)
  593. * Mon Aug 20 2007 Herton Ronaldo Krzesinski <herton@mandriva.com.br> 1.6.0.02-1.0.6mdv2008.0
  594. + Revision: 68046
  595. - Removed menu and directory xdg files (java-sun-directory.xdg,
  596. java-sun-menu.xdg), they duplicate current menu entries shown and are
  597. not needed by new mandriva menu structure (Closes: #32676).
  598. * Tue Aug 07 2007 Anssi Hannula <anssi@mandriva.org> 1.6.0.02-1.0.5mdv2008.0
  599. + Revision: 59958
  600. - use ExclusiveArch instead of BuildArch
  601. * Fri Aug 03 2007 Anssi Hannula <anssi@mandriva.org> 1.6.0.02-1.0.4mdv2008.0
  602. + Revision: 58548
  603. - fix jre alternatives to point to the jre bindir instead of sdk bindir
  604. (fixes bug #32241)
  605. * Wed Aug 01 2007 Anssi Hannula <anssi@mandriva.org> 1.6.0.02-1.0.3mdv2008.0
  606. + Revision: 57646
  607. - fix Web Start entry to not start Cache Viewer but to run the jnlp file
  608. presented as argument, and create a separate menu entry for Cache Viewer
  609. (fixes bug #31347)
  610. * Tue Jul 31 2007 Herton Ronaldo Krzesinski <herton@mandriva.com.br> 1.6.0.02-1.0.2mdv2008.0
  611. + Revision: 57069
  612. - Bump release to rebuild because of build system upload error.
  613. * Tue Jul 24 2007 David Walluck <walluck@mandriva.org> 1.6.0.02-1.0.1mdv2008.0
  614. + Revision: 54885
  615. - 1.6.0u2
  616. - remove java.sh and java.csh scripts
  617. * Mon Jul 09 2007 Ademar de Souza Reis Jr <ademar@mandriva.com.br> 1.6.0.0-9mdv2008.0
  618. + Revision: 50623
  619. - fix fontconfig support (call fc-cache on %%post{,un})
  620. - fontpath.d conversion (#31756)
  621. (chkfontpath was not being called, only the dependency was
  622. there, which I assume was a bug)
  623. * Mon Jun 25 2007 Thierry Vignaud <tvignaud@mandriva.com> 1.6.0.0-8mdv2008.0
  624. + Revision: 44016
  625. - rebuild for missing package
  626. * Thu Jun 21 2007 Thierry Vignaud <tvignaud@mandriva.com> 1.6.0.0-7mdv2008.0
  627. + Revision: 42292
  628. - fix group
  629. * Tue Mar 20 2007 Per Øyvind Karlsen <pkarlsen@mandriva.com> 1.6.0.0-6mdv2007.1
  630. + Revision: 146976
  631. - do not run update-alternatives --remove during upgrade (fixes #29705)
  632. - kill off java.desktop, there already exists matching and more correct
  633. mime types (fixes #27739)
  634. * Wed Mar 14 2007 Per Øyvind Karlsen <pkarlsen@mandriva.com> 1.6.0.0-4mdv2007.1
  635. + Revision: 143782
  636. - fix category in menu item
  637. * Wed Feb 21 2007 Per Øyvind Karlsen <pkarlsen@mandriva.com> 1.6.0.0-3mdv2007.1
  638. + Revision: 124137
  639. - bump release, last seems to get stuck in queue..
  640. - add environment variables
  641. - set JAVA_HOME
  642. - make version in menu category consistent with Sun's
  643. * Wed Feb 21 2007 Per Øyvind Karlsen <pkarlsen@mandriva.com> 1.6.0.0-2mdv2007.1
  644. + Revision: 123808
  645. - add sources :)
  646. - fix menu
  647. - add mime type
  648. - provide jdk
  649. * Thu Feb 15 2007 Per Øyvind Karlsen <pkarlsen@mandriva.com> 1.6.0.0-1mdv2007.1
  650. + Revision: 121247
  651. - add desktop-file-utils to buildrequires
  652. - remove lzma from buildrequires
  653. - use bzip2 in stead of lzma (lzma still not in main..)
  654. fix installation of menu
  655. - ensure that plugins dir exists for update-alternatives
  656. - fix update-alternatives removal for plugin
  657. - remove kaffe conflict
  658. - Import java-1.6.0-sun