diff --git a/.gitignore b/.gitignore index e69de29..f254169 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/pugixml-1.0.tar.gz diff --git a/pugixml-1.0-set_lib_soversion.patch b/pugixml-1.0-set_lib_soversion.patch new file mode 100644 index 0000000..6cef85d --- /dev/null +++ b/pugixml-1.0-set_lib_soversion.patch @@ -0,0 +1,23 @@ +--- scripts/CMakeLists.txt.orig 2010-09-20 22:14:28.000000000 -0500 ++++ scripts/CMakeLists.txt 2011-07-08 13:44:29.630913408 -0500 +@@ -1,5 +1,19 @@ + project(pugixml) + ++cmake_minimum_required(VERSION 2.6) ++set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared instead of static library") ++ + set(SOURCES ../src/pugixml.hpp ../src/pugiconfig.hpp ../src/pugixml.cpp) + +-add_library(pugixml STATIC ${SOURCES}) ++if(BUILD_SHARED_LIBS) ++ add_library(pugixml SHARED ${SOURCES}) ++else() ++ add_library(pugixml STATIC ${SOURCES}) ++endif() ++ ++set_target_properties(pugixml ++ PROPERTIES ++ VERSION 1.0 ++ SOVERSION 1.0 ++ ) ++ diff --git a/pugixml.spec b/pugixml.spec new file mode 100644 index 0000000..375c886 --- /dev/null +++ b/pugixml.spec @@ -0,0 +1,83 @@ +Name: pugixml +Version: 1.0 +Release: 1%{?dist} +Summary: A light-weight C++ XML processing library +Group: Development/Libraries +License: MIT +URL: http://pugixml.org + +Source0: http://pugixml.googlecode.com/files/%{name}-%{version}.tar.gz +Patch0: pugixml-1.0-set_lib_soversion.patch + +BuildRequires: cmake + +%description +pugixml is a light-weight C++ XML processing library. +It features: +- DOM-like interface with rich traversal/modification capabilities +- Extremely fast non-validating XML parser which constructs the DOM tree from + an XML file/buffer +- XPath 1.0 implementation for complex data-driven tree queries +- Full Unicode support with Unicode interface variants and automatic encoding + conversions + + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +Development files for package %{name} + + +%prep +%setup -q -c %{name}-%{version} +%patch0 + + +%build +mkdir -p ./build && pushd build +%cmake ../scripts + +make + + +%install +# Fix encodings +#find ./docs -name '*.cpp' -exec dos2unix -k {} \;i +#find ./docs -name '*.css' -exec dos2unix -k {} \; +#find ./docs -name '*.xml' -exec dos2unix -k {} \; +#find ./ -name '*.txt' -exec dos2unix -k {} \; + +mkdir -p %{buildroot}%{_includedir} +mkdir -p %{buildroot}%{_datadir}/%{name}/contrib +mkdir -p %{buildroot}%{_libdir} + +install -p -m 0644 contrib/* %{buildroot}%{_datadir}/%{name}/contrib/ +install -p -m 0644 src/*.hpp %{buildroot}%{_includedir}/ +install -p -m 0755 build/*.so.* %{buildroot}%{_libdir}/ +mv build/*.so %{buildroot}%{_libdir}/ + + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + + +%files +%defattr(-,root,root,-) +%doc readme.txt +%{_libdir}/*.so.* + +%files devel +%defattr(-,root,root,-) +%doc docs/* +%{_libdir}/*.so +%{_datadir}/%{name} +%{_includedir}/*.hpp + + +%changelog +* Fri Jul 08 2011 Richard Shaw - 1.0-1 +- Initial Release diff --git a/sources b/sources index e69de29..e61a346 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +3c191771b942e805fe36d6a00b2655f8 pugixml-1.0.tar.gz