aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authormarino <marino@FreeBSD.org>2014-06-19 08:01:37 +0800
committermarino <marino@FreeBSD.org>2014-06-19 08:01:37 +0800
commit7d9dfa6906e47418fcfa700e04c07bd7a1cee608 (patch)
tree926e02cbed4b1695536afb85ce16e8e3355cf3d4 /www
parentaaddad9babb369d0248809cf51a305dc0a3291c3 (diff)
downloadfreebsd-ports-gnome-7d9dfa6906e47418fcfa700e04c07bd7a1cee608.tar.gz
freebsd-ports-gnome-7d9dfa6906e47418fcfa700e04c07bd7a1cee608.tar.zst
freebsd-ports-gnome-7d9dfa6906e47418fcfa700e04c07bd7a1cee608.zip
www/codeigniter: Support stage and update URL
PR: 189777 Submitted by: Zsolt Udvari Approved by: maintainer (Bo-Yi Wu) (first version) Verified by: Redports 8x pass
Diffstat (limited to 'www')
-rw-r--r--www/codeigniter/Makefile100
-rw-r--r--www/codeigniter/files/codeigniter.conf.in16
-rw-r--r--www/codeigniter/files/pkg-message.in20
-rw-r--r--www/codeigniter/pkg-descr2
-rw-r--r--www/codeigniter/pkg-plist1
5 files changed, 52 insertions, 87 deletions
diff --git a/www/codeigniter/Makefile b/www/codeigniter/Makefile
index 9e30fbe04df9..703148c4bf7c 100644
--- a/www/codeigniter/Makefile
+++ b/www/codeigniter/Makefile
@@ -13,6 +13,8 @@ COMMENT= Framework for developing PHP web applications
USES= zip
+NEED_ROOT=yes
+
CONFLICTS= codeigniter-1.[0-9]*
NO_BUILD= yes
@@ -22,7 +24,6 @@ WANT_PHP_WEB= yes
CI_SYS_DIR= system
CI_CONF_DIR= application/config
WRKSRC= ${WRKDIR}/CodeIgniter-${PORTVERSION}
-WWWDIR= ${PREFIX}/www/codeigniter
PORTDOCS= *
LATEST_LINK= codeigniter-devel
@@ -62,10 +63,9 @@ STD_BITS= ${CI_CONF_DIR}/index.html \
${CI_SYS_DIR}/language \
${CI_SYS_DIR}/libraries
-OPTIONS_DEFINE= APACHE PROD MSSQL MYSQL MYSQLI ODBC PGSQL SQLITE
+OPTIONS_DEFINE= APACHE MSSQL MYSQL MYSQLI ODBC PGSQL SQLITE
APACHE_DESC= Configure for Apache-2.x
-PROD_DESC= Install for production server (see: make confighelp)
MSSQL_DESC= Install MSSQL support for PHP
MYSQL_DESC= Install MySQL support for PHP
MYSQLI_DESC= Install MySQLi support for PHP
@@ -73,43 +73,21 @@ ODBC= Install ODBC support for PHP
PGSQL_DESC= Install PostgreSQL support for PHP
SQLITE_DESC= Install SQLite support for PHP
-NO_STAGE= yes
.include <bsd.port.pre.mk>
+SUB_FILES= pkg-message
.if ${PORT_OPTIONS:MAPACHE}
USE_APACHE_RUN= 22+
-
PLIST_SUB+= NOAPACHE="" CONFDIR=${CONFDIR_REL}
CONFDIR= ${PREFIX}/${CONFDIR_REL}
CONFDIR_REL= ${APACHEETCDIR}/Includes
-
-PKGMESSAGE= pkg-message-apache
-SUB_FILES= pkg-message-apache
.else
PLIST_SUB+= NOAPACHE="@comment "
-PKGMESSAGE= pkg-message-noapache
-SUB_FILES= pkg-message-noapache
.endif
PLIST_SUB+= ECHO_MSG=${ECHO_MSG} CI_CONF_DIR=${CI_CONF_DIR}
-WITH_PHP_CGI?= /cgi-bin/php
-
-.if ${PHP_SAPI:Mcgi} == "cgi" && ${PHP_SAPI:Mmod} == ""
-CGI_EXT= -cgi
-.else
-CGI_EXT=
-.endif
-
DEFAULT_PHP_VER=5
-SUB_LIST+= PHPCGI=${WITH_PHP_CGI}
-
-.if ${PORT_OPTIONS:MPROD}
-PROD= production
-.else
-PROD= development
-.endif
-
.if ${PORT_OPTIONS:MMSSQL}
USE_PHP+= mssql
.endif
@@ -140,78 +118,30 @@ SUB_LIST+= HASHMARK=\#
SUB_LIST+= HASHMARK=
.endif
-CONF= codeigniter-${PROD}${CGI_EXT}.conf
+CONF= codeigniter.conf
SUB_FILES+= ${CONF}
-confighelp:
- @${ECHO_MSG} ""
- @${ECHO_MSG} "On a production server, the Apache DocumentRoot is"
- @${ECHO_MSG} "updated to point to the CodeIgniter webroot directory."
- @${ECHO_MSG} "In this configuration, the CodeIgniter application is"
- @${ECHO_MSG} "accessed at http://www.myservername.com/."
- @${ECHO_MSG} ""
- @${ECHO_MSG} "A non-production server, CodeIgniter is installed at"
- @${ECHO_MSG} "the /codeigniter URL, and the CodeIgniter application is"
- @${ECHO_MSG} "accessed at http://www.myservername.com/codeigniter/."
- @${ECHO_MSG} ""
- @${ECHO_MSG} "For more information, please see:"
- @${ECHO_MSG} "http://codeigniter.com/user_guide/installation/index.html"
- @${ECHO_MSG} ""
-
do-install:
- @cd ${WRKSRC} && ${COPYTREE_SHARE} "${STD_BITS}" ${WWWDIR}
+ @cd ${WRKSRC} && ${COPYTREE_SHARE} "${STD_BITS}" ${STAGEDIR}${WWWDIR}
@for i in ${CI_CONF_FILES}; do \
- ${INSTALL_DATA} ${WRKSRC}/$$i ${WWWDIR}/$$i.sample; \
+ ${INSTALL_DATA} ${WRKSRC}/$$i ${STAGEDIR}${WWWDIR}/$$i.sample; \
done
- @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${WWWDIR}
+ @${CHOWN} -R ${WWWOWN}:${WWWGRP} ${STAGEDIR}${WWWDIR}
@${ECHO_CMD} '@exec ${CHOWN} -R ${WWWOWN}:${WWWGRP} \
- ${WWWDIR:S|^${PREFIX}/|%D/|}' >> ${TMPPLIST}
- @${FIND} ${WWWDIR} -type f -print0 | ${XARGS} -0 ${CHMOD} 644
- @${ECHO_CMD} '@exec ${FIND} ${WWWDIR} -type f -print0 | \
+ ${STAGEDIR}${WWWDIR:S|^${PREFIX}/|%D/|}' >> ${TMPPLIST}
+ @${FIND} ${STAGEDIR}${WWWDIR} -type f -print0 | ${XARGS} -0 ${CHMOD} 644
+ @${ECHO_CMD} '@exec ${FIND} ${STAGEDIR}${WWWDIR} -type f -print0 | \
${XARGS} -0 ${CHMOD} 644' >> ${TMPPLIST}
- @${FIND} ${WWWDIR} -type d -print0 | ${XARGS} -0 ${CHMOD} 755
- @${ECHO_CMD} '@exec ${FIND} ${WWWDIR} -type d -print0 | \
+ @${FIND} ${STAGEDIR}${WWWDIR} -type d -print0 | ${XARGS} -0 ${CHMOD} 755
+ @${ECHO_CMD} '@exec ${FIND} ${STAGEDIR}${WWWDIR} -type d -print0 | \
${XARGS} -0 ${CHMOD} 755' >> ${TMPPLIST}
post-install:
- @for i in ${CI_CONF_FILES}; do \
- if [ ! -f ${WWWDIR}/$$i ]; then \
- ${CP} -p ${WWWDIR}/$$i.sample ${WWWDIR}/$$i; \
- else \
- ${ECHO_MSG} "===> Customized ${WWWDIR}/$$i has not been overwritten"; \
- if [ ! -z "$UPGRADE_TOOL" ]; then \
- ${ECHO_MSG} "===> WARNING: You may have to manually merge changes to ${WWWDIR}/$$i.sample into ${WWWDIR}/$$i"; \
- fi; \
- fi; \
- done
.if ${PORT_OPTIONS:MAPACHE}
- @if [ -d "${CONFDIR}" ]; then \
- ${CP} ${WRKDIR}/${CONF} ${CONFDIR}/codeigniter.conf; \
- else \
- ${ECHO_MSG} "" ; \
- ${ECHO_MSG} "Please check your Apache 2.x installation -" ; \
- ${ECHO_MSG} "${CONFDIR} doesn't exist," ; \
- ${ECHO_MSG} "so I cannot install codeigniter.conf there!" ; \
- ${ECHO_MSG} "" ; \
- ${FALSE} ; \
- fi
+ ${CP} ${WRKDIR}/${CONF} ${STAGEDIR}${CONFDIR}/codeigniter.conf;
.endif
.if ${PORT_OPTIONS:MDOCS}
- @cd ${WRKSRC}/user_guide && ${COPYTREE_SHARE} . ${DOCSDIR}
-.endif
-
- @${CAT} ${PKGMESSAGE}
-
-.if ${CGI_EXT} == "-cgi"
- @${ECHO_MSG} ""
- @${ECHO_MSG} "Your CodeIgniter installation was configured to use the PHP CGI binary."
- @${ECHO_MSG} "The PHP CGI binary is expected to be referenced by the URL:"
- @${ECHO_MSG} ""
- @${ECHO_MSG} " ${WITH_PHP_CGI}"
- @${ECHO_MSG} ""
- @${ECHO_MSG} "If this is incorrect, reinstall the port with the WITH_PHP_CGI knob"
- @${ECHO_MSG} "set to the correct URL."
+ @cd ${WRKSRC}/user_guide && ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}
.endif
- @${ECHO_MSG} "*********************************************************************"
.include <bsd.port.post.mk>
diff --git a/www/codeigniter/files/codeigniter.conf.in b/www/codeigniter/files/codeigniter.conf.in
new file mode 100644
index 000000000000..b339faae05b5
--- /dev/null
+++ b/www/codeigniter/files/codeigniter.conf.in
@@ -0,0 +1,16 @@
+AddType application/x-httpd-php .php
+AddType application/x-httpd-php-source .phps
+DirectoryIndex index.php index.html
+
+%%HASHMARK%%Alias /codeigniter/user_guide %%DOCSDIR%%
+Alias /codeigniter %%WWWDIR%%
+
+%%HASHMARK%%<Directory %%DOCSDIR%%>
+%%HASHMARK%% Order deny,allow
+%%HASHMARK%% Allow from all
+%%HASHMARK%%</Directory>
+
+<Location /codeigniter>
+ Order deny,allow
+ Allow from all
+</Location>
diff --git a/www/codeigniter/files/pkg-message.in b/www/codeigniter/files/pkg-message.in
new file mode 100644
index 000000000000..2dadc6fc1a07
--- /dev/null
+++ b/www/codeigniter/files/pkg-message.in
@@ -0,0 +1,20 @@
+
+*********************************************************************
+You have just installed the CodeIgniter web application framework.
+
+Note that you should restart your web server to ensure that
+the CodeIgniter configuration file is loaded.
+
+To use CodeIgniter:
+- Copy %%WWWDIR%%/index.php.sample as index.php to the root
+ of your project directory.
+- Copy the %%WWWDIR%%/application/config/ directory.
+ Edit files, especially base URL in config.php.
+- If you intend to use a database, copy and edit the
+ %%WWWDIR%%/application/config/database.php too.
+- For more information please check
+ http://ellislab.com/codeigniter/user-guide/installation/index.html
+
+- If you are upgrading from a prior release, please visit:
+ http://codeigniter.com/user_guide/installation/upgrading.html
+ for additional post-installation instructions.
diff --git a/www/codeigniter/pkg-descr b/www/codeigniter/pkg-descr
index 9e635cfe1beb..d2393dba8e45 100644
--- a/www/codeigniter/pkg-descr
+++ b/www/codeigniter/pkg-descr
@@ -2,4 +2,4 @@ CodeIgniter is a powerful PHP framework with a very small footprint,
built for PHP coders who need a simple and elegant toolkit to create
full-featured web applications.
-WWW: http://codeigniter.com/
+WWW: http://ellislab.com/codeigniter
diff --git a/www/codeigniter/pkg-plist b/www/codeigniter/pkg-plist
index 3a585193737d..edd4fe9f721b 100644
--- a/www/codeigniter/pkg-plist
+++ b/www/codeigniter/pkg-plist
@@ -59,7 +59,6 @@
%%WWWDIR%%/application/third_party/index.html
%%WWWDIR%%/application/views/index.html
%%WWWDIR%%/application/views/welcome_message.php
-%%WWWDIR%%/index.php
%%WWWDIR%%/index.php.sample
%%WWWDIR%%/system/core/Benchmark.php
%%WWWDIR%%/system/core/CodeIgniter.php