[libxml++] Clean up the spec file for modern rpmbuild

Kalev Lember kalev at fedoraproject.org
Wed Jun 15 14:18:53 UTC 2011


commit f1585cceb367902b8ff060aaef59099df6288720
Author: Kalev Lember <kalev at smartlink.ee>
Date:   Tue Jun 14 19:36:31 2011 +0300

    Clean up the spec file for modern rpmbuild

 libxml++.spec |   16 ++++------------
 1 files changed, 4 insertions(+), 12 deletions(-)
---
diff --git a/libxml++.spec b/libxml++.spec
index b93d476..c823a5c 100644
--- a/libxml++.spec
+++ b/libxml++.spec
@@ -11,7 +11,6 @@ Group:          System Environment/Libraries
 License:        LGPLv2+
 URL:            http://libxmlplusplus.sourceforge.net/
 Source0:        http://ftp.gnome.org/pub/GNOME/sources/libxml++/%{release_version}/libxml++-%{version}.tar.bz2
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  libxml2-devel >= 2.6.1
 BuildRequires:  glibmm24-devel >= 2.4.0
@@ -26,7 +25,8 @@ and Murray Cumming.
 Summary:        Development files for %{name}
 Group:          Development/Libraries
 Requires:       %{name} = %{version}-%{release}
-Requires:       pkgconfig, libxml2-devel, glibmm24-devel
+Requires:       libxml2-devel
+Requires:       glibmm24-devel
 
 %description devel
 This package contains the headers and libraries for libxml++ development.
@@ -53,8 +53,7 @@ sed -i s'#\r##' examples/dom_parser/example_with_namespace.xml
 make %{?_smp_mflags}
 
 %install
-rm -rf $RPM_BUILD_ROOT
-%makeinstall
+make install DESTDIR=$RPM_BUILD_ROOT
 find $RPM_BUILD_ROOT -name "*.la" -o -name '*.a' | xargs rm -f
 # fix wrong base path in devhelp index file
 sed -i "s#$RPM_BUILD_ROOT##g" \
@@ -67,19 +66,12 @@ sed -i "s#$RPM_BUILD_ROOT##g" \
 %postun -p /sbin/ldconfig
 
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-
 %files
-%defattr (-,root,root,-)
 %doc AUTHORS COPYING NEWS README ChangeLog
 %{_libdir}/*.so.*
 
 
 %files devel
-%defattr (-,root,root,-)
-%doc
 %{_includedir}/*
 %{_libdir}/*.so
 %{_libdir}/pkgconfig/*
@@ -87,7 +79,6 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %files doc
-%defattr(-, root, root, -)
 %doc %{_datadir}/devhelp/books/%{name}-%{api_ver}
 %doc %{_docdir}/%{name}-%{api_ver}
 
@@ -97,6 +88,7 @@ rm -rf $RPM_BUILD_ROOT
 - Update to 2.34.1
 - Dropped upstreamed patches
 - Require base package from -doc subpackage
+- Clean up the spec file for modern rpmbuild
 
 * Fri Jun 10 2011 Karsten Hopp <karsten at redhat.com> 2.33.2-2
 - buildrequire mm-common for doc-install.pl


More information about the scm-commits mailing list