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.

133 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 --enable-default-toolkit=gtk2
  56. export BUILD_OFFICIAL=1
  57. export MOZILLA_OFFICIAL=1
  58. mk_add_options BUILD_OFFICIAL=1
  59. mk_add_options MOZILLA_OFFICIAL=1
  60. EOT
  61. }
  62. moz_build() {
  63. eval_config_command $( eval echo $confopt )
  64. eval $MAKE -f client.mk build
  65. }
  66. moz_install() {
  67. eval $MAKE install
  68. }
  69. moz_main() {
  70. # maybe obsolete ... to be checked
  71. export MOZILLA_OFFICIAL=1 BUILD_OFFICIAL=1
  72. export MOZILLA_FIVE_HOME=$libdir/mozilla-$ver
  73. moz_fixup
  74. moz_implant_version
  75. moz_configure
  76. cat >> .mozconfig <<-EOT
  77. ac_add_options --enable-calendar
  78. ac_add_options --with-extensions
  79. ac_add_options --enable-extensions=default,venkman,inspector
  80. ac_add_options --enable-jsd
  81. ac_add_options --enable-mathml
  82. ac_add_options --enable-crypto
  83. ac_add_options --enable-module=psm
  84. ac_add_options --enable-svg
  85. ac_add_options --enable-svg-renderer-libart
  86. mk_add_options MOZ_INTERNAL_LIBART_LGPL=1
  87. MOZ_INTERNAL_LIBART_LGPL=1
  88. EOT
  89. moz_build
  90. moz_install
  91. echo "Copy all mozilla include files" \
  92. "(required for building galeon, evolution, etc.) ..."
  93. cp -v xpcom/base/nscore.h $includedir/mozilla-$ver/xpcom/
  94. cp -v xpcom/glue/nsDebug.h $includedir/mozilla-$ver/xpcom/
  95. cp -rL dist/include/* $includedir/mozilla-$ver/
  96. cp -rL dist/public/* $includedir/mozilla-$ver/
  97. echo "Run the component registration ..."
  98. cd $MOZILLA_FIVE_HOME
  99. LD_LIBRARY_PATH=. ./regxpcom
  100. LD_LIBRARY_PATH=. ./regchrome
  101. echo "Creating /etc/profile.d/mozilla ..."
  102. cat <<- EOT > $root/etc/profile.d/mozilla
  103. export MOZILLA_FIVE_HOME=$root/usr/lib/mozilla-$ver
  104. EOT
  105. echo "Creating library symlinks ..."
  106. cd $libdir
  107. for i in ldap50 nspr4 nss3 plc4 plds4 prldap50 smime3 softokn3 ssl3 ; do
  108. ln -sf $libdir/mozilla-$ver/lib${i}.so $libdir/lib${i}.so
  109. done
  110. }
  111. # cleanups in this fat directory are a bit expensive
  112. nocvsinsrcdir=0
  113. chownsrcdir=0
  114. custmain="moz_main"