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.
%build
%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.
rm $RPM_BUILD_ROOT/opt/openfire/logs/stderr.out
rm $RPM_BUILD_ROOT/usr/local/openfire/logs/stderr.out
# Set up the init script.
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
chmod 755 $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/openfire
# 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.
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
[ -x "/etc/init.d/openfired" ] && /etc/init.d/openfired stop
/sbin/chkconfig --del openfired
[ -x "/etc/init.d/openfire" ] && /etc/init.d/openfire stop
/sbin/chkconfig --del openfire
%post
/sbin/chkconfig --add openfired
/sbin/chkconfig --add openfire
%files
%defattr(-,daemon,daemon)
%dir /opt/openfire
/opt/openfire/bin
%dir /opt/openfire/conf
%config(noreplace) /opt/openfire/conf/openfire.xml
/opt/openfire/lib
%dir /opt/openfire/logs
/opt/openfire/plugins
%dir /opt/openfire/resources
/opt/openfire/resources/database
/opt/openfire/resources/i18n
/opt/openfire/resources/nativeAuth
/opt/openfire/resources/spank
%dir /opt/openfire/resources/security
%config(noreplace) /opt/openfire/resources/security/keystore
%config(noreplace) /opt/openfire/resources/security/truststore
%doc /opt/openfire/documentation
%doc /opt/openfire/LICENSE.html
%doc /opt/openfire/README.html
%doc /opt/openfire/changelog.html
/etc/init.d/openfired
%dir /usr/local/openfire
/usr/local/openfire/bin
%dir /usr/local/openfire/conf
%config(noreplace) /usr/local/openfire/conf/openfire.xml
/usr/local/openfire/lib
%dir /usr/local/openfire/logs
/usr/local/openfire/plugins
%dir /usr/local/openfire/resources
/usr/local/openfire/resources/database
/usr/local/openfire/resources/i18n
/usr/local/openfire/resources/nativeAuth
/usr/local/openfire/resources/spank
%dir /usr/local/openfire/resources/security
%config(noreplace) /usr/local/openfire/resources/security/keystore
%config(noreplace) /usr/local/openfire/resources/security/truststore
%doc /usr/local/openfire/documentation
%doc /usr/local/openfire/LICENSE.html
%doc /usr/local/openfire/README.html
%doc /usr/local/openfire/changelog.html
/etc/init.d/openfire
%config(noreplace) /etc/sysconfig/openfire
%changelog
* Sun Apr 12 2007 Jive Software <nobody@jivesoftware.com>
- Openfire 3.3.0 build.
* Mon Apr 30 2007 Daniel Henninger <jadestorm@nc.rr.com> 3.3.1
- Initial RPM creation.
#!/bin/sh
#
# openfired Stops and starts the Openfire XMPP service.
# openfire Stops and starts the Openfire XMPP service.
#
# chkconfig: 2345 99 1
# description: Openfire is an XMPP server, which is a server that facilitates \
# XML based communication, such as chat.
# config: /opt/openfire/conf/openfire.xml
# config: /etc/sysconfig/openfired
# config: /usr/local/openfire/conf/openfire.xml
# config: /etc/sysconfig/openfire
# pidfile: /var/run/openfire.pid
#
# This script has currently been tested on Redhat, CentOS, and Fedora based
......@@ -25,22 +25,22 @@ RETVAL=0
[ "`id -u`" = 0 ] || exit 1
# 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.
[ -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"
# -----------------------------------------------------------------
# If a openfire home variable has not been specified, try to determine it.
if [ -z "$OPENFIRE_HOME" -o ! -d "$OPENFIRE_HOME" ]; then
if [ -d "/opt/openfire" ]; then
OPENFIRE_HOME="/opt/openfire"
elif [ -d "/usr/local/openfire" ]; then
if [ -d "/usr/local/openfire" ]; then
OPENFIRE_HOME="/usr/local/openfire"
elif [ -d "/opt/openfire" ]; then
OPENFIRE_HOME="/opt/openfire"
else
echo "Could not find Openfire installation under /opt or /usr/local."
echo "Please specify the Openfire installation location as variable OPENFIRE_HOME"
......@@ -115,7 +115,7 @@ start() {
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
cd $OLD_PWD
......@@ -130,7 +130,7 @@ stop() {
echo
[ $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() {
......@@ -140,7 +140,7 @@ restart() {
}
condrestart() {
[ -e "/var/lock/subsys/openfired" ] && restart
[ -e "/var/lock/subsys/openfire" ] && restart
return 0
}
......
# Set this to the path where openfire lives.
# If this is not set the script will look for /opt/openfire, then
# /usr/local/openfire.
# If this is not set the script will look for /usr/local/openfire, then
# /opt/openfire.
#OPENFIRE_HOME=""
# If there is a different user you would like to run openfire as,
......@@ -9,7 +9,7 @@
# If you wish to change the location of the openfire pid file,
# 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,
# 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