CC-1695 Remove Campcaster Studio and make install easier
This commit is contained in:
parent
89a138b5f8
commit
81d499060b
478 changed files with 63037 additions and 0 deletions
259
backend/etc/Makefile.in
Normal file
259
backend/etc/Makefile.in
Normal file
|
@ -0,0 +1,259 @@
|
|||
#-------------------------------------------------------------------------------
|
||||
# StorageServer - file storage component
|
||||
# Copyright (c) 2010 Sourcefabric O.P.S.
|
||||
#
|
||||
# This file is part of the Campcaster project.
|
||||
#
|
||||
# Campcaster is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Campcaster is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Campcaster; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#
|
||||
# @configure_input@
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# General command definitions
|
||||
#-------------------------------------------------------------------------------
|
||||
SHELL = /bin/bash
|
||||
MKDIR = mkdir -p
|
||||
RM = rm -f
|
||||
RMDIR = rm -rf
|
||||
DOXYGEN = doxygen
|
||||
CP = cp -rP
|
||||
SED = sed
|
||||
ECHO = echo
|
||||
CAT = cat
|
||||
PHP = php
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Misc
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
MODULE_NAME = storageServer
|
||||
TAR_C = tar -cj --exclude .svn --exclude '*~' -C ${BASE_DIR} -f
|
||||
DIST_EXT = .tgz
|
||||
DATE = `date +%y%m%d`
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Basic directory and file definitions
|
||||
#-------------------------------------------------------------------------------
|
||||
#BASE_DIR = @builddir@
|
||||
BASE_DIR = .
|
||||
BIN_DIR = ${BASE_DIR}/bin
|
||||
DOC_DIR = ${BASE_DIR}/doc
|
||||
DOXYGEN_DIR = ${DOC_DIR}/doxygen
|
||||
ETC_DIR = ${BASE_DIR}/etc
|
||||
INCLUDE_DIR = ${BASE_DIR}/include
|
||||
LIB_DIR = ${BASE_DIR}/lib
|
||||
SRC_DIR = ${BASE_DIR}/src
|
||||
TMP_DIR = ${BASE_DIR}/tmp
|
||||
VAR_DIR = ${BASE_DIR}/var
|
||||
|
||||
prefix = @prefix@
|
||||
|
||||
USR_DIR = ${prefix}
|
||||
USR_INCLUDE_DIR = ${USR_DIR}/include
|
||||
USR_LIB_DIR = ${USR_DIR}/lib
|
||||
USR_VAR_DIR = ${USR_DIR}/var
|
||||
|
||||
DOXYGEN_CONFIG = ${ETC_DIR}/doxygen.config
|
||||
|
||||
PHP_DIR = ${VAR_DIR}
|
||||
INSTALL_DIR = ${PHP_DIR}/install
|
||||
STOR_DIR = ${PHP_DIR}/stor
|
||||
ACCESS_DIR = ${PHP_DIR}/access
|
||||
TRANS_DIR = ${PHP_DIR}/trans
|
||||
BUFF_DIR = ${STOR_DIR}/buffer
|
||||
TEST_RUNNER = ${PHP_DIR}/xmlrpc/testRunner.sh
|
||||
|
||||
DEST_DIR = ${USR_VAR_DIR}/Campcaster/storageServer
|
||||
DEST_VAR_DIR = ${DEST_DIR}/var
|
||||
DEST_BIN_DIR = ${DEST_DIR}/bin
|
||||
|
||||
HOSTNAME = @HOSTNAME@
|
||||
APACHE_GROUP = @APACHE_GROUP@
|
||||
WWW_PORT = @WWW_PORT@
|
||||
DB_SERVER = @DB_SERVER@
|
||||
DATABASE = @DATABASE@
|
||||
DB_USER = @DB_USER@
|
||||
DB_PASSWORD = @DB_PASSWORD@
|
||||
SCHEDULER_PORT = @SCHEDULER_PORT@
|
||||
WWW_DOCROOT = @WWW_DOCROOT@
|
||||
PHP_URL_PREFIX = @URL_PREFIX@
|
||||
|
||||
SCHEDULER_URL_PREFIX =
|
||||
SCHEDULER_XML_RPC_PREFIX = RC2
|
||||
|
||||
USR_LIB_DIR_S=$(shell ${ECHO} ${USR_LIB_DIR} | ${SED} -e "s/\//\\\\\\\\\//g")
|
||||
PHP_URL_PREFIX_S=$(shell ${ECHO} ${PHP_URL_PREFIX} | ${SED} -e "s/\//\\\\\\\\\//g")
|
||||
|
||||
REPLACE_SED_STRING="s/ls_lib_dir/${USR_LIB_DIR_S}/; \
|
||||
s/ls_dbuser/${DB_USER}/; \
|
||||
s/ls_dbpassword/${DB_PASSWORD}/; \
|
||||
s/ls_dbserver/${DB_SERVER}/; \
|
||||
s/ls_database/${DATABASE}/; \
|
||||
s/ls_apache_group/${APACHE_GROUP}/; \
|
||||
s/ls_storageUrlPath/\/${PHP_URL_PREFIX_S}\/storageServer\/var/; \
|
||||
s/ls_php_host/${HOSTNAME}/; \
|
||||
s/ls_php_port/${WWW_PORT}/; \
|
||||
s/ls_archiveUrlPath/\/${PHP_URL_PREFIX_S}\/archiveServer\/var/; \
|
||||
s/ls_scheduler_urlPrefix/${SCHEDULER_URL_PREFIX}/; \
|
||||
s/ls_scheduler_xmlRpcPrefix/${SCHEDULER_XML_RPC_PREFIX}/; \
|
||||
s/ls_scheduler_host/${HOSTNAME}/; \
|
||||
s/ls_scheduler_port/${SCHEDULER_PORT}/;"
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Configuration parameters
|
||||
#-------------------------------------------------------------------------------
|
||||
#CPPFLAGS = @CPPFLAGS@
|
||||
#CXXFLAGS = @CXXFLAGS@ @DEFS@ -I${USR_INCLUDE_DIR} -I${INCLUDE_DIR} -I${TMP_DIR}\
|
||||
# -pedantic -Wall
|
||||
#LDFLAGS = @LDFLAGS@ -L${USR_LIB_DIR} -L${LIB_DIR}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Dependencies
|
||||
#-------------------------------------------------------------------------------
|
||||
#HELLO_LIB_OBJS = ${TMP_DIR}/Hello.o
|
||||
#TEST_RUNNER_OBJS = ${TMP_DIR}/HelloTest.o ${TMP_DIR}/TestRunner.o
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Targets
|
||||
#-------------------------------------------------------------------------------
|
||||
.PHONY: all dir_setup doc clean docclean depclean distclean dist install
|
||||
.PHONY: db_init db_clean testonly transtest storage reset
|
||||
.PHONY: copy_files create_database init_database
|
||||
|
||||
all:
|
||||
|
||||
doc:
|
||||
${DOXYGEN} ${DOXYGEN_CONFIG}
|
||||
|
||||
clean: db_clean
|
||||
${RMDIR} ${STOR_DIR}
|
||||
${RMDIR} ${ACCESS_DIR}
|
||||
${RMDIR} ${TRANS_DIR}
|
||||
|
||||
docclean:
|
||||
${RMDIR} ${DOXYGEN_DIR}/html
|
||||
|
||||
depclean: clean
|
||||
|
||||
dist:
|
||||
${TAR_C} ${MODULE_NAME}${DATE}${DIST_EXT} *
|
||||
|
||||
distclean: clean docclean
|
||||
|
||||
testonly: ${TEST_RUNNER}
|
||||
${TEST_RUNNER}
|
||||
|
||||
check: all testonly
|
||||
|
||||
install: copy_files create_database init_database
|
||||
|
||||
copy_files:
|
||||
${MKDIR} ${DEST_DIR}
|
||||
${MKDIR} ${DEST_VAR_DIR}
|
||||
${MKDIR} ${DEST_BIN_DIR}
|
||||
${MKDIR} ${DEST_VAR_DIR}/access
|
||||
${MKDIR} ${DEST_VAR_DIR}/cron
|
||||
${MKDIR} ${DEST_VAR_DIR}/install
|
||||
${MKDIR} ${DEST_VAR_DIR}/install/upgrade
|
||||
${MKDIR} ${DEST_VAR_DIR}/stor
|
||||
${MKDIR} ${DEST_VAR_DIR}/stor/buffer
|
||||
${MKDIR} ${DEST_VAR_DIR}/trans
|
||||
${MKDIR} ${DEST_VAR_DIR}/xmlrpc
|
||||
${CP} ${VAR_DIR}/*.{php,xml} ${DEST_VAR_DIR}
|
||||
${CP} ${VAR_DIR}/cron/*.php ${DEST_VAR_DIR}/cron
|
||||
${CP} ${VAR_DIR}/install/*.php \
|
||||
${DEST_VAR_DIR}/install
|
||||
${CP} ${VAR_DIR}/install/upgrade/*.php \
|
||||
${DEST_VAR_DIR}/install/upgrade
|
||||
${CP} ${VAR_DIR}/xmlrpc/*.php \
|
||||
${DEST_VAR_DIR}/xmlrpc
|
||||
${CAT} ${VAR_DIR}/conf.php.template | ${SED} -e ${REPLACE_SED_STRING} \
|
||||
> ${DEST_VAR_DIR}/conf.php
|
||||
${CP} ${BIN_DIR}/backup.sh ${BIN_DIR}/restore.php \
|
||||
${DEST_BIN_DIR}
|
||||
|
||||
chgrp ${APACHE_GROUP} ${DEST_VAR_DIR}/access
|
||||
chgrp ${APACHE_GROUP} ${DEST_VAR_DIR}/stor
|
||||
chgrp ${APACHE_GROUP} ${DEST_VAR_DIR}/stor/buffer
|
||||
chgrp ${APACHE_GROUP} ${DEST_VAR_DIR}/trans
|
||||
chmod g+sw ${DEST_VAR_DIR}/access
|
||||
chmod g+sw ${DEST_VAR_DIR}/stor
|
||||
chmod g+sw ${DEST_VAR_DIR}/stor/buffer
|
||||
chmod g+sw ${DEST_VAR_DIR}/trans
|
||||
|
||||
${RM} ${WWW_DOCROOT}/${PHP_URL_PREFIX}
|
||||
ln -sf ${USR_VAR_DIR}/Campcaster ${WWW_DOCROOT}/${PHP_URL_PREFIX}
|
||||
|
||||
create_database:
|
||||
ifeq (@CREATE_LS_DATABASE@,yes)
|
||||
${BIN_DIR}/createDatabase.sh --database=${DATABASE} \
|
||||
--dbserver=${DB_SERVER} \
|
||||
--dbuser=${DB_USER} \
|
||||
--dbpassword=${DB_PASSWORD}
|
||||
endif
|
||||
|
||||
init_database:
|
||||
ifeq (@INIT_LS_DATABASE@,yes)
|
||||
-cd ${DEST_VAR_DIR}/install && ${PHP} -q install.php
|
||||
endif
|
||||
|
||||
|
||||
recheck: clean check
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Specific targets
|
||||
#-------------------------------------------------------------------------------
|
||||
storage: db_init dir_setup
|
||||
|
||||
storagecheck: storage testonly
|
||||
|
||||
dir_setup:
|
||||
bin/setupDirs.sh ${STOR_DIR} ${ACCESS_DIR} ${TRANS_DIR} ${BUFF_DIR}
|
||||
|
||||
db_init:
|
||||
-cd var/install && php -q install.php
|
||||
chgrp ${APACHE_GROUP} ${STOR_DIR} ${ACCESS_DIR} ${TRANS_DIR} ${BUFF_DIR}
|
||||
chmod g+sw ${STOR_DIR} ${ACCESS_DIR} ${TRANS_DIR} ${BUFF_DIR}
|
||||
|
||||
db_clean:
|
||||
-cd var/install && php -q uninstall.php
|
||||
|
||||
reset:
|
||||
./bin/resetStorage.sh
|
||||
|
||||
transtest:
|
||||
./var/tests/transTest.sh
|
||||
# cd var/tests; php -q transTest.php
|
||||
|
||||
${TMP_DIR}:
|
||||
${MKDIR} ${TMP_DIR}
|
||||
|
||||
${DOXYGEN_DIR}:
|
||||
${MKDIR} ${DOXYGEN_DIR}
|
||||
|
||||
${TEST_RUNNER}:
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Pattern rules
|
||||
#-------------------------------------------------------------------------------
|
||||
#${TMP_DIR}/%.o : ${SRC_DIR}/%.cxx
|
||||
# ${CXX} ${CPPFLAGS} ${CXXFLAGS} -c -o $@ $<
|
||||
|
220
backend/etc/configure.ac
Normal file
220
backend/etc/configure.ac
Normal file
|
@ -0,0 +1,220 @@
|
|||
dnl-----------------------------------------------------------------------------
|
||||
dnl Copyright (c) 2010 Sourcefabric O.P.S.
|
||||
dnl
|
||||
dnl This file is part of the Campcaster project.
|
||||
dnl http://campcaster.sourcefabric.org/
|
||||
dnl
|
||||
dnl Campcaster is free software; you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU General Public License as published by
|
||||
dnl the Free Software Foundation; either version 2 of the License, or
|
||||
dnl (at your option) any later version.
|
||||
dnl
|
||||
dnl Campcaster is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
dnl GNU General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU General Public License
|
||||
dnl along with Campcaster; if not, write to the Free Software
|
||||
dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
dnl
|
||||
dnl-----------------------------------------------------------------------------
|
||||
|
||||
dnl-----------------------------------------------------------------------------
|
||||
dnl NOTE: Run all configure related scripts from the tmp directory of the
|
||||
dnl project.
|
||||
dnl This is due to the fact that configure spreads a lot of trash around,
|
||||
dnl like atom4te cache directories, config.* files, etc. into the directory
|
||||
dnl it is being run from. We clearly don't want these in our base directory.
|
||||
dnl-----------------------------------------------------------------------------
|
||||
AC_INIT(StorageServer, 0.0, bugs@campware.org)
|
||||
AC_PREREQ(2.59)
|
||||
AC_COPYRIGHT([Copyright (c) 2010 Sourcefabric O.P.S. under the GNU GPL])
|
||||
AC_REVISION($Revision$)
|
||||
|
||||
AC_CONFIG_SRCDIR(../var/BasicStor.php)
|
||||
|
||||
dnl-----------------------------------------------------------------------------
|
||||
dnl specify wether the Campcaster database and user should be created
|
||||
dnl-----------------------------------------------------------------------------
|
||||
AC_SUBST(CREATE_LS_DATABASE)
|
||||
|
||||
AC_ARG_WITH([create-database],
|
||||
AC_HELP_STRING([--with-create-database],
|
||||
[specify wether the Campcaster database and database user
|
||||
should be created (no)]),
|
||||
[CREATE_LS_DATABASE=${withval}],
|
||||
[CREATE_LS_DATABASE=no])
|
||||
|
||||
AC_MSG_RESULT([creating Campcaster database: ${CREATE_LS_DATABASE}])
|
||||
|
||||
|
||||
dnl-----------------------------------------------------------------------------
|
||||
dnl specify wether the Campcaster database tables should be initialized
|
||||
dnl-----------------------------------------------------------------------------
|
||||
AC_SUBST(INIT_LS_DATABASE)
|
||||
|
||||
AC_ARG_WITH([init-database],
|
||||
AC_HELP_STRING([--with-init-database],
|
||||
[specify wether the Campcaster database tables should be
|
||||
initialized (no)]),
|
||||
[INIT_LS_DATABASE=${withval}],
|
||||
[INIT_LS_DATABASE=no])
|
||||
|
||||
AC_MSG_RESULT([initializing Campcaster database: ${INIT_LS_DATABASE}])
|
||||
|
||||
|
||||
dnl-----------------------------------------------------------------------------
|
||||
dnl specify the FQDN
|
||||
dnl-----------------------------------------------------------------------------
|
||||
AC_SUBST(HOSTNAME)
|
||||
|
||||
AC_ARG_WITH([hostname],
|
||||
AC_HELP_STRING([--with-hostname],
|
||||
[use the specified hostname (guess)]),
|
||||
[HOSTNAME=${withval}], [HOSTNAME=`hostname -f`])
|
||||
|
||||
AC_MSG_RESULT([using hostname: ${HOSTNAME}])
|
||||
|
||||
|
||||
dnl-----------------------------------------------------------------------------
|
||||
dnl specify group in which apache is running
|
||||
dnl-----------------------------------------------------------------------------
|
||||
AC_SUBST(APACHE_GROUP)
|
||||
|
||||
AC_ARG_WITH([apache-group],
|
||||
AC_HELP_STRING([--with-apache-group],
|
||||
[use apache running in the specified group (apache)]),
|
||||
[APACHE_GROUP=${withval}], [APACHE_GROUP=apache])
|
||||
|
||||
AC_MSG_RESULT([using apache group: ${APACHE_GROUP}])
|
||||
|
||||
|
||||
dnl-----------------------------------------------------------------------------
|
||||
dnl specify the web server port
|
||||
dnl-----------------------------------------------------------------------------
|
||||
AC_SUBST(WWW_PORT)
|
||||
|
||||
AC_ARG_WITH([www-port],
|
||||
AC_HELP_STRING([--with-www-port],
|
||||
[use the specified www port (80)]),
|
||||
[WWW_PORT=${withval}], [WWW_PORT=80])
|
||||
|
||||
AC_MSG_RESULT([using www port: ${WWW_PORT}])
|
||||
|
||||
|
||||
dnl-----------------------------------------------------------------------------
|
||||
dnl specify the scheduler server port
|
||||
dnl-----------------------------------------------------------------------------
|
||||
AC_SUBST(SCHEDULER_PORT)
|
||||
|
||||
AC_ARG_WITH([scheduler-port],
|
||||
AC_HELP_STRING([--with-scheduler-port],
|
||||
[use the specified scheduler port (3344)]),
|
||||
[SCHEDULER_PORT=${withval}], [SCHEDULER_PORT=3344])
|
||||
|
||||
AC_MSG_RESULT([using scheduler port: ${SCHEDULER_PORT}])
|
||||
|
||||
|
||||
dnl-----------------------------------------------------------------------------
|
||||
dnl specify the database server name
|
||||
dnl-----------------------------------------------------------------------------
|
||||
AC_SUBST(DB_SERVER)
|
||||
|
||||
AC_ARG_WITH([database-server],
|
||||
AC_HELP_STRING([--with-database-server],
|
||||
[use the specified database server (localhost)]),
|
||||
[DB_SERVER=${withval}], [DB_SERVER=localhost])
|
||||
|
||||
AC_MSG_RESULT([using database server: ${DB_SERVER}])
|
||||
|
||||
|
||||
dnl-----------------------------------------------------------------------------
|
||||
dnl get the name of the Campcaster database
|
||||
dnl-----------------------------------------------------------------------------
|
||||
AC_SUBST(DATABASE)
|
||||
|
||||
AC_ARG_WITH([database],
|
||||
AC_HELP_STRING([--with-database],
|
||||
[the name of the postgresql database to use (Campcaster)]),
|
||||
[DATABASE=${withval}], [DATABASE=Campcaster])
|
||||
|
||||
AC_MSG_RESULT([using database: ${DATABASE}])
|
||||
|
||||
|
||||
dnl-----------------------------------------------------------------------------
|
||||
dnl specify the database server user
|
||||
dnl-----------------------------------------------------------------------------
|
||||
AC_SUBST(DB_USER)
|
||||
|
||||
AC_ARG_WITH([database-user],
|
||||
AC_HELP_STRING([--with-database-user],
|
||||
[use the specified database server user (campcaster)]),
|
||||
[DB_USER=${withval}], [DB_USER=campcaster])
|
||||
|
||||
AC_MSG_RESULT([using database server user: ${DB_USER}])
|
||||
|
||||
|
||||
dnl-----------------------------------------------------------------------------
|
||||
dnl specify the database server user password
|
||||
dnl-----------------------------------------------------------------------------
|
||||
AC_SUBST(DB_PASSWORD)
|
||||
|
||||
AC_ARG_WITH([database-password],
|
||||
AC_HELP_STRING([--with-database-password],
|
||||
[use the specified database server user password (campcaster)]),
|
||||
[DB_PASSWORD=${withval}], [DB_PASSWORD=campcaster])
|
||||
|
||||
AC_MSG_RESULT([using database server user password: ${DB_PASSWORD}])
|
||||
|
||||
|
||||
dnl-----------------------------------------------------------------------------
|
||||
dnl specify web document root
|
||||
dnl-----------------------------------------------------------------------------
|
||||
AC_SUBST(WWW_DOCROOT)
|
||||
|
||||
AC_ARG_WITH([www-docroot],
|
||||
AC_HELP_STRING([--with-www-docroot],
|
||||
[deploy Campcaster under the specified docroot (/var/www)]),
|
||||
[WWW_DOCROOT=${withval}], [WWW_DOCROOT=/var/www])
|
||||
|
||||
AC_MSG_RESULT([using www document root: ${WWW_DOCROOT}])
|
||||
|
||||
|
||||
dnl-----------------------------------------------------------------------------
|
||||
dnl specify url prefix
|
||||
dnl-----------------------------------------------------------------------------
|
||||
AC_SUBST(URL_PREFIX)
|
||||
|
||||
AC_ARG_WITH([url-prefix],
|
||||
AC_HELP_STRING([--with-url-prefix],
|
||||
[use the specified url prefix (campcaster)]),
|
||||
[URL_PREFIX=${withval}], [URL_PREFIX=campcaster])
|
||||
|
||||
AC_MSG_RESULT([using url prefix: ${URL_PREFIX}])
|
||||
|
||||
|
||||
dnl display status info on what libraries will get compiled
|
||||
|
||||
AC_MSG_NOTICE(
|
||||
[using the following configuration settings:
|
||||
|
||||
hostname: ${HOSTNAME}
|
||||
www port: ${WWW_PORT}
|
||||
scheduler port: ${SCHEDULER_PORT}
|
||||
database server: ${DB_SERVER}
|
||||
database name: ${DATABASE}
|
||||
database user: ${DB_USER}
|
||||
database user password: ${DB_PASSWORD}
|
||||
creating Campcaster database: ${CREATE_LS_DATABASE}
|
||||
initialize Campcaster database: ${INIT_LS_DATABASE}
|
||||
www document root: ${WWW_DOCROOT}
|
||||
url prefix: ${URL_PREFIX}
|
||||
|
||||
])
|
||||
|
||||
|
||||
|
||||
AC_CONFIG_FILES(../Makefile:../etc/Makefile.in)
|
||||
|
||||
AC_OUTPUT()
|
1140
backend/etc/doxygen.config
Normal file
1140
backend/etc/doxygen.config
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue