Search
j0ke.net Open Build Service
>
Projects
>
ha
>
keepalived-ipv6
> keepalived.spec
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File keepalived.spec of Package keepalived-ipv6
# needsrootforbuild %define git 0 Name: keepalived Summary: HA monitor built upon LVS, VRRP and services poller Version: 1.3.4 Release: 20 Url: http://www.keepalived.org/ %if 0%{?git} == 1 Source0: %{name}-%{version}git.tar.bz2 %else Source0: http://www.keepalived.org/software/%{name}-%{version}.tar.bz2 %endif Source1: %{name}.init Source2: %{name}.service #Patch0: %{name}-initdir.diff #Patch1: %{name}-rh-modprobe.patch # selected patches from http://cgit.luffy.cx/keepalived/log/?h=fixes-1.2.0 License: GPL Group: Applications/System BuildRoot: /tmp/%{name}-%{version}.build BuildRequires: openssl-devel ipvsadm libnl3-devel libnl-devel pkgconfig BuildRequires: libnfnetlink-devel BuildRequires: net-snmp-devel >= 5.7 %if 0%{?suse_version} BuildRequires: kernel-source popt-devel %endif %if 0%{?rhel_version} || 0%{?centos_version} || 0%{?fedora_version} || 0%{?redhat_version} || 0%{?sl_version} BuildRequires: kernel-devel popt %if 0%{?rhel_version} >= 600 || 0%{?sl_version} >= 600 || 0%{?centos_version} >= 6 BuildRequires: popt-devel %endif %define kdir %(echo `find /usr/src/kernels -maxdepth 1 -type d |grep "2.6"`) %endif Requires: ipvsadm %description The main goal of the keepalived project is to add a strong & robust keepalive facility to the Linux Virtual Server project. This project is written in C with multilayer TCP/IP stack checks. Keepalived implements a framework based on three family checks : Layer3, Layer4 & Layer5. This framework gives the daemon the ability of checking a LVS server pool states. When one of the server of the LVS server pool is down, keepalived informs the linux kernel via a setsockopt call to remove this server entrie from the LVS topology. In addition keepalived implements a VRRPv2 stack to handle director failover. So in short keepalived is a userspace daemon for LVS cluster nodes healthchecks and LVS directors failover. %prep rm -rf %{buildroot} %if 0%{?git} == 1 %setup -q -n %{name} %else %setup -q %endif ##%patch0 -p1 ##%patch1 %build #export CFLAGS=-D__KERNGLUE__ # the setting of mandir should be %{buildroot}/usr/share/man, but the # makefile adds "man" itself. ./configure --prefix=%{_prefix} \ --exec-prefix=%{_prefix} \ --sysconfdir=%{_sysconfdir} \ %if 0%{?suse_version} --with-kernel-dir=/usr/src/linux \ %endif %if 0%{?rhel_version} || 0%{?centos_version} || 0%{?fedora_version} || 0%{?redhat_version} || 0%{?sl_version} --with-kernel-dir=%{kdir} \ %endif --mandir=%{_prefix}/share/man \ --enable-snmp \ --enable-snmp-rfc \ --enable-snmp-vrrp --enable-snmp-rfc --enable-snmp-rfcv2 --enable-snmp-rfcv3 --enable-dbus --enable-dbus-create-instance --enable-sha1 --enable-mem-check --enable-mem-check-log --enable-stracktrace \ --enable-snmp-checker \ --enable-syncd || cat config.log %{__make} find doc -name \*.orig -exec rm {} \; %install rm -rf %{buildroot} %__make DESTDIR=%{buildroot} install cd $RPM_BUILD_ROOT/%{_sbindir} %if 0%{?suse_version} >= 1310 || 0%{?sles_version} >= 12 || 0%{?rhel} >= 7 %__install -D -m0644 %{S:2} %{buildroot}/usr/lib/systemd/system/%{name}.service rm -f %{buildroot}/etc/init.d/keepalived %{buildroot}/etc/sysconfig/%{name} %else %if 0%{?suse_version} cp %{S:1} %{buildroot}/etc/init.d/keepalived # move sysconfig file mkdir -p %{buildroot}/var/adm/fillup-templates mv %{buildroot}/etc/sysconfig/%{name} %{buildroot}/var/adm/fillup-templates/sysconfig.%{name} %endif ln -sf ../../etc/init.d/keepalived rckeepalived %endif rm -rf %{buildroot}/etc/keepalived/samples find %{buildroot} -name \*.orig -exec rm {} \; %clean rm -rf %{buildroot} %post %if 0%{?suse_version} %fillup_and_insserv %{name} %endif %preun %if 0%{?suse_version} %stop_on_removal %{name} %endif %postun %if 0%{?suse_version} %restart_on_update %{name} %{insserv_cleanup} %endif %files %defattr(-,root,root) %{_bindir}/genhash %{_sbindir}/keepalived %if 0%{?suse_version} >= 1310 || 0%{?sles_version} >= 12 || 0%{?rhel} >= 7 /usr/lib/systemd/system/%{name}.service %else %if 0%{?suse_version} /var/adm/fillup-templates/sysconfig.%{name} %else %config %{_sysconfdir}/sysconfig/keepalived %endif %{_sysconfdir}/init.d/keepalived %{_sbindir}/rckeepalived %endif %dir %{_sysconfdir}/keepalived/ %config(noreplace) %{_sysconfdir}/keepalived/keepalived.conf %dir %{_datadir}/snmp %dir %{_datadir}/snmp/mibs %{_datadir}/snmp/mibs/KEEPALIVED-MIB %{_datadir}/snmp/mibs/VRRP-MIB %{_datadir}/snmp/mibs/VRRPv3-MIB %doc %{_mandir}/man5/keepalived.conf.5* %doc %{_mandir}/man1/genhash.1* %doc %{_mandir}/man8/keepalived.8* %doc doc %doc AUTHOR CONTRIBUTORS TODO COPYING README INSTALL ChangeLog %changelog