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.

148 lines
4.1 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 - 2006 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 --libdir=$root/$libdir
  47. ac_add_options --sysconfdir=$root/etc/$pkg
  48. ac_add_options --localstatedir=$root/var
  49. ac_add_options --host=$arch_target
  50. ac_add_options --disable-debug
  51. ac_add_options --enable-optimize
  52. ac_add_options --disable-dtd-debug
  53. ac_add_options --disable-tests
  54. ac_add_options --disable-pedantic
  55. ac_add_options --enable-xft
  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. for lib in zlib libjpeg libpng libmng nspr ; do
  63. if pkginstalled $lib ] ; then
  64. echo ac_add_options --with-system-${lib#lib} >> .mozconfig
  65. fi
  66. done
  67. }
  68. moz_build() {
  69. eval_config_command $( eval echo $confopt )
  70. eval $MAKE -f client.mk build
  71. }
  72. moz_install() {
  73. eval $MAKE install
  74. }
  75. moz_register() {
  76. echo "Run the component registration ..."
  77. pushd $MOZILLA_FIVE_HOME
  78. LD_LIBRARY_PATH=. ./regxpcom
  79. if [ $pkg = "mozilla" ]; then
  80. LD_LIBRARY_PATH=. ./regchrome
  81. fi
  82. popd
  83. }
  84. moz_main() {
  85. # maybe obsolete ... to be checked
  86. export MOZILLA_OFFICIAL=1 BUILD_OFFICIAL=1
  87. export MOZILLA_FIVE_HOME=$libdir/mozilla-$ver
  88. moz_fixup
  89. moz_implant_version
  90. moz_configure
  91. cat >> .mozconfig <<-EOT
  92. ac_add_options --enable-calendar
  93. ac_add_options --with-extensions
  94. ac_add_options --enable-extensions=default,venkman,inspector
  95. ac_add_options --enable-jsd
  96. ac_add_options --enable-mathml
  97. ac_add_options --enable-crypto
  98. ac_add_options --enable-module=psm
  99. EOT
  100. moz_build
  101. moz_install
  102. moz_register
  103. echo "Copy all mozilla include files" \
  104. "(required for building galeon, evolution, etc.) ..."
  105. cp -v xpcom/base/nscore.h $includedir/mozilla-$ver/xpcom/
  106. cp -v xpcom/glue/nsDebug.h $includedir/mozilla-$ver/xpcom/
  107. cp -rL dist/include/* $includedir/mozilla-$ver/
  108. cp -rL dist/public/* $includedir/mozilla-$ver/
  109. rm -f $includedir/mozilla
  110. ln -s mozilla-$ver $includedir/mozilla
  111. echo "Creating /etc/profile.d/mozilla ..."
  112. cat <<- EOT > $root/etc/profile.d/mozilla
  113. export MOZILLA_FIVE_HOME=$MOZILLA_FIVE_HOME
  114. EOT
  115. echo "Creating library symlinks ..."
  116. cd $libdir
  117. for i in ldap50 nspr4 nss3 plc4 plds4 prldap50 smime3 softokn3 ssl3 ; do
  118. ln -sf $libdir/mozilla-$ver/lib${i}.so $libdir/lib${i}.so
  119. done
  120. }
  121. # cleanups in this fat directory are a bit expensive
  122. nocvsinsrcdir=0
  123. chownsrcdir=0
  124. custmain="moz_main"
  125. # do not depend on the already installed modules
  126. var_append flistrfilter "|" ".*regxpcom.*$libdir/$pkg.*/plugins/.*"