James,
Provided you set up your rpmbuild directory structure correctly you can
use the attached spec file to build an olsrd rpm:
# mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
# cp olsrd-0.6.5.1.tar.bz2 ~/rpmbuild/SOURCES
# rpmbuild -ba olsrd.spec --define "_topdir ~/rpmbuild"
Note: I lasted used this to build olsrd-0.6.5.1.
--
Steven Galgano
Adjacent Link LLC
www.adjacentlink.com
On 07/19/2013 03:21 PM, J. Morris wrote:
> Yeah, I was just following up on that; this is my first RPM based
> distribution, and in learning the ins and outs of rpm and yum, I missed
> the trans-virtual package. I can start emanetransportd now. It also
> starts in the first demo, although olsrd still doesn't start. I'm
> willing to bet I goofed on that installation, as well…
>
> ___________________________________________
> James B. Morris
> Dept. of Electrical, Computer, and Systems Engineering
>
> [email protected] <mailto:[email protected]>
> JEC 6212
> Rensselaer Polytechnic Institute
> 110 8th St.
> Troy, NY 12180-3590
Summary: OLSR Daemon
Name: olsrd
Version: 0.6.5.1
Release: 1
License: BSD
Packager: [email protected]
Group: System Environment/Daemons
Source: http://www.olsr.org/releases/0.5/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} libdir=%{_libdir}
make %{?_smp_mflags} libdir=%{_libdir} libs
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/%{_sbindir}
mkdir -p %{buildroot}/%{_libdir}
mkdir -p %{buildroot}/%{_initrddir}
mkdir -p %{buildroot}/%{_datadir}/man/man8
mkdir -p %{buildroot}/%{_datadir}/man/man5
make DESTDIR=%{buildroot} sbindir=%{_sbindir} datarootdir=%{_datadir} install
make DESTDIR=%{buildroot} libdir=%{_libdir} datarootdir=%{_datadir} 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-Olsr-Extensions CHANGELOG
#%doc lib/*/*README*
%config(noreplace) %{_sysconfdir}/olsrd.conf
%config %{_initrddir}/olsrd
%{_sbindir}/olsrd
# Wildchar to cover all installed plugins
%{_libdir}/olsrd_*so*
%{_datadir}/man/man8/olsrd.8.gz
%{_datadir}/man/man5/olsrd.conf.5.gz
%{_libdir}/libOlsrdPudWireFormat.so
%{_libdir}/libOlsrdPudWireFormat.so.1.1.0
%{_libdir}/libnmea.so
%{_libdir}/libnmea.so.1.0.3
%doc %{_datadir}/doc/olsrd/olsrd.pud.position.conf
%doc %{_datadir}/doc/olsrd/olsrd.sgw.speed.conf
%changelog
* Tue Jul 17 2007 Roar Bjørgum Rotvik <[email protected]>
- Created spec-file for 0.5.2
* Mon Jul 09 2007 Roar Bjørgum Rotvik <[email protected]>
- Created spec-file for 0.5.1
* Tue Apr 03 2007 Roar Bjørgum Rotvik <[email protected]>
- Created spec-file for 0.5.0
- Changed from INSTALL_PREFIX to DESTDIR
* Wed Jan 04 2006 Roar Bjørgum Rotvik <[email 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 <[email protected]>
- Created spec-file for 0.4.9
* Tue Mar 29 2005 Roar Bjørgum Rotvik <[email protected]>
- Increased version number for nameservice and secure plugin
* Tue Dec 07 2004 Roar Bjørgum Rotvik <[email 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 <[email 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 <[email 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 <[email 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 <[email 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 <[email protected]>
- Included init-script to start uolsrd daemon (installs as %{_initrddir}/uolsrd).
* Wed Feb 25 2004 Roar Bjørgum Rotvik <[email 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 <[email protected]>
- Created first version of this spec-file
_______________________________________________
emane-users mailing list
[email protected]
http://pf.itd.nrl.navy.mil/mailman/listinfo/emane-users