Commit aa83b44c authored by Julien Muchembled's avatar Julien Muchembled

Package for RPM-based distributions and add missing licence file

parent 15b41aa8
This diff is collapsed.
re6stnet configuration files re6stnet configuration files
Init script only starts 're6stnet' daemon if there is a 're6stnet.conf' file re6stnet is started automatically if /etc/re6stnet contains a 're6stnet.conf'
in this directory containing all parameters to pass to the daemon. file with all parameters to pass to the daemon.
Same for the registry: all parameters must be specified in 're6st-registry.conf' Same for the registry: all parameters must be specified in 're6st-registry.conf'
So for a normal node, you should have the following files: So for a normal node, you should have the following files:
......
...@@ -19,7 +19,7 @@ override_dh_install: ...@@ -19,7 +19,7 @@ override_dh_install:
dh_install dh_install
install -d debian/re6stnet/usr/sbin install -d debian/re6stnet/usr/sbin
mv debian/re6stnet/usr/bin/re6stnet debian/re6stnet/usr/sbin mv debian/re6stnet/usr/bin/re6stnet debian/re6stnet/usr/sbin
install -Dpm 0644 debian/README.conf debian/re6stnet/etc/re6stnet/README install -Dpm 0644 daemon/README.conf debian/re6stnet/etc/re6stnet/README
install -Dp daemon/network-manager debian/re6stnet$(NM) install -Dp daemon/network-manager debian/re6stnet$(NM)
for a in up down; do \ for a in up down; do \
set debian/re6stnet/etc/network/if-$$a.d/re6stnet; \ set debian/re6stnet/etc/network/if-$$a.d/re6stnet; \
......
%define _builddir %(pwd)
Summary: resilient, scalable, IPv6 network application
Name: re6stnet
Version: 0
Release: %(git rev-list --topo-order --count HEAD).g%(git rev-parse --short HEAD)
License: GPLv2+
Group: Applications/Internet
BuildArch: noarch
Requires: babeld >= 1.3.1
Requires: iproute
Requires: openssl
Requires: openvpn
Requires: python = 2.7
Requires: pyOpenSSL
%description
%build
for x in docs/*.rst
do rst2man $x ${x%%.rst}.1
done
%install
set $RPM_BUILD_ROOT /lib/systemd/system
python2.7 setup.py install --prefix %_prefix --root=$1
install -d $1%_sbindir $1%_mandir/man1 $1$2
install -Dpm 0644 docs/*.1 $1%_mandir/man1
install -Dpm 0644 daemon/*.service $1$2
install -Dp daemon/network-manager $1/etc/NetworkManager/dispatcher.d/50re6stnet
install -Dpm 0644 daemon/README.conf $1/etc/re6stnet/README.conf
mv $1%_bindir/re6stnet $1%_sbindir
find $1 -mindepth 1 -type d -name re6st\* -printf /%%P\\n > INSTALLED
%clean
find "$RPM_BUILD_ROOT" -delete
rm INSTALLED
%files -f INSTALLED
%doc README
%_bindir/*
%_sbindir/*
%_mandir/*/*
/lib/systemd/system/*
/etc/NetworkManager/dispatcher.d/50re6stnet
%post
if [ $1 -eq 1 ]; then
/bin/systemctl enable re6stnet.service re6st-registry.service || :
fi >/dev/null 2>&1
%preun
if [ $1 -eq 0 ]; then
/bin/systemctl --no-reload disable re6stnet.service re6st-registry.service || :
/bin/systemctl stop re6stnet.service re6st-registry.service || :
fi >/dev/null 2>&1
%postun
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# only try to restart the registry (doing same for re6stnet could be troublesome)
/bin/systemctl try-restart re6st-registry.service >/dev/null 2>&1 || :
fi
%changelog
* Fri Dec 10 2012 Julien Muchembled <jm@nexedi.com>
- Initial package
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