Add macros.sblim-cmpi-devel, Remove %%clean section

This commit is contained in:
Vitezslav Crhonek 2015-02-25 11:18:48 +01:00
parent 6bea0dfe7a
commit 849a059c7b
2 changed files with 78 additions and 5 deletions

67
macros.sblim-cmpi-devel Normal file
View File

@ -0,0 +1,67 @@
%sblim_pre() \
function unregister() \
{ \
# don't let registration failure when server not running fail upgrade! \
%{_datadir}/%{name}/provider-register.sh -d $1 -m %{SCHEMA} -r %{REGISTRATION} > /dev/null 2>&1 || :; \
} \
\
# if upgrading, deregister old version \
if [ $1 -gt 1 ]; then \
unregistered=no \
if [ -e /usr/sbin/cimserver ]; then \
unregister "-t pegasus"; \
unregistered=yes \
fi \
if [ -e /usr/sbin/sfcbd ]; then \
unregister "-t sfcb"; \
unregistered=yes \
fi \
if [ "$unregistered" != yes ]; then \
unregister \
fi \
fi
%sblim_post() \
function register() \
{ \
# don't let registration failure when server not running fail install! \
%{_datadir}/%{name}/provider-register.sh $1 -m %{SCHEMA} -r %{REGISTRATION} > /dev/null 2>&1 || :; \
} \
\
/sbin/ldconfig \
if [ $1 -ge 1 ]; then \
registered=no \
if [ -e /usr/sbin/cimserver ]; then \
register "-t pegasus"; \
registered=yes \
fi \
if [ -e /usr/sbin/sfcbd ]; then \
register "-t sfcb"; \
registered=yes \
fi \
if [ "$registered" != yes ]; then \
register \
fi \
fi
%sblim_preun() \
function unregister() \
{ \
# don't let registration failure when server not running fail upgrade! \
%{_datadir}/%{name}/provider-register.sh -d $1 -m %{SCHEMA} -r %{REGISTRATION} > /dev/null 2>&1 || :; \
} \
\
if [ $1 -eq 0 ]; then \
unregistered=no \
if [ -e /usr/sbin/cimserver ]; then \
unregister "-t pegasus"; \
unregistered=yes \
fi \
if [ -e /usr/sbin/sfcbd ]; then \
unregister "-t sfcb"; \
unregistered=yes \
fi \
if [ "$unregistered" != yes ]; then \
unregister \
fi \
fi

View File

@ -1,13 +1,15 @@
Name: sblim-cmpi-devel Name: sblim-cmpi-devel
Version: 2.0.3 Version: 2.0.3
Release: 6%{?dist} Release: 7%{?dist}
Summary: SBLIM CMPI Provider Development Support Summary: SBLIM CMPI Provider Development Support
Group: Development/Libraries Group: Development/Libraries
License: EPL License: EPL
URL: http://sblim.wiki.sourceforge.net/ URL: http://sblim.wiki.sourceforge.net/
Source0: http://downloads.sourceforge.net/sblim/%{name}-%{version}.tar.bz2 Source0: http://downloads.sourceforge.net/sblim/%{name}-%{version}.tar.bz2
# Source1: macro definitions
Source1: macros.sblim-cmpi-devel
# Patch0: remove version from docdir # Patch0: remove version from docdir
Patch0: sblim-cmpi-devel-2.0.3-docdir.patch Patch0: sblim-cmpi-devel-2.0.3-docdir.patch
@ -42,9 +44,9 @@ rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT
# remove unused libtool files # remove unused libtool files
rm -f $RPM_BUILD_ROOT/%{_libdir}/*a rm -f $RPM_BUILD_ROOT/%{_libdir}/*a
# install macro definitions
%clean mkdir -p $RPM_BUILD_ROOT%{_rpmconfigdir}/macros.d
rm -rf $RPM_BUILD_ROOT cp %{SOURCE1} $RPM_BUILD_ROOT%{_rpmconfigdir}/macros.d
%post -n libcmpiCppImpl0 -p /sbin/ldconfig %post -n libcmpiCppImpl0 -p /sbin/ldconfig
@ -53,14 +55,18 @@ rm -rf $RPM_BUILD_ROOT
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc AUTHORS COPYING README %doc AUTHORS COPYING README
%{_includedir}/cmpi %{_includedir}/cmpi
%{_rpmconfigdir}/macros.d/macros.sblim-cmpi-devel
%files -n libcmpiCppImpl0 %files -n libcmpiCppImpl0
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_libdir}/libcmpiCppImpl.so* %{_libdir}/libcmpiCppImpl.so*
%changelog %changelog
* Wed Feb 25 2015 Vitezslav Crhonek <vcrhonek@redhat.com> - 2.0.3-7
- Add macros.sblim-cmpi-devel
- Remove %%clean section
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.3-6 * Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild