[packages/tinyxpath] - use macros; pld way of testing
arekm
arekm at pld-linux.org
Sun Jan 21 19:45:17 CET 2018
commit 0a0e110b120348cc8d80ff13ae2a53c875c6e544
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sun Jan 21 19:45:11 2018 +0100
- use macros; pld way of testing
tinyxpath.spec | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/tinyxpath.spec b/tinyxpath.spec
index 7359a7b..108a325 100644
--- a/tinyxpath.spec
+++ b/tinyxpath.spec
@@ -1,3 +1,4 @@
+%bcond_without tests
Summary: Small XPath syntax decoder
Name: tinyxpath
Version: 1.3.1
@@ -53,13 +54,14 @@ sed -i 's/\r$//' AUTHORS
%{__make}
# Not really designed to be build as lib, DYI
-g++ $RPM_OPT_FLAGS -shared -o lib%{name}.so.0.1 \
+%{__cxx} $RPM_OPT_FLAGS -shared -o lib%{name}.so.0.1 \
-Wl,-soname,lib%{name}.so.0.1 `ls *.o | grep -v main.o` -ltinyxml
-%check
+%if %{with tests}
./tinyxpath
grep -q '<em>' out.htm && false
+%endif
%install
rm -rf $RPM_BUILD_ROOT
@@ -88,7 +90,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc AUTHORS
-%attr(755,root,root) %{_libdir}/lib%{name}.so.0
+%attr(755,root,root) %ghost %{_libdir}/lib%{name}.so.0
%attr(755,root,root) %{_libdir}/lib%{name}.so.0.*
%files devel
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/tinyxpath.git/commitdiff/0a0e110b120348cc8d80ff13ae2a53c875c6e544
More information about the pld-cvs-commit
mailing list