[Olsr-cvs] olsrd-current/redhat olsrd.spec,NONE,1.1

Bernd Petrovitsch (spam-protected)
Mon Feb 5 22:10:00 CET 2007


Update of /cvsroot/olsrd/olsrd-current/redhat
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv598/redhat

Added Files:
	olsrd.spec 
Log Message:
* added updated .spec file from Roar =?ISO-8859-1?Q?Bj=F8rgum?= Rotvik <(spam-protected)>

--- NEW FILE: olsrd.spec ---
Summary:   OLSR Daemon
Name:      olsrd
Version:   current
Release:   1
License:   BSD
Packager:  (spam-protected)
Group:     System Environment/Daemons
Source:    http://www.olsr.org/releases/0.4/olsrd-%{version}.tar.bz2
URL:       http://www.olsr.org/
BuildRoot: %{_tmppath}/%{name}-root
Provides:  olsrd

%description
olsrd is an implementation of the Ad Hoc routing protocol OLSR (RFC3626).
OLSRD provides (multihop) routing in a dynamic, changing Ad Hoc network,
wired or wireless.
This version supports both IPv4 and IPv6.
See http://www.olsr.org/ for more info.

%prep
%setup 

%{__cat} << 'EOF' > %{name}.init
#!/bin/bash
#
# Startup script for the OLSR Daemon
#
# chkconfig: 235 16 84
# description: This script starts OLSRD (Ad Hoc routing protocol)
#
# processname: olsrd
# config: %{_sysconfdir}/olsrd.conf
# pidfile: %{_localstatedir}/run/olsrd.pid

source %{_initrddir}/functions
source %{_sysconfdir}/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

[ -x %{_sbindir}/olsrd ] || exit 1
[ -r %{_sysconfdir}/olsrd.conf ] || exit 1

RETVAL=0
prog="olsrd"
desc="Ad Hoc routing protocol"

start() {
        echo -n $"Starting $desc ($prog): "
	daemon $prog -d 0 
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch %{_localstatedir}/lock/subsys/$prog
        return $RETVAL
}

stop() {
        echo -n $"Shutting down $desc ($prog): "
        killproc $prog
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && rm -f %{_localstatedir}/lock/subsys/$prog
        return $RETVAL
}

reload() {
        echo -n $"Reloading $desc ($prog): "
        killproc $prog -HUP
        RETVAL=$?
        echo
        return $RETVAL
}

restart() {
        stop
        start
}

case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        restart
        ;;
  reload)
        reload
        ;;
  condrestart)
        [ -e %{_localstatedir}/lock/subsys/$prog ] && restart
        RETVAL=$?
        ;;
  status)
	status olsrd
	;;
  *)
        echo $"Usage $0 {start|stop|restart|reload|condrestart|status}"
        RETVAL=1
esac

exit $RETVAL
EOF


%build
make %{?_smp_mflags}
make %{?_smp_mflags} libs
#cd lib/dyn_gw && make %{?_smp_mflags} OS=linux
#cd ../dot_draw && make %{?_smp_mflags} OS=linux
#cd ../httpinfo && make %{?_smp_mflags} OS=linux
#cd ../nameservice && make %{?_smp_mflags} OS=linux
#cd ../powerinfo && make %{?_smp_mflags} OS=linux
#cd ../secure && make %{?_smp_mflags} OS=linux
#cd ../..

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/usr/sbin/
mkdir -p %{buildroot}/usr/lib/
mkdir -p %{buildroot}%{_initrddir}
mkdir -p %{buildroot}/usr/share/man/man8
make DESTDIR=%{buildroot} install
make DESTDIR=%{buildroot} install_libs
%{__install} -m0755 olsrd.init %{buildroot}%{_initrddir}/olsrd


%clean
rm -rf %{buildroot}

%preun
/etc/init.d/olsrd stop
/sbin/chkconfig --del olsrd

%post
#/sbin/chkconfig --add olsrd
# Default to not start olsrd automatic
/sbin/chkconfig olsrd off
echo "Now please edit /etc/olsrd.conf and run 'service olsrd start' or '/etc/init.d/olsrd start' to start olsrd"
echo "Run 'chkconfig olsrd on' to enable automatic starting of olsrd"

%files
%defattr(-, root, root, 0755)
%doc README CHANGELOG
%doc lib/dyn_gw/README_DYN_GW lib/dot_draw/README_DOT_DRAW lib/httpinfo/README_HTTPINFO
%doc lib/secure/SOLSR-README lib/pgraph/README-OLSR
# Do not overwrite original README, should rename these files
#%doc lib/nameservice/README lib/mini/README
%config(noreplace) %{_sysconfdir}/olsrd.conf
%config %{_initrddir}/olsrd
/usr/sbin/olsrd
# Wildchar to cover all installed plugins
/usr/lib/olsrd_*so*
/usr/share/man/man8/olsrd.8.gz
/usr/share/man/man5/olsrd.conf.5.gz

%changelog
* Mon Feb  5 2007 Bernd Petrovitsch <(spam-protected)>
- updated to CVS-HEAD:
- s/INSTALL_PREFIX/DESTDIR/
- removed references to the powerinfo plugin since it is gone

* Wed Jan 04 2006 Roar Bjørgum Rotvik <(spam-protected)>
- Created spec-file for 0.4.10
- Removed OS=linux option to make
- Updated plugin file list, added wildchar for plugins

* Tue Apr 05 2005 Roar Bjørgum Rotvik <(spam-protected)>
- Created spec-file for 0.4.9

* Tue Mar 29 2005 Roar Bjørgum Rotvik <(spam-protected)>
- Increased version number for nameservice and secure plugin

* Tue Dec 07 2004 Roar Bjørgum Rotvik <(spam-protected)>
- Changed spec file for olsrd-0.4.8
- Removed frontend GUI inclusion
- Removed references to Unik
- Changed licence to BSD

* Tue Jun 29 2004 Roar Bjørgum Rotvik <(spam-protected)>
- Changed spec file for unik-olsrd-0.4.5
- Remover ROOT-prefix patch as INSTALL_PREFIX is added to Makefile in 0.4.5
- Added INSTALL_PREFIX patch for front-end/Makefile
- Included plugins dot_draw and secure
- Added documentation for the plugins dyn_gw, powerinfo, dot_draw and secure

* Tue May 25 2004 Roar Bjørgum Rotvik <(spam-protected)>
- Changed spec file for unik-olsrd-0.4.4
- Added man-page for olsrd
- Removed documentation olsrd-plugin-howto.pdf as it is no longer part of source package

* Tue Mar 02 2004 Roar Bjørgum Rotvik <(spam-protected)>
- Changed spec file for unik-olsrd-0.4.3
- Added OLSRD plugins olsrd_dyn_gw and olsrd_power to package
- Added documentation olsrd-plugin-howto.pdf

* Tue Mar 02 2004 Roar Bjørgum Rotvik <(spam-protected)>
- Renamed package from uolsrd to unik-olsrd to use the same name as the .deb-package
- Start olsrd daemon with option "-d 0" to start without debugging and in daemon mode
  even if debugging is enabled in olsrd.conf.

* Mon Mar 01 2004 Roar Bjørgum Rotvik <(spam-protected)>
- Included init-script to start uolsrd daemon (installs as %{_initrddir}/uolsrd).

* Wed Feb 25 2004 Roar Bjørgum Rotvik <(spam-protected)>
- Changed Group from Applications/System to System Environment/Daemons.
- Included olsrd-gui (forgotten in first release)
- Renamed spec file from unik-olsrd-0.4.0.spec to uolsrd-0.4.0.spec

* Wed Feb 25 2004 Roar Bjørgum Rotvik <(spam-protected)>
- Created first version of this spec-file






More information about the Olsr-cvs mailing list