File corosync.spec of Package corosync

#
# spec file for package openais (Version 0.82)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

%if 0%{?suse_version}
%define _libexecdir %{_libdir}
%endif
%define ais_uid         39
%define ais_user	ais
Name:           corosync
Summary:        Stuff
Version:        0.92
Release:        1
License:        BSD 3-Clause
%if 0%{?fedora_version}
Group:          Productivity/Clustering/HA
%else
Group:          Productivity/Clustering/HA
%endif
Url:            http://www.openais.org/
# r1701
Source0:        corosync-%{version}.tar.gz
Patch0:         corosync-0.92-silence-compiler.patch
#Patch1:         install.patch
#Patch2:         keygen.patch
#Patch3:         disable-crypto.patch
#Patch4:         ucred.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires(pre): /usr/sbin/useradd
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig

%description 
Write me.

%package devel
License:        BSD 3-Clause
Summary:        Foo
%if 0%{?fedora_version}
Group:          Productivity/Clustering/HA
%else
Group:          Productivity/Clustering/HA
%endif
Requires:       %{name} = %{version}-%{release}

%description devel
Write me.


%debug_package
%prep
%setup
%patch0 -p1

%build
# -O3 required for performance reasons
# So we get proper debug output, for now we don't compile with O3
#CFLAGS="$(echo '%{optflags}' | sed -e 's/-O[0-9]*//') -O3"
#CFLAGS="$(echo '%{optflags}')"
make CFLAGS="$RPM_OPT_FLAGS -g -O0" LCRSODIR=%{_libexecdir}/lcrso PREFIX=%{_prefix}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix} LCRSODIR=%{_libexecdir}/lcrso STATICLIBS=NO
find $RPM_BUILD_ROOT -name '*.a' -type f -print0 | xargs -0 rm -f
find $RPM_BUILD_ROOT -name '*.la' -type f -print0 | xargs -0 rm -f

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files 
%defattr(-,root,root,-)
# modules, so ok
%{_libdir}/corosync
%{_libdir}/lcrso
%{_prefix}/sbin/*
%config(noreplace) %{_sysconfdir}/corosync.conf
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/*.conf
%{_mandir}/man5/*.5.gz
%{_mandir}/man8/*.8.gz

%files devel
%defattr(-,root,root,-)
%{_includedir}/corosync
%{_mandir}/man3/*.3.gz

%changelog
openSUSE Build Service is sponsored by