[Libvirt-cim] [PATCH] Cleanups and schema install additions to the RPM spec
Daniel Veillard
veillard at redhat.com
Fri Nov 9 16:19:11 UTC 2007
On Fri, Nov 09, 2007 at 08:10:58AM -0700, Dan Smith wrote:
[...]
> diff -r 581a0f3fb078 -r d2f6398c7174 doc/Makefile.am
> --- a/doc/Makefile.am Fri Nov 09 08:10:08 2007 -0800
> +++ b/doc/Makefile.am Fri Nov 09 08:10:10 2007 -0800
> @@ -1,9 +1,25 @@ XSLTPROC = /usr/bin/xsltproc
> XSLTPROC = /usr/bin/xsltproc
>
> -WEB_PAGES = index.html
> +WEB_PAGES = index.html \
> + architecture.html \
> + downloads.html \
> + intro.html \
> + news.html \
> + platforms.html \
> + schema.html
> +
> +EXTRA_DIST = site.xsl libvirt-cim.html
I would add $(WEB_PAGES) to $(EXTRA_DIST)
> $(WEB_PAGES): libvirt-cim.html site.xsl
> - $(XSLTPROC) --nonet --html $(top_srcdir)/doc/site.xsl $(top_srcdir)/doc/libvirt-cim.html > index.html
> + -@(if [ -x $(XSLTPROC) ]; then \
> + $(XSLTPROC) --nonet --html $(top_srcdir)/doc/site.xsl $(top_srcdir)/doc/libvirt-cim.html > index.html; \
> + fi);
> +
> +install-data-local:
> + $(mkinstalldirs) $(DESTDIR)$(HTML_DIR)
> + @INSTALL@ -m 0644 $(srcdir)/*.html $(DESTDIR)$(HTML_DIR)
> +
> +clean-local:
> + rm -f $(WEB_PAGES)
and probably not remove on make clean to be able to 'make dist' with
them embedded in the tarball as xsltproc is not really a build requirement.
> all: $(WEB_PAGES)
> -
> diff -r 581a0f3fb078 -r d2f6398c7174 libvirt-cim.spec.in
> --- a/libvirt-cim.spec.in Fri Nov 09 08:10:08 2007 -0800
> +++ b/libvirt-cim.spec.in Fri Nov 09 08:10:10 2007 -0800
> @@ -34,7 +34,7 @@ rm -fr %{buildroot}
> rm -fr %{buildroot}
>
> %makeinstall PROVIDERDIR=%{buildroot}%{_libdir}/cmpi
> -cp provider-register.sh register_base.sh %{buildroot}%{_datadir}/libvirt-cim/
> +cp provider-register.sh %{buildroot}%{_datadir}/libvirt-cim/
> rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
> rm -f $RPM_BUILD_ROOT%{_libdir}/*.a
> rm -f $RPM_BUILD_ROOT%{_libdir}/cmpi/*.la
> @@ -43,17 +43,34 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/cmpi/*.a
> %clean
> rm -fr %{buildroot}
>
> +%pre
> +%define REGISTRATION %{_datadir}/%{name}/*.registration
> +%define SCHEMA %{_datadir}/%{name}/*.mof
> +
> +%{_datadir}/%{name}/provider-register.sh -d -t pegasus \
> + -n /@CIM_VIRT_NS@ \
> + -r %{REGISTRATION} -m %{SCHEMA} || true
> +
> %post
> /sbin/ldconfig
>
> -%postun
> +%{_datadir}/%{name}/provider-register.sh -t pegasus \
> + -n /@CIM_VIRT_NS@ \
> + -r %{REGISTRATION} -m %{SCHEMA} || true
> +
> +%preun
> /sbin/ldconfig
hum ... on uninstalls shouldn't ldconfig be run after the
list have been removed (and hence in %postun) ?
> +
> +%{_datadir}/%{name}/provider-register.sh -d -t pegasus \
> + -n /@CIM_VIRT_NS@ \
> + -r %{REGISTRATION} -m %{SCHEMA} || true
>
> %files
> %defattr(-, root, root)
>
> %doc README doc/CodingStyle doc/SubmittingPatches
> -%doc provider-register.sh register_base.sh
> +%doc provider-register.sh
> +%doc doc/*.html
> %{_libdir}/lib*.so*
> %{_libdir}/cmpi/lib*.so*
> %{_datadir}/libvirt-cim/*.sh
Except those tiny issues looks fine to me,
Daniel
--
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard | virtualization library http://libvirt.org/
veillard at redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
More information about the Libvirt-cim
mailing list