#!/bin/bash # W-Agora for Apache-1.3+PHP4 # BuildScript for Plamo Linux 3.1 # by Jun Kuwamura on 2002-05-24 # require: # apache_mod_ssl-2.8.16-1.3.29 # php-4.3.4 # postgresql-7.3.1 # VERSION=4.1.5 SRC_URI="http://www.w-agora.net/downloads/w-agora-${VERSION}-php.tar.gz" #PAT1_URI="http://www.linet.gr.jp/~juk/plamo/parts/srcs/www/w-agora/w-agora-4.1.4_dbsearch.diff.gz" #PAT2_URI="http://www.linet.gr.jp/~juk/plamo/parts/srcs/www/w-agora/w-agora-4.1.4_japanese.diff.gz" #PAT3_URI="http://www.linet.gr.jp/~juk/plamo/parts/srcs/www/w-agora/w-agora-4.1.4_japanese2.tgz" PAC_DIR=/opt/Package/WWW/Sample SRC_FILE=${SRC_URI##*/} PAT_FILE=w-agora-4.1.5_ja-update.tgz PAT1_FILE=${PAT1_URI##*/} PAT2_FILE=${PAT2_URI##*/} PAT3_FILE=${PAT3_URI##*/} PAC_NAME="${SRC_FILE%%.tar.gz}" SRC_DIR=/site/pub/archive/www/php/WAgora SYS_NAME="i386" REL="2" CUSTOM_DIR=/opt/Package/wagora umask 022 CWD=`pwd` WORK=$CWD/work rm -rf $WORK/* mkdir -p $WORK export LANG=C export CFLAGS="-O2" export PATH=$PATH:/usr/X11R6/bin if [ ! -f $SRC_DIR/$SRC_FILE ]; then (cd $SRC_DIR; wget $SRC_URI); fi #if [ ! -f $SRC_DIR/$PAT1_FILE ]; then # (cd $SRC_DIR; wget $PAT1_URI); #fi #if [ ! -f $SRC_DIR/$PAT2_FILE ]; then # (cd $SRC_DIR; wget $PAT2_URI); #fi #if [ ! -f $SRC_DIR/$PAT3_FILE ]; then # (cd $SRC_DIR; wget $PAT3_URI); #fi cd $WORK mkdir -p install sed -e "s/VERSION/$VERSION/g" $CUSTOM_DIR/doinst.sh > install/doinst.sh mkdir -p opt/apache/htdocs cd opt/apache/htdocs tar xvfz $SRC_DIR/$SRC_FILE cd w-agora/ tar xvfz $CUSTOM_DIR/$PAT_FILE #zcat $SRC_DIR/$PAT1_FILE | patch -p1 #zcat $SRC_DIR/$PAT2_FILE | patch -p1 #tar xvfz $SRC_DIR/$PAT3_FILE chown -R wadm.apache . chmod -R g+w conf/ forums/ #cp $CUSTOM_DIR/create_agora_db . DOC_DIR=/usr/doc/$PAC_NAME mkdir -p $WORK/$DOC_DIR mv README doc/ cp -p doc/* $WORK/$DOC_DIR chown -R root.root $WORK/$DOC_DIR chmod -R a+rX,go-w $WORK/$DOC_DIR cd $WORK echo "n " | installpkg -m $PAC_NAME mv ${PAC_NAME}.tgz $PAC_DIR/${PAC_NAME}-${REL}.tgz echo "$PAC_DIR/${PAC_NAME}-${REL}.tgz ... done" cd $CWD