|
Alexandre Moine |
9f78d19 |
Name: tinyxpath
|
|
Alexandre Moine |
9f78d19 |
Version: 1.3.1
|
|
|
4bac5c0 |
Release: 12%{?dist}
|
|
Alexandre Moine |
9f78d19 |
Summary: Small XPath syntax decoder
|
|
Alexandre Moine |
9f78d19 |
|
|
Alexandre Moine |
9f78d19 |
License: zlib
|
|
Alexandre Moine |
9f78d19 |
URL: http://tinyxpath.sourceforge.net/
|
|
Alexandre Moine |
9f78d19 |
Source0: http://downloads.sourceforge.net/%{name}/%{name}_1_3_1.zip
|
|
Alexandre Moine |
9f78d19 |
# tinyxpath include a bundled version of tinyxml
|
|
Alexandre Moine |
9f78d19 |
Patch0: %{name}.remove_bundled_tinyxml.patch
|
|
Alexandre Moine |
9f78d19 |
# Fix false-positive of the binary test (see https://sourceforge.net/p/tinyxpath/support-requests/7/ )
|
|
Alexandre Moine |
9f78d19 |
Patch1: %name.fix_test.patch
|
|
Alexandre Moine |
9f78d19 |
|
|
|
edad57c |
BuildRequires: gcc-c++
|
|
Alexandre Moine |
9f78d19 |
BuildRequires: tinyxml-devel autoconf automake
|
|
|
975cbb2 |
BuildRequires: gcc
|
|
Alexandre Moine |
9f78d19 |
|
|
Alexandre Moine |
9f78d19 |
%description
|
|
Alexandre Moine |
9f78d19 |
TinyXPath is a small footprint XPath syntax decoder, written in C++.
|
|
Alexandre Moine |
9f78d19 |
- Syntax decoding
|
|
Alexandre Moine |
9f78d19 |
- Application to a TinyXML tree
|
|
Alexandre Moine |
9f78d19 |
- Function to extract a result from a tree (string, node set or integer)
|
|
Alexandre Moine |
9f78d19 |
|
|
Alexandre Moine |
9f78d19 |
%package devel
|
|
Alexandre Moine |
9f78d19 |
Summary: Development files for %{name}
|
|
Alexandre Moine |
9f78d19 |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
Alexandre Moine |
9f78d19 |
Requires: tinyxml-devel
|
|
Alexandre Moine |
9f78d19 |
|
|
Alexandre Moine |
9f78d19 |
%description devel
|
|
Alexandre Moine |
9f78d19 |
The %{name}-devel package contains library and header files for
|
|
Alexandre Moine |
9f78d19 |
developing applications that use %{name}.
|
|
Alexandre Moine |
9f78d19 |
|
|
Alexandre Moine |
9f78d19 |
|
|
Alexandre Moine |
9f78d19 |
%prep
|
|
Alexandre Moine |
9f78d19 |
%setup -q -c %{name}-%{version}
|
|
Alexandre Moine |
9f78d19 |
%patch0
|
|
Alexandre Moine |
9f78d19 |
%patch1
|
|
Alexandre Moine |
9f78d19 |
rm -rf tinyxml* tinystr*
|
|
Alexandre Moine |
9f78d19 |
|
|
Alexandre Moine |
9f78d19 |
# Correct some errors due to bundled tinyxml
|
|
Alexandre Moine |
9f78d19 |
sed -i 's+TiXmlNode::+TiXmlNode::TINYXML_+g' *.cpp
|
|
Alexandre Moine |
9f78d19 |
sed -i 's+#include "tinystr.h"+//#include "tinystr.h"+g' *.h
|
|
Alexandre Moine |
9f78d19 |
|
|
Alexandre Moine |
9f78d19 |
# Fix wrong EOF encoding
|
|
Alexandre Moine |
9f78d19 |
sed -i 's/\r$//' AUTHORS
|
|
Alexandre Moine |
9f78d19 |
|
|
Alexandre Moine |
9f78d19 |
|
|
Alexandre Moine |
9f78d19 |
%build
|
|
Alexandre Moine |
9f78d19 |
make -f Makefile.configure
|
|
Alexandre Moine |
9f78d19 |
# Build with -fPIC for the library
|
|
Alexandre Moine |
9f78d19 |
%configure CPPFLAGS="-fPIC"
|
|
Alexandre Moine |
9f78d19 |
make %{?_smp_mflags}
|
|
Alexandre Moine |
9f78d19 |
|
|
Alexandre Moine |
9f78d19 |
# Not really designed to be build as lib, DYI
|
|
Alexandre Moine |
9f78d19 |
g++ $RPM_OPT_FLAGS -shared -o lib%{name}.so.0.1 \
|
|
Alexandre Moine |
9f78d19 |
-Wl,-soname,lib%{name}.so.0.1 `ls *.o | grep -v main.o` -ltinyxml
|
|
Alexandre Moine |
9f78d19 |
|
|
Alexandre Moine |
9f78d19 |
|
|
Alexandre Moine |
9f78d19 |
%check
|
|
Alexandre Moine |
9f78d19 |
./tinyxpath
|
|
|
2e333d2 |
BEFORE=($(grep "" out.htm | sed 's~~_~' | sed 's~~_~g' | sed 's~~~' | cut -d '_' -f 3))
|
|
|
2e333d2 |
AFTER=($(grep "" out.htm | sed 's~~_~' | sed 's~~_~g' | sed 's~~~' | cut -d '_' -f 4))
|
|
|
2e333d2 |
COUNT=0
|
|
|
2e333d2 |
TOTAL=$(grep "" out.htm | sed 's~~_~' | sed 's~~_~g' | sed 's~~~' | cut -d '_' -f 3 | wc -l)
|
|
|
2e333d2 |
while [ $COUNT -lt $TOTAL ]; do
|
|
|
2e333d2 |
if [ -z "${AFTER[$COUNT]}" ] || [ "${AFTER[$COUNT]}" != "${BEFORE[$COUNT]}" ]
|
|
|
2e333d2 |
then
|
|
|
2e333d2 |
echo "Before: ${BEFORE[$COUNT]} After: ${AFTER[$COUNT]}"
|
|
|
2e333d2 |
false
|
|
|
2e333d2 |
break
|
|
|
2e333d2 |
fi
|
|
|
2e333d2 |
COUNT=$(($COUNT + 1))
|
|
|
2e333d2 |
done
|
|
|
2e333d2 |
|
|
Alexandre Moine |
9f78d19 |
|
|
Alexandre Moine |
9f78d19 |
%install
|
|
Alexandre Moine |
9f78d19 |
%make_install
|
|
Alexandre Moine |
9f78d19 |
|
|
Alexandre Moine |
9f78d19 |
# Install headers by hands.
|
|
Alexandre Moine |
9f78d19 |
mkdir -p %{buildroot}%{_includedir}/%{name}
|
|
Alexandre Moine |
9f78d19 |
install -pDm644 *.h %{buildroot}%{_includedir}/%{name}
|
|
Alexandre Moine |
9f78d19 |
|
|
Alexandre Moine |
9f78d19 |
#Install lib by hands.
|
|
Alexandre Moine |
9f78d19 |
mkdir -p %{buildroot}%{_libdir}
|
|
Alexandre Moine |
9f78d19 |
install -m 755 lib%{name}.so.0.1 %{buildroot}%{_libdir}
|
|
Alexandre Moine |
9f78d19 |
ln -s lib%{name}.so.0.1 %{buildroot}%{_libdir}/lib%{name}.so.0
|
|
Alexandre Moine |
9f78d19 |
ln -s lib%{name}.so.0.1 %{buildroot}%{_libdir}/lib%{name}.so
|
|
Alexandre Moine |
9f78d19 |
|
|
|
6a06274 |
%ldconfig_scriptlets
|
|
Alexandre Moine |
9f78d19 |
|
|
Alexandre Moine |
9f78d19 |
|
|
Alexandre Moine |
9f78d19 |
%files
|
|
Alexandre Moine |
9f78d19 |
# Exclude binary, whicih is only for test
|
|
Alexandre Moine |
9f78d19 |
%exclude %{_bindir}/tinyxpath
|
|
Alexandre Moine |
9f78d19 |
|
|
Alexandre Moine |
9f78d19 |
%doc AUTHORS
|
|
Alexandre Moine |
9f78d19 |
%{_libdir}/lib%{name}.so.0
|
|
Alexandre Moine |
9f78d19 |
%{_libdir}/lib%{name}.so.0.*
|
|
Alexandre Moine |
9f78d19 |
|
|
Alexandre Moine |
9f78d19 |
%files devel
|
|
Alexandre Moine |
9f78d19 |
%{_includedir}/%{name}
|
|
Alexandre Moine |
9f78d19 |
%{_libdir}/lib%{name}.so
|
|
Alexandre Moine |
9f78d19 |
|
|
Alexandre Moine |
9f78d19 |
|
|
Alexandre Moine |
9f78d19 |
%changelog
|
|
|
4bac5c0 |
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-12
|
|
|
4bac5c0 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
4bac5c0 |
|
|
|
2e333d2 |
* Mon Dec 10 2018 Michael Cronenworth <mike@cchtml.com> - 1.3.1-11
|
|
|
2e333d2 |
- Fix tests
|
|
|
2e333d2 |
|
|
|
9fa0dab |
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-10
|
|
|
9fa0dab |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
9fa0dab |
|
|
|
2e333d2 |
* Wed Mar 07 2018 Alexandre Moine <nobrakal@fedoraproject.org> - 1.3.1-9
|
|
|
2e333d2 |
- Add gcc as a build dependency.
|
|
|
2e333d2 |
|
|
|
b9e318d |
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-8
|
|
|
b9e318d |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
b9e318d |
|
|
|
2fd20a6 |
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-7
|
|
|
2fd20a6 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
|
|
2fd20a6 |
|
|
|
194ce9c |
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-6
|
|
|
194ce9c |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
194ce9c |
|
|
|
1c308e6 |
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-5
|
|
|
1c308e6 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
1c308e6 |
|
|
|
98c2535 |
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.1-4
|
|
|
98c2535 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
98c2535 |
|
|
Alexandre Moine |
9f78d19 |
* Fri Jul 31 2015 Alexandre Moine <nobrakal@gmail.com> 1.3.1-3
|
|
Alexandre Moine |
9f78d19 |
- Add tinyxml-devel as a Requires for tinyxpath-devel
|
|
Alexandre Moine |
9f78d19 |
- Remove by-hands installation of AUTHORS
|
|
Alexandre Moine |
9f78d19 |
|
|
Alexandre Moine |
9f78d19 |
* Thu Jul 30 2015 Alexandre Moine <nobrakal@gmail.com> 1.3.1-2
|
|
Alexandre Moine |
9f78d19 |
- Remove wrong license link
|
|
Alexandre Moine |
9f78d19 |
- Add AUTHORS to %%doc
|
|
Alexandre Moine |
9f78d19 |
- Exclude %%{_bindir}/tinyxpath beceause it is not useful
|
|
Alexandre Moine |
9f78d19 |
- Remove explicit dependency tinyxml
|
|
Alexandre Moine |
9f78d19 |
- Change soname to libtinyxpath.so.0.1
|
|
Alexandre Moine |
9f78d19 |
|
|
Alexandre Moine |
9f78d19 |
* Tue Jul 14 2015 Alexandre Moine <nobrakal@gmail.com> 1.3.1-1
|
|
Alexandre Moine |
9f78d19 |
- Initial spec
|