summaryrefslogtreecommitdiffstats
path: root/www/orion-devel
diff options
context:
space:
mode:
authorznerd <znerd@FreeBSD.org>2002-03-04 23:19:12 +0000
committerznerd <znerd@FreeBSD.org>2002-03-04 23:19:12 +0000
commit4022e371eba8a402ae9717e317bf3cbfd3e5092e (patch)
treeaace23719a9009a7fb7cc251e2568989cb120ce5 /www/orion-devel
parentb6ecbc88d621b95621e0072cec4cc213f506b276 (diff)
downloadFreeBSD-ports-4022e371eba8a402ae9717e317bf3cbfd3e5092e.zip
FreeBSD-ports-4022e371eba8a402ae9717e317bf3cbfd3e5092e.tar.gz
Changes:
0) Uses 'www' user and group instead of 'orion' user and group 1) Added pkg-install to add www user and group if necessary 2) Fixed STARTUP_ORDER at 020 because the pkg-plist supports no other value 3) Executing pkg-install from the pre-install target 4) Fixed the pkg-plist (it's different because Orion is not automatically started and it creates some files at first startup) 5) Bumped PORTREVISION to 3
Diffstat (limited to 'www/orion-devel')
-rw-r--r--www/orion-devel/Makefile18
-rw-r--r--www/orion-devel/pkg-install46
-rw-r--r--www/orion-devel/pkg-plist13
3 files changed, 56 insertions, 21 deletions
diff --git a/www/orion-devel/Makefile b/www/orion-devel/Makefile
index 0be9a41..6f37a99 100644
--- a/www/orion-devel/Makefile
+++ b/www/orion-devel/Makefile
@@ -7,7 +7,7 @@
PORTNAME= orion
PORTVERSION= 1.5.2
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= www java
MASTER_SITES= http://www.orionserver.com/distributions/ \
http://www.atlassian.com/software/orion/downloads/ \
@@ -32,7 +32,7 @@ APP_TITLE= Orion Server
APP_SHORTNAME= ${PORTNAME}
APPCTL_NAME= ${APP_SHORTNAME}ctl
CTL_SCRIPT= ${PREFIX}/bin/${APPCTL_NAME}
-STARTUP_ORDER?= 020
+STARTUP_ORDER= 020
RC_SCRIPT= ${PREFIX}/etc/rc.d/${STARTUP_ORDER}.${PORTNAME}.sh
JAVA_HOME?= ${LOCALBASE}/jdk1.3.1
JAVA_PORT?= ${PORTSDIR}/java/jdk13
@@ -41,10 +41,8 @@ WITH_JIKES?= YES
.if ${WITH_JIKES} == "YES"
RUN_DEPENDS+= ${JIKES_LOCATION}:${PORTSDIR}/java/jikes
.endif
-USER_NAME?= ${PORTNAME}
-GROUP_NAME?= ${USER_NAME}
-USER_ID?= 7104
-GROUP_ID?= ${USER_ID}
+USER_NAME= www
+GROUP_NAME= www
PW?= /usr/sbin/pw
HTTP_PORT?= 8090
RMI_PORT?= 23791
@@ -58,16 +56,14 @@ pre-install:
@${ECHO} " Location of JDK: ${JAVA_HOME}"
@${ECHO} " Location of Java port: ${JAVA_PORT}"
@${ECHO} " Using Jikes: ${WITH_JIKES}"
- @${ECHO} " Running as (user/group): ${USER_NAME}/${GROUP_NAME} (${USER_ID}:${GROUP_ID})"
+ @${ECHO} " Running as (user/group): ${USER_NAME}/${GROUP_NAME}"
@${ECHO} " HTTP port: ${HTTP_PORT}"
@${ECHO} " RMI port: ${RMI_PORT}"
@${ECHO} " Starting after install: ${AUTO_START}"
+ PKG_PREFIX=${PREFIX} ${SH} pkg-install ${PKGNAME} PRE-INSTALL
-do-install:
- @# Add the group and the user if they do not exist
- ${PW} groupadd -n ${GROUP_NAME} -g ${GROUP_ID} || true
- ${PW} useradd -n ${USER_NAME} -u ${USER_ID} -g ${GROUP_NAME} -c "${APP_TITLE} account" -d ${APP_HOME} -s ${SH} -h - || true
+do-install:
@# Create the destination directory
${MKDIR} ${APP_HOME}
diff --git a/www/orion-devel/pkg-install b/www/orion-devel/pkg-install
new file mode 100644
index 0000000..687ec3f
--- /dev/null
+++ b/www/orion-devel/pkg-install
@@ -0,0 +1,46 @@
+#!/bin/sh
+#
+# Checks if the 'www' user and group exist. If they don't, then
+# an attempt is made to create both.
+#
+# $FreeBSD$
+#
+
+# Make sure we're called during the 'make install' process
+if [ "$2" != "PRE-INSTALL" ]; then
+ exit 0
+fi
+
+# Set some constants
+USER=www
+GROUP=${USER}
+UID=80
+GID=${UID}
+
+# See if the group already exists
+if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
+
+ # If not, try to create it
+ if pw groupadd ${GROUP} -g ${GID}; then
+ echo "Added group \"${GROUP}\"."
+ else
+ echo "Adding group \"${GROUP}\" failed..."
+ exit 1
+ fi
+fi
+
+# See if the user already exists
+if ! pw usershow "${USER}" 2>/dev/null 1>&2; then
+
+ # If not, try to create it
+ if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
+ -s "/sbin/nologin" -d "/nonexistent" \
+ -c "World Wide Web Owner"; \
+ then
+ echo "Added user \"${USER}\"."
+ else
+ echo "Adding user \"${USER}\" failed..."
+ exit 1
+ fi
+fi
+exit 0
diff --git a/www/orion-devel/pkg-plist b/www/orion-devel/pkg-plist
index 0441fb4..328df70 100644
--- a/www/orion-devel/pkg-plist
+++ b/www/orion-devel/pkg-plist
@@ -1,9 +1,5 @@
-etc/rc.d/orion.sh
+etc/rc.d/020.orion.sh
bin/orionctl
-%%T%%/application-deployments/default/defaultWebApp/
-%%T%%/application-deployments/default/defaultWebApp/orion-web.xml
-%%T%%/application-deployments/default/defaultWebApp/persistence
-%%T%%/application-deployments/default/defaultWebApp/persistence/state.ser
%%T%%/config/database-schemas/hypersonic.xml
%%T%%/config/database-schemas/ms-access.xml
%%T%%/config/database-schemas/ms-sql.xml
@@ -322,9 +318,8 @@ bin/orionctl
%%T%%/orion.jar
%%T%%/tools.jar
%%T%%/mail.jar
-@dirrm %%T%%/application-deployments/default/defaultWebApp/persistence
-@dirrm %%T%%/application-deployments/default/defaultWebApp
-@dirrm %%T%%/application-deployments/default
+%%T%%/crimson.jar
+%%T%%/jaas.jar
@dirrm %%T%%/application-deployments
@dirrm %%T%%/config/database-schemas
@dirrm %%T%%/config
@@ -402,5 +397,3 @@ bin/orionctl
@dirrm %%T%%/persistence/ejb
@dirrm %%T%%/persistence
@dirrm %%T%%
-@unexec pw groupdel orion || true
-@unexec pw userdel orion || true
OpenPOWER on IntegriCloud