Page MenuHomeClusterLabs Projects

kronosnet.spec.in
No OneTemporary

kronosnet.spec.in

###############################################################################
###############################################################################
##
## Copyright (C) 2010-2012 Red Hat, Inc. All rights reserved.
##
## This copyrighted material is made available to anyone wishing to use,
## modify, copy, or redistribute it subject to the terms and conditions
## of the GNU General Public License v.2 or higher
##
###############################################################################
###############################################################################
# keep around ready for later user
%global alphatag @alphatag@
%global numcomm @numcomm@
%global dirty @dirty@
# main (empty) package
# http://www.rpm.org/max-rpm/s1-rpm-subpack-spec-file-changes.html
Name: kronosnet
Summary: Multipoint-to-Multipoint VPN daemon
Version: @version@
Release: 1%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist}
License: GPLv2+ and LGPLv2+
Group: System Environment/Base
URL: https://github.com/fabbione/kronosnet/
Source0: https://github.com/fabbione/kronosnet/archive/%{name}-%{version}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}.tar.gz
## Setup/build bits
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
# Build dependencies
BuildRequires: libqb-devel nss-devel pam-devel
%prep
%setup -q -n %{name}-%{version}%{?numcomm:.%{numcomm}}%{?alphatag:-%{alphatag}}%{?dirty:-%{dirty}}
%build
%{configure} \
--with-initdefaultdir=%{_sysconfdir}/sysconfig/ \
%if %{defined _unitdir}
--with-systemddir=%{_unitdir}
%else
--with-initddir=%{_sysconfdir}/rc.d/init.d/
%endif
make %{_smp_mflags}
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
# tree cleanup
# remove static libraries
find %{buildroot} -name "*.a" -exec rm {} \;
# remove libtools leftovers
find %{buildroot} -name "*.la" -exec rm {} \;
# handle systemd vs init script
%if %{defined _unitdir}
# remove init scripts
rm -rf %{buildroot}/etc/init.d
%else
# remove systemd specific bits
find %{buildroot} -name "*.service" -exec rm {} \;
%endif
# remove docs
rm -rf %{buildroot}/usr/share/doc/kronosnet
%clean
rm -rf %{buildroot}
# main empty package
%description
kronosnet source
## Runtime and subpackages section
%package -n kronosnetd
Group: System Environment/Base
Summary: Multipoint-to-Multipoint VPN daemon
%if %{defined _unitdir}
# Needed for systemd unit
Requires(post): systemd-sysv
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
%else
Requires(post): chkconfig
Requires(preun): chkconfig, initscripts
%endif
Requires(post): shadow-utils
Requires(preun): shadow-utils
Requires: pam, /etc/pam.d/passwd
%description -n kronosnetd
The kronosnet daemon is a bridge between kronosnet switching engine
and kernel network tap devices, to create and administer a
distributed LAN over multipoint-to-multipoint VPNs.
The daemon does a poor attempt to provide a configure UI similar
to other known network devices/tools (Cisco, quagga).
Beside looking horrific, it allows runtime changes and
reconfiguration of the kronosnet(s) without daemon reload
or service disruption.
%post -n kronosnetd
%if %{defined _unitdir}
%if 0%{?systemd_post:1}
%systemd_post kronosnetd.service
%else
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
%endif
%else
/sbin/chkconfig --add kronosnetd
%endif
/usr/sbin/groupadd --force --system @defaultadmgroup@
%preun -n kronosnetd
%if %{defined _unitdir}
%if 0%{?systemd_preun:1}
%systemd_preun kronosnetd.service
%else
if [ "$1" -eq 0 ]; then
/bin/systemctl --no-reload disable kronosnetd.service
/bin/systemctl stop kronosnetd.service >/dev/null 2>&1
fi
%endif
%else
if [ "$1" = 0 ]; then
/sbin/service kronosnetd stop >/dev/null 2>&1
/sbin/chkconfig --del kronosnetd
fi
%endif
%files -n kronosnetd
%defattr(-,root,root,-)
%doc COPYING.* COPYRIGHT
%dir %{_sysconfdir}/kronosnet
%dir %{_sysconfdir}/kronosnet/*
%config(noreplace) %{_sysconfdir}/sysconfig/kronosnetd
%config(noreplace) %{_sysconfdir}/pam.d/kronosnetd
%config(noreplace) %{_sysconfdir}/logrotate.d/kronosnetd
%if %{defined _unitdir}
%{_unitdir}/kronosnetd.service
%else
%config(noreplace) %{_sysconfdir}/rc.d/init.d/kronosnetd
%endif
%{_sbindir}/*
%{_mandir}/man8/*
%package -n libtap0
Group: System Environment/Libraries
Summary: Simple userland wrapper around kernel tap devices
%description -n libtap0
This is an over-engineered commodity library to manage a pool
of tap devices and provides the basic
pre-up.d/up.d/down.d/post-down.d infrastructure.
%files -n libtap0
%defattr(-,root,root,-)
%doc COPYING.* COPYRIGHT
%{_libdir}/libtap.so.*
%post -n libtap0 -p /sbin/ldconfig
%postun -n libtap0 -p /sbin/ldconfig
%package -n libtap0-devel
Group: Development/Libraries
Summary: Simple userland wrapper around kernel tap devices (developer files)
Requires: libtap0 = %{version}-%{release}
Requires: pkgconfig
%description -n libtap0-devel
This is an over-engineered commodity library to manage a pool
of tap devices and provides the basic
pre-up.d/up.d/down.d/post-down.d infrastructure.
%files -n libtap0-devel
%defattr(-,root,root,-)
%doc COPYING.* COPYRIGHT
%{_libdir}/libtap.so
%{_includedir}/libtap.h
%{_libdir}/pkgconfig/libtap.pc
%package -n libknet0
Group: System Environment/Libraries
Summary: Kronosnet core switching implementation
%description -n libknet0
The whole kronosnet core is implemented in this library.
Please refer to the not-yet-existing documentation for further
information.
%files -n libknet0
%defattr(-,root,root,-)
%doc COPYING.* COPYRIGHT
%{_libdir}/libknet.so.*
%post -n libknet0 -p /sbin/ldconfig
%postun -n libknet0 -p /sbin/ldconfig
%package -n libknet0-devel
Group: Development/Libraries
Summary: Kronosnet core switching implementation (developer files)
Requires: libknet0 = %{version}-%{release}
Requires: pkgconfig
%description -n libknet0-devel
The whole kronosnet core is implemented in this library.
Please refer to the not-yet-existing documentation for further
information.
%files -n libknet0-devel
%defattr(-,root,root,-)
%doc COPYING.* COPYRIGHT
%{_libdir}/libknet.so
%{_includedir}/libknet.h
%{_libdir}/pkgconfig/libknet.pc
%changelog
* @date@ Autotools generated version <nobody@nowhere.org> - @version@-1-@numcomm@.@alphatag@.@dirty@
- These aren't the droids you're looking for.

File Metadata

Mime Type
text/plain
Expires
Mon, Dec 23, 10:56 PM (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1129272
Default Alt Text
kronosnet.spec.in (6 KB)

Event Timeline