From daf389ed353fda6e79b3586479cff551534b8414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Wed, 9 Nov 2011 13:31:13 +0000 Subject: [PATCH] supports build of RPM packages, tested on openSUSE; closes #5 --- doc/makefile.am | 8 ++++---- libxml-cxx.spec.in | 22 ++++++++++++++-------- makefile.am | 8 ++++---- 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/doc/makefile.am b/doc/makefile.am index 33cf277..356eef5 100644 --- a/doc/makefile.am +++ b/doc/makefile.am @@ -42,9 +42,9 @@ dist-hook: ${devel_DATA} cp -r html ${distdir}/ install-data-hook: - chmod -R u+w ${develdir} - cp -r html/* ${develdir}/ + chmod -R u+w $(DESTDIR)${develdir} + cp -r html/* $(DESTDIR)${develdir}/ uninstall-hook: - -chmod -R u+w ${develdir} - -rm -rf ${develdir}/* + -chmod -R u+w $(DESTDIR)${develdir} + -rm -rf $(DESTDIR)${develdir}/* diff --git a/libxml-cxx.spec.in b/libxml-cxx.spec.in index 957f4a0..dc2a05e 100644 --- a/libxml-cxx.spec.in +++ b/libxml-cxx.spec.in @@ -4,9 +4,9 @@ Version: @VERSION@ Release: 1 License: LGPL Group: Development/Libraries/C++ -URL: https://dev.marc.waeckerlin.org/projects/libxml-cxx +URL: https://dev.marc.waeckerlin.org/projects/@PACKAGENAME@ Source0: %{name}-%{version}.tar.gz -BuildRequires: libproxy-devel gcc-c++ doxygen graphviz +BuildRequires: subversion libcppunit-devel gcc-c++ doxygen graphviz texlive automake autoconf libtool make BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root @@ -32,10 +32,14 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) -/usr/lib/libxml-cxx.so.0.0.0 -/usr/lib/libxml-cxx.so.0 +/usr/lib/@PACKAGENAME@.so.* %doc -/usr/share/doc/packages/@PACKAGENAME@ +/usr/share/doc/packages/@PACKAGENAME@/AUTHORS +/usr/share/doc/packages/@PACKAGENAME@/COPYING +/usr/share/doc/packages/@PACKAGENAME@/ChangeLog +/usr/share/doc/packages/@PACKAGENAME@/INSTALL +/usr/share/doc/packages/@PACKAGENAME@/NEWS +/usr/share/doc/packages/@PACKAGENAME@/README %package devel Summary: XML C++ Library (development files) @@ -50,12 +54,14 @@ This Package contains all files required for developement. %files devel %defattr(-,root,root,-) -/usr/lib/libxml-cxx.so -/usr/lib/libxml-cxx.a +/usr/lib/@PACKAGENAME@.so +/usr/lib/@PACKAGENAME@.a /usr/lib/pkgconfig -/usr/lib/libxml-cxx.la +/usr/lib/@PACKAGENAME@.la /usr/include/ /usr/share/pkgconfig +%doc +/usr/share/doc/packages/@PACKAGENAME@/doc %changelog * Wed Apr 21 2010 Marc Wäckerlin - cxx-1 diff --git a/makefile.am b/makefile.am index 4e3386b..837c4d2 100644 --- a/makefile.am +++ b/makefile.am @@ -41,10 +41,10 @@ tag: distcheck cvs ci -R . cvs tag -FR REL_@PACKAGENAME@-@MAJOR@-@MINOR@-@LEAST@ . -#rpm: dist -# cp @PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@.tar.gz \ -# /usr/src/packages/SOURCES/ -# rpmbuild -ba --clean @PACKAGENAME@.spec +rpm: dist + cp @PACKAGENAME@-@MAJOR@.@MINOR@.@LEAST@.tar.gz \ + /usr/src/packages/SOURCES/ + rpmbuild -ba --clean @PACKAGENAME@.spec deps = ${top_srcdir}/COPYING ${top_srcdir}/README ${top_srcdir}/INSTALL ${top_srcdir}/NEWS ${top_srcdir}/ChangeLog