summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordlaniel <dlaniel@3ed937ae-f919-0410-9a43-8e6f19e4ba6e>2009-03-09 14:45:18 (GMT)
committerdlaniel <dlaniel@3ed937ae-f919-0410-9a43-8e6f19e4ba6e>2009-03-09 14:45:18 (GMT)
commit9829fe77111d91f41ba6c5c350a97e4cf06a0f81 (patch)
tree54723025d38afbef736d8d17b59381a0991dcbd4
parentb606112554dbdad0d0eef37c0b57dc1296d19ccf (diff)
downloadlarpe-9829fe77111d91f41ba6c5c350a97e4cf06a0f81.zip
larpe-9829fe77111d91f41ba6c5c350a97e4cf06a0f81.tar.gz
larpe-9829fe77111d91f41ba6c5c350a97e4cf06a0f81.tar.bz2
updated Fedora packaging files
git-svn-id: svn+ssh://labs.libre-entreprise.org/svnroot/larpe@458 3ed937ae-f919-0410-9a43-8e6f19e4ba6e
-rwxr-xr-xlarpe/trunk/fedora/larpe.init100
-rw-r--r--larpe/trunk/fedora/larpe.spec74
2 files changed, 110 insertions, 64 deletions
diff --git a/larpe/trunk/fedora/larpe.init b/larpe/trunk/fedora/larpe.init
index 7023534..a41681f 100755
--- a/larpe/trunk/fedora/larpe.init
+++ b/larpe/trunk/fedora/larpe.init
@@ -1,78 +1,104 @@
#! /bin/bash
+#
+# larpe Startup script for the Larpe reverse proxy
+#
+# description: Larpe is Liberty Alliance reverse proxy. It is used to add Liberty Alliance \
+# features to some sites without modifying the sites themselves.
+# processname: larpe
+# config: /etc/httpd/conf.d/larpe.conf
+# config: /etc/larpe/apache2-vhost-larpe-common
+# config: /etc/sysconfig/larpe
+# pidfile: /var/run/larpe.pid
+#
+
### BEGIN INIT INFO
# Provides: larpe
# Required-Start: $local_fs $network
# Required-Stop: $local_fs $network
-# Default-Start: 2 3 4 5
-# Default-Stop: 0 1 6
+# Default-Start:
+# Default-Stop: 0 1 2 3 4 5 6
# Short-Description: Start Larpe Liberty Alliance reverse proxy
# Description: Start Larpe Liberty Alliance reverse proxy
### END INIT INFO
-#
-# larpe Startup script for the Larpe reverse proxy
-#
-# description: Larpe is Liberty Alliance reverse proxy. It is used to add Liberty Alliance \
-# features to some sites without modifying the sites themselves.
-# processname: larpe
-# pidfile: /var/run/larpe.pid
-# Gracefully exit if the package has been removed.
-test -x $DAEMON || exit 0
+prog=larpe
+LARPECTL=/usr/sbin/larpectl
+PIDFILE=/var/run/larpe.pid
# Source function library.
. /etc/rc.d/init.d/functions
-PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-DESC="larpe"
-NAME=larpe
-DAEMON=/usr/sbin/larpectl
-PIDFILE=/var/run/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
+# Source networking configuration.
+. /etc/sysconfig/network
-prog=larpe
-RETVAL=0
+# Check that networking is up.
+[ ${NETWORKING} = "no" ] && exit 0
+
+[ -x $LARPECTL ] || exit 5
# Read config file if it is present.
-if [ -r /etc/default/$NAME ]
-then
- . /etc/default/$NAME
+if [ -f /etc/sysconfig/larpe ]; then
+ . /etc/sysconfig/larpe
fi
+RETVAL=0
+
#
# Function that starts the daemon/service.
#
start() {
- echo -n $"Starting $prog: "
+ echo -n $"Starting $prog: "
+ $LARPECTL start &
+ RETVAL=$?
+ if [ $RETVAL -eq 0 ]
+ then
+ touch /var/lock/subsys/$prog
+ fi
+ echo
+ return $RETVAL
}
#
# Function that stops the daemon/service.
#
stop() {
- echo -n $"Stopping $prog: "
+ echo -n $"Stopping $prog: "
+ killproc $LARPECTL
+ RETVAL=$?
+ if [ $RETVAL -eq 0 ]
+ then
+ rm -rf /var/lock/subsys/$prog
+ fi
+ echo
+ return $RETVAL
}
# See how we were called.
case "$1" in
- start)
- start
+ start)
+ start
;;
- stop)
- stop
+ stop)
+ stop
;;
- restart)
- stop
- start
+ status)
+ status $prog
+ RETVAL=$?
;;
- condrestart)
- if [ -f ${PIDFILE} ] ; then
+ restart)
stop
start
- fi
;;
- *)
- echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
- exit 1
+ condrestart)
+ if [ -f ${PIDFILE} ] ; then
+ stop
+ start
+ fi
+ ;;
+ *)
+ echo $"Usage: $prog {start|stop|restart|condrestart|status}"
+ exit 1
esac
exit $RETVAL
+
diff --git a/larpe/trunk/fedora/larpe.spec b/larpe/trunk/fedora/larpe.spec
index 6cc2053..21932dc 100644
--- a/larpe/trunk/fedora/larpe.spec
+++ b/larpe/trunk/fedora/larpe.spec
@@ -6,18 +6,20 @@
Summary: Liberty Alliance Reverse Proxy
Name: larpe
Version: 0.2.9
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPL
Group: System Environment/Applications
+Url: http://larpe.labs.libre-entreprise.org/
Source0: http://labs.libre-entreprise.org/frs/download.php/591/%{name}-%{version}.tar.gz
Buildroot: %{_tmppath}/%{name}-%{version}-%(id -u -n)
BuildRequires: python >= 2.3, python-quixote >= 2.0
-Requires: httpd >= 2.0, mod_scgi, mod_python, mod_proxy_html
+BuildRequires: gettext
+Requires: httpd >= 2.0, mod_scgi, mod_proxy_html
Requires: lasso-python >= 0.6.3, python-quixote >= 2.0, python-scgi
-
-Url: http://larpe.labs.libre-entreprise.org/
-Vendor: Entr'ouvert http://www.entrouvert.com/en/
-Packager: Jean-Marc Liger <jmliger@siris.sorbonne.fr>
+Requires: initscripts
+Requires(post): /sbin/chkconfig
+Requires(preun):/sbin/chkconfig
+Requires(preun): /sbin/service
%description
Larpe is a Liberty Alliance Reverse Proxy. It allows any service provider (that is a website)
@@ -39,6 +41,11 @@ This package contains development documentation for %{name}.
%prep
%setup -q
+# Change Apache vhost path in Larpe config
+sed -i s#"/var/log/apache2/larpe-access.log"#"logs/larpe_access_log combined\n TransferLog logs/larpe_access_log"# conf/apache2-vhost-larpe
+sed -i s#"/var/log/apache2/larpe-error.log"#"logs/larpe_error_log"# conf/apache2-vhost-larpe
+sed -i s#"APACHE_MAIN_VHOST.*$"#"APACHE_MAIN_VHOST='/etc/httpd/conf.d/larpe.conf'"# larpe/Defaults.py
+
%build
%install
@@ -48,38 +55,44 @@ rm -rf %{buildroot}
make install prefix=%{_prefix} DESTDIR=%{buildroot}
# install init script
-#install -p -m 755 fedora/larpe.init %{buildroot}%{_sysconfdir}/init.d/larpe
+install -d %{buildroot}/%{_initrddir}
+install -p -m 0755 fedora/larpe.init %{buildroot}%{_initrddir}/larpe
# apache configuration
mkdir -p %{buildroot}%{apacheconfdir}
install -p -m 644 conf/apache2-vhost-larpe %{buildroot}%{apacheconfdir}/larpe.conf
-# Apache reload script
-install -p fedora/larpe-reload-apache2-script %{buildroot}%{_sbindir}/
+# apache reload script
+install -p -m 0755 fedora/larpe-reload-apache2-script %{buildroot}%{_sbindir}/
# install doc files
-install -d %{buildroot}%{_datadir}/gtk-doc/html/%{name}
-make -C doc DESTDIR=%{buildroot}%{_datadir}/gtk-doc/html/%{name}
+install -d -m 0755 %{buildroot}%{_datadir}/gtk-doc/html/larpe
+make -C doc DESTDIR=%{buildroot}%{_datadir}/gtk-doc/html/larpe
-%post
-# install init script
-#/usr/lib/lsb/install_initd /etc/init.d/larpe
+%clean
+rm -fr %{buildroot}
-# Change Apache vhost path in Larpe config
-sed -i s#"APACHE_MAIN_VHOST.*$"#"APACHE_MAIN_VHOST='/etc/httpd/conf.d/larpe.conf'"# %{python_sitearch}/%{name}/Defaults.py
+%post
+/sbin/chkconfig --add %{name}
# manual post-installation
cat <<_EOF_
-You must edit first %{apacheconfdir}/%{name}.conf
+You must edit first %{apacheconfdir}/larpe.conf
+
+You must enable Larpe with "chkconfig larpe on ; service larpe start"
You must also restart Apache with "service httpd restart"!
_EOF_
-%clean
-rm -fr %{buildroot}
+%preun
+if [ $1 = 0 ]; then
+ /sbin/service %{name} stop > /dev/null 2>&1
+ /sbin/chkconfig --del %{name}
+fi
%files
-#%config %{_sysconfdir}/init.d/larpe
+%defattr(-,root,root,755)
+%config %{_initrddir}/larpe
%config(noreplace) %{apacheconfdir}/larpe.conf
%config(noreplace) %{_sysconfdir}/larpe/apache2-vhost-larpe-common
%{_sbindir}/larpectl
@@ -89,24 +102,32 @@ rm -fr %{buildroot}
%{_datadir}/%{name}
%{_datadir}/locale/fr/LC_MESSAGES/larpe.mo
/var/lib/larpe
-%doc README
-%doc COPYING
-%doc NEWS
-%doc AUTHORS
+%defattr(644,root,root,755)
+%doc AUTHORS COPYING NEWS README
%files doc
+%defattr(-,root,root)
%doc %{_datadir}/gtk-doc/html/%{name}
%changelog
+* Tue Mar 05 2009 Jean-Marc Liger <jmliger@siris.sorbonne.fr> 0.2.9-2
+- Added missing BuildRequires gettext
+- Enabled larpe init script
* Mon Jan 19 2009 Damien Laniel <dlaniel@entrouvert.com> 0.2.9-1
- Updated to 0.2.9
- Use Larpe Makefile to install generic files
- Copy fedora specific files
-* Tue Jan 13 2009 Jean-Marc Liger <jmliger@siris.sorbonne.fr> 0.2.1-1
+* Sat Jan 17 2009 Jean-Marc Liger <jmliger@siris.sorbonne.fr> 0.2.1-2
+- Added missing BuildRequires tetex-latex for doc subpackage
+- Rebuilt on CentOS 4,5
+
+* Wed Jan 14 2009 Jean-Marc Liger <jmliger@siris.sorbonne.fr> 0.2.1-1
- Updated to 0.2.1
-- Rebuilt on CentOS 4,5 and Fedora 9
+- Added missing Requires lasso-python
+- Added missing Requires python-scgi
+- Rebuilt on CentOS 4,5
* Fri Mar 02 2007 Jean-Marc Liger <jmliger@siris.sorbonne.fr> 0.2.0-1
- Updated to 0.2.0
@@ -116,4 +137,3 @@ rm -fr %{buildroot}
* Wed Jan 24 2007 Jean-Marc Liger <jmliger@siris.sorbonne.fr> 0.1.0-1
- First 0.1.0
- Built on Fedora Core 3 / RHEL 4 and Fedora Core 6 / RHEL 5
-