[tinyxml/f20] Add basic pkgconfig

Scott K Logan cottsay at fedoraproject.org
Sat Apr 5 01:30:03 UTC 2014


commit 0da2c2d7af7827f9c66c627551b256e3798af95c
Author: Scott K Logan <logans at cottsay.net>
Date:   Fri Apr 4 19:19:57 2014 -0600

    Add basic pkgconfig

 tinyxml.pc.in |   10 ++++++++++
 tinyxml.spec  |   15 ++++++++++++++-
 2 files changed, 24 insertions(+), 1 deletions(-)
---
diff --git a/tinyxml.pc.in b/tinyxml.pc.in
new file mode 100644
index 0000000..9af2098
--- /dev/null
+++ b/tinyxml.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: TinyXML
+Description: A simple, small, C++ XML parser
+Version: @version@
+Libs: -L${libdir} -ltinyxml
+Cflags: -I${includedir} -DTIXML_USE_STL=YES
diff --git a/tinyxml.spec b/tinyxml.spec
index cb53883..3d1e14e 100644
--- a/tinyxml.spec
+++ b/tinyxml.spec
@@ -2,12 +2,13 @@
 
 Name:           tinyxml
 Version:        2.6.2
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        A simple, small, C++ XML parser
 Group:          System Environment/Libraries
 License:        zlib
 URL:            http://www.grinninglizard.com/tinyxml/
 Source0:        http://downloads.sourceforge.net/%{name}/%{name}_%{underscore_version}.tar.gz
+Source1:        tinyxml.pc.in
 Patch0:         tinyxml-2.5.3-stl.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -57,6 +58,14 @@ ln -s lib%{name}.so.0.%{version} $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so.0
 ln -s lib%{name}.so.0.%{version} $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so
 install -p -m 644 %{name}.h $RPM_BUILD_ROOT%{_includedir}
 
+mkdir -p %{buildroot}%{_datadir}/pkgconfig
+sed -e 's![@]prefix[@]!%{_prefix}!g' \
+ -e 's![@]exec_prefix[@]!%{_exec_prefix}!g' \
+ -e 's![@]libdir[@]!%{_libdir}!g' \
+ -e 's![@]includedir[@]!%{_includedir}!g' \
+ -e 's![@]version[@]!%{version}!g' \
+ %{SOURCE1} > %{buildroot}%{_datadir}/pkgconfig/%{name}.pc
+
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -77,9 +86,13 @@ rm -rf $RPM_BUILD_ROOT
 %doc docs/*
 %{_includedir}/*
 %{_libdir}/*.so
+%{_datadir}/pkgconfig/%{name}.pc
 
 
 %changelog
+* Sat Mar 01 2014 Scott K Logan <logans at cottsay.net> - 2.6.2-3
+- Add basic pkgconfig
+
 * Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.6.2-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list