Commit da320be4 authored by Daniel Henninger's avatar Daniel Henninger Committed by dhenninger

Updated for new RPM.

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/trunk@8138 b35dd754-fafc-0310-a699-88a17e54d16e
parent e23e0bad
...@@ -22,49 +22,60 @@ and delivers an innovative feature set. ...@@ -22,49 +22,60 @@ and delivers an innovative feature set.
%build %build
%install %install
# Need to evaluate this. Required, but need to figure out logistics.
#rm -rf $RPM_BUILD_ROOT
# We prefer /usr/local to /opt.
mkdir -p $RPM_BUILD_ROOT/usr/local
mv $RPM_BUILD_ROOT/opt/openfire $RPM_BUILD_ROOT/usr/local/openfire
rmdir $RPM_BUILD_ROOT/opt
# There's no need to package this. # There's no need to package this.
rm $RPM_BUILD_ROOT/opt/openfire/logs/stderr.out rm $RPM_BUILD_ROOT/usr/local/openfire/logs/stderr.out
# Set up the init script. # Set up the init script.
mkdir -p $RPM_BUILD_ROOT/etc/init.d mkdir -p $RPM_BUILD_ROOT/etc/init.d
cp $RPM_BUILD_ROOT/opt/openfire/bin/extra/redhat/openfired $RPM_BUILD_ROOT/etc/init.d/openfired cp $RPM_BUILD_ROOT/usr/local/openfire/bin/extra/redhat/openfire $RPM_BUILD_ROOT/etc/init.d/openfire
chmod 755 $RPM_BUILD_ROOT/etc/init.d/openfired chmod 755 $RPM_BUILD_ROOT/etc/init.d/openfire
# Make the startup script executable. # Make the startup script executable.
chmod 755 $RPM_BUILD_ROOT/opt/openfire/bin/openfire.sh chmod 755 $RPM_BUILD_ROOT/usr/local/openfire/bin/openfire.sh
# Set up the sysconfig file. # Set up the sysconfig file.
mkdir -p $RPM_BUILD_ROOT/etc/sysconfig mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
cp $RPM_BUILD_ROOT/opt/openfire/bin/extra/redhat/openfire-sysconfig $RPM_BUILD_ROOT/etc/sysconfig/openfire cp $RPM_BUILD_ROOT/usr/local/openfire/bin/extra/redhat/openfire-sysconfig $RPM_BUILD_ROOT/etc/sysconfig/openfire
# Create /etc based config directory.
mkdir -p $RPM_BUILD_ROOT/etc/openfire
%clean
rm -rf $RPM_BUILD_ROOT
%preun %preun
[ -x "/etc/init.d/openfired" ] && /etc/init.d/openfired stop [ -x "/etc/init.d/openfire" ] && /etc/init.d/openfire stop
/sbin/chkconfig --del openfired /sbin/chkconfig --del openfire
%post %post
/sbin/chkconfig --add openfired /sbin/chkconfig --add openfire
%files %files
%defattr(-,daemon,daemon) %defattr(-,daemon,daemon)
%dir /opt/openfire %dir /usr/local/openfire
/opt/openfire/bin /usr/local/openfire/bin
%dir /opt/openfire/conf %dir /usr/local/openfire/conf
%config(noreplace) /opt/openfire/conf/openfire.xml %config(noreplace) /usr/local/openfire/conf/openfire.xml
/opt/openfire/lib /usr/local/openfire/lib
%dir /opt/openfire/logs %dir /usr/local/openfire/logs
/opt/openfire/plugins /usr/local/openfire/plugins
%dir /opt/openfire/resources %dir /usr/local/openfire/resources
/opt/openfire/resources/database /usr/local/openfire/resources/database
/opt/openfire/resources/i18n /usr/local/openfire/resources/i18n
/opt/openfire/resources/nativeAuth /usr/local/openfire/resources/nativeAuth
/opt/openfire/resources/spank /usr/local/openfire/resources/spank
%dir /opt/openfire/resources/security %dir /usr/local/openfire/resources/security
%config(noreplace) /opt/openfire/resources/security/keystore %config(noreplace) /usr/local/openfire/resources/security/keystore
%config(noreplace) /opt/openfire/resources/security/truststore %config(noreplace) /usr/local/openfire/resources/security/truststore
%doc /opt/openfire/documentation %doc /usr/local/openfire/documentation
%doc /opt/openfire/LICENSE.html %doc /usr/local/openfire/LICENSE.html
%doc /opt/openfire/README.html %doc /usr/local/openfire/README.html
%doc /opt/openfire/changelog.html %doc /usr/local/openfire/changelog.html
/etc/init.d/openfired /etc/init.d/openfire
%config(noreplace) /etc/sysconfig/openfire %config(noreplace) /etc/sysconfig/openfire
%changelog %changelog
* Sun Apr 12 2007 Jive Software <nobody@jivesoftware.com> * Mon Apr 30 2007 Daniel Henninger <jadestorm@nc.rr.com> 3.3.1
- Openfire 3.3.0 build. - Initial RPM creation.
#!/bin/sh #!/bin/sh
# #
# openfired Stops and starts the Openfire XMPP service. # openfire Stops and starts the Openfire XMPP service.
# #
# chkconfig: 2345 99 1 # chkconfig: 2345 99 1
# description: Openfire is an XMPP server, which is a server that facilitates \ # description: Openfire is an XMPP server, which is a server that facilitates \
# XML based communication, such as chat. # XML based communication, such as chat.
# config: /opt/openfire/conf/openfire.xml # config: /usr/local/openfire/conf/openfire.xml
# config: /etc/sysconfig/openfired # config: /etc/sysconfig/openfire
# pidfile: /var/run/openfire.pid # pidfile: /var/run/openfire.pid
# #
# This script has currently been tested on Redhat, CentOS, and Fedora based # This script has currently been tested on Redhat, CentOS, and Fedora based
...@@ -25,22 +25,22 @@ RETVAL=0 ...@@ -25,22 +25,22 @@ RETVAL=0
[ "`id -u`" = 0 ] || exit 1 [ "`id -u`" = 0 ] || exit 1
# Get config. # Get config.
[ -f "/etc/sysconfig/openfired" ] && . /etc/sysconfig/openfired [ -f "/etc/sysconfig/openfire" ] && . /etc/sysconfig/openfire
# If openfire user is not set in sysconfig, set to daemon. # If openfire user is not set in sysconfig, set to daemon.
[ -z "$OPENFIRE_USER" ] && OPENFIRE_USER="daemon" [ -z "$OPENFIRE_USER" ] && OPENFIRE_USER="daemon"
# If pid file path is not set in sysconfig, set to /var/run/openfired.pid. # If pid file path is not set in sysconfig, set to /var/run/openfire.pid.
[ -z "$OPENFIRE_PIDFILE" ] && OPENFIRE_PIDFILE="/var/run/${PROG}.pid" [ -z "$OPENFIRE_PIDFILE" ] && OPENFIRE_PIDFILE="/var/run/${PROG}.pid"
# ----------------------------------------------------------------- # -----------------------------------------------------------------
# If a openfire home variable has not been specified, try to determine it. # If a openfire home variable has not been specified, try to determine it.
if [ -z "$OPENFIRE_HOME" -o ! -d "$OPENFIRE_HOME" ]; then if [ -z "$OPENFIRE_HOME" -o ! -d "$OPENFIRE_HOME" ]; then
if [ -d "/opt/openfire" ]; then if [ -d "/usr/local/openfire" ]; then
OPENFIRE_HOME="/opt/openfire"
elif [ -d "/usr/local/openfire" ]; then
OPENFIRE_HOME="/usr/local/openfire" OPENFIRE_HOME="/usr/local/openfire"
elif [ -d "/opt/openfire" ]; then
OPENFIRE_HOME="/opt/openfire"
else else
echo "Could not find Openfire installation under /opt or /usr/local." echo "Could not find Openfire installation under /opt or /usr/local."
echo "Please specify the Openfire installation location as variable OPENFIRE_HOME" echo "Please specify the Openfire installation location as variable OPENFIRE_HOME"
...@@ -115,7 +115,7 @@ start() { ...@@ -115,7 +115,7 @@ start() {
echo echo
[ $RETVAL -eq 0 -a -d /var/lock/subsys ] && touch /var/lock/subsys/openfired [ $RETVAL -eq 0 -a -d /var/lock/subsys ] && touch /var/lock/subsys/openfire
sleep 1 # allows prompt to return sleep 1 # allows prompt to return
cd $OLD_PWD cd $OLD_PWD
...@@ -130,7 +130,7 @@ stop() { ...@@ -130,7 +130,7 @@ stop() {
echo echo
[ $RETVAL -eq 0 -a -f "$OPENFIRE_PIDFILE" ] && rm -f $OPENFIRE_PIDFILE [ $RETVAL -eq 0 -a -f "$OPENFIRE_PIDFILE" ] && rm -f $OPENFIRE_PIDFILE
[ $RETVAL -eq 0 -a -f "/var/lock/subsys/openfired" ] && rm -f /var/lock/subsys/openfired [ $RETVAL -eq 0 -a -f "/var/lock/subsys/openfire" ] && rm -f /var/lock/subsys/openfire
} }
restart() { restart() {
...@@ -140,7 +140,7 @@ restart() { ...@@ -140,7 +140,7 @@ restart() {
} }
condrestart() { condrestart() {
[ -e "/var/lock/subsys/openfired" ] && restart [ -e "/var/lock/subsys/openfire" ] && restart
return 0 return 0
} }
......
# Set this to the path where openfire lives. # Set this to the path where openfire lives.
# If this is not set the script will look for /opt/openfire, then # If this is not set the script will look for /usr/local/openfire, then
# /usr/local/openfire. # /opt/openfire.
#OPENFIRE_HOME="" #OPENFIRE_HOME=""
# If there is a different user you would like to run openfire as, # If there is a different user you would like to run openfire as,
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
# If you wish to change the location of the openfire pid file, # If you wish to change the location of the openfire pid file,
# change the following line. # change the following line.
#OPENFIRE_PIDFILE="/var/run/openfired.pid" #OPENFIRE_PIDFILE="/var/run/openfire.pid"
# If you wish to explictly specific the location of the log directory, # If you wish to explictly specific the location of the log directory,
# you can set it here. Note that this applies to the logs generated outside # you can set it here. Note that this applies to the logs generated outside
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment