mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

137 lines
3.8 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/x11/mozilla/mozilla.conf
  9. # ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; either version 2 of the License, or
  14. # (at your option) any later version. A copy of the GNU General Public
  15. # License can be found at Documentation/COPYING.
  16. #
  17. # Many people helped and are helping developing ROCK Linux. Please
  18. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  19. # file for details.
  20. #
  21. # --- ROCK-COPYRIGHT-NOTE-END ---
  22. moz_fixup() {
  23. # clear a possible existing .mozconfig
  24. echo -n "" > .mozconfig
  25. # fix the milestone.txt - if present and needed
  26. if [ -f config/milestone.txt ] ; then
  27. if ! grep -q $ver config/milestone.txt ; then
  28. echo "Warning: Wrong version info in milestone.txt - fixup."
  29. sed -i '/^[^#].*/d' config/milestone.txt
  30. echo "$ver" >> config/milestone.txt
  31. fi
  32. fi
  33. }
  34. moz_implant_version() {
  35. # replace the 00... build-id with s.th. useful
  36. sed -i "s,0000000000,ROCK Linux - $rockver," xpfe/global/build.dtd.in
  37. }
  38. moz_configure() {
  39. cat >> .mozconfig <<-EOT
  40. # sh
  41. # Build configuration script
  42. # Options for client.mk.
  43. # mk_add_options MOZ_MAKE_FLAGS=-j4
  44. # Options for 'configure' (same as command-line options).
  45. ac_add_options --prefix=$root/$prefix
  46. ac_add_options --sysconfdir=$root/etc/$pkg
  47. ac_add_options --localstatedir=$root/var
  48. ac_add_options --host=$arch_target
  49. ac_add_options --disable-debug
  50. ac_add_options --enable-optimize
  51. ac_add_options --disable-dtd-debug
  52. ac_add_options --disable-tests
  53. ac_add_options --disable-pedantic
  54. ac_add_options --enable-xft
  55. ac_add_options --disable-freetype2
  56. ac_add_options --enable-default-toolkit=gtk2
  57. export BUILD_OFFICIAL=1
  58. export MOZILLA_OFFICIAL=1
  59. mk_add_options BUILD_OFFICIAL=1
  60. mk_add_options MOZILLA_OFFICIAL=1
  61. EOT
  62. }
  63. moz_build() {
  64. eval_config_command $( eval echo $confopt )
  65. eval $MAKE -f client.mk build
  66. }
  67. moz_install() {
  68. eval $MAKE install
  69. }
  70. moz_register() {
  71. echo "Run the component registration ..."
  72. pushd $MOZILLA_FIVE_HOME
  73. LD_LIBRARY_PATH=. ./regxpcom
  74. LD_LIBRARY_PATH=. ./regchrome
  75. popd
  76. }
  77. moz_main() {
  78. # maybe obsolete ... to be checked
  79. export MOZILLA_OFFICIAL=1 BUILD_OFFICIAL=1
  80. export MOZILLA_FIVE_HOME=$libdir/mozilla-$ver
  81. moz_fixup
  82. moz_implant_version
  83. moz_configure
  84. cat >> .mozconfig <<-EOT
  85. ac_add_options --enable-calendar
  86. ac_add_options --with-extensions
  87. ac_add_options --enable-extensions=default,venkman,inspector
  88. ac_add_options --enable-jsd
  89. ac_add_options --enable-mathml
  90. ac_add_options --enable-crypto
  91. ac_add_options --enable-module=psm
  92. EOT
  93. moz_build
  94. moz_install
  95. moz_register
  96. echo "Copy all mozilla include files" \
  97. "(required for building galeon, evolution, etc.) ..."
  98. cp -v xpcom/base/nscore.h $includedir/mozilla-$ver/xpcom/
  99. cp -v xpcom/glue/nsDebug.h $includedir/mozilla-$ver/xpcom/
  100. cp -rL dist/include/* $includedir/mozilla-$ver/
  101. cp -rL dist/public/* $includedir/mozilla-$ver/
  102. rm -f $includedir/mozilla
  103. ln -s mozilla-$ver $includedir/mozilla
  104. echo "Creating /etc/profile.d/mozilla ..."
  105. cat <<- EOT > $root/etc/profile.d/mozilla
  106. export MOZILLA_FIVE_HOME=$MOZILLA_FIVE_HOME
  107. EOT
  108. echo "Creating library symlinks ..."
  109. cd $libdir
  110. for i in ldap50 nspr4 nss3 plc4 plds4 prldap50 smime3 softokn3 ssl3 ; do
  111. ln -sf $libdir/mozilla-$ver/lib${i}.so $libdir/lib${i}.so
  112. done
  113. }
  114. # cleanups in this fat directory are a bit expensive
  115. nocvsinsrcdir=0
  116. chownsrcdir=0
  117. custmain="moz_main"