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.

154 lines
4.0 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/jsaw/typo3/typo3.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. #FIXME: I need apache's $localstatedir
  23. if [ "$ROCKCFG_PKG_APACHE_PREFIX" ] ; then
  24. apacheprefix="$ROCKCFG_PKG_APACHE_PREFIX"
  25. if [ "$apacheprefix" = "/usr" ]; then
  26. apachelocalstatedir="var/apache"
  27. else
  28. apachelocalstatedir="var/$apacheprefix"
  29. fi
  30. else
  31. apachelocalstatedir="var/opt/apache"
  32. fi
  33. TYPO3BASE=$apachelocalstatedir/lib
  34. TYPO3SRC=$TYPO3BASE/typo3_src
  35. #FIXME should be config option
  36. APACHEUSER=http
  37. APACHEGROUP=http
  38. typo3_random_md5() {
  39. dd bs=64 count=1 if=/dev/random 2>/dev/null | md5sum | cut -f1 -d ' '
  40. }
  41. typo3_doc_files="ChangeLog GPL.txt LICENSE.txt Package.txt README.txt INSTALL.txt Package.txt"
  42. typo3_doc() {
  43. local each
  44. echo "Creating documentation..."
  45. for each in $typo3_doc_files; do
  46. [ -f $each ] && cp -avP $each $docdir/
  47. done
  48. }
  49. # this is called in the testsite/dummy/quickstart directory
  50. typo3_src_links() {
  51. # main typo3 installation
  52. ln -svf /$TYPO3SRC typo3_src
  53. for i in t3lib tslib typo3; do
  54. ln -svf typo3_src/$i
  55. done
  56. ln -svf tslib/media
  57. ln -svf tslib/showpic.php
  58. ln -svf tslib/index_ts.php index.php
  59. }
  60. # this is called in the testsite/dummy/quickstart directory
  61. typo3_access() {
  62. chown daemon.$APACHEGROUP . -R
  63. mkdir -p typo3temp/ \
  64. typo3/{temp,ext} \
  65. typo3conf/ext \
  66. fileadmin/_temp_ \
  67. uploads/{pics,media,tf}
  68. chmod 0750 typo3temp/ \
  69. typo3/{temp,ext} \
  70. typo3conf/{,ext,localconf.php} \
  71. fileadmin/{,_temp_} \
  72. uploads/{,pics,media,tf}
  73. chown $APACHEUSER.$APACHEGROUP typo3temp/ \
  74. typo3/{temp,ext} \
  75. typo3conf/{,ext,localconf.php} \
  76. fileadmin/{,_temp_} \
  77. uploads/{,pics,media,tf}
  78. }
  79. typo3_site() {
  80. local each
  81. echo "Installing files..."
  82. rm -rf $root/$TYPO3BASE/typo3-$1
  83. for each in fileadmin typo3conf typo3temp uploads; do
  84. mkdir -p $root/$TYPO3BASE/typo3-$1/$each
  85. if [ ! "`echo $builddir/$1-$ver/$each/*`" = "$builddir/$1-$ver/$each/*" ]; then
  86. cp -avP $builddir/$1-$ver/$each/* $root/$TYPO3BASE/typo3-$1/$each/
  87. fi
  88. done
  89. cp -avP $builddir/$1-$ver/clear.gif $root/$TYPO3BASE/typo3-$1/
  90. cp -avP $builddir/$1-$ver/_.htaccess $root/$TYPO3BASE/typo3-$1/.htaccess
  91. (
  92. cd $root/$TYPO3BASE/typo3-$1
  93. typo3_src_links
  94. typo3_access
  95. )
  96. typo3_doc
  97. cp -avP $confdir/README.txt $docdir/README.ROCK-Linux
  98. }
  99. ###################################################################################
  100. typo3_testsite() {
  101. typo3_site testsite
  102. }
  103. typo3_dummy() {
  104. typo3_site dummy
  105. }
  106. typo3_quickstart() {
  107. typo3_site quickstart
  108. }
  109. typo3_src() {
  110. local each
  111. echo "Installing files..."
  112. rm -rf $root/$TYPO3SRC
  113. for each in misc t3lib typo3; do
  114. mkdir -p $root/$TYPO3SRC/$each
  115. cp -avP $builddir/typo3_src-$ver/$each/* $root/$TYPO3SRC/$each/
  116. done
  117. ln -sv typo3/sysext/cms/tslib $root/$TYPO3SRC/tslib
  118. # correct user/group
  119. chown daemon.$APACHEGROUP $root/$TYPO3SRC -R
  120. chown $APACHEUSER.$APACHEGROUP $root/$TYPO3SRC/typo3/ext
  121. chmod o-rwx $root/$TYPO3SRC -R
  122. # create typo3_src/typo3/install/.htaccess
  123. mv -vf $root/$TYPO3SRC/typo3/install/_.htaccess \
  124. $root/$TYPO3SRC/typo3/install/.htaccess
  125. sed -i "s,/www,/$TYPO3SRC/typo3/install," $root/$TYPO3SRC/typo3/install/.htaccess
  126. # documentation
  127. typo3_doc
  128. }
  129. custmain=typo3_${xpkg#typo3-}
  130. chownsrcdir=0
  131. createdocs=0