diff --git a/xmlstarlet-1.6.1-nogit.patch b/xmlstarlet-1.6.1-nogit.patch new file mode 100644 index 0000000..4cc5ad9 --- /dev/null +++ b/xmlstarlet-1.6.1-nogit.patch @@ -0,0 +1,10 @@ +diff -uNr xmlstarlet-1.6.1-orig/configure.ac xmlstarlet-1.6.1/configure.ac +--- xmlstarlet-1.6.1-orig/configure.ac 2013-12-22 17:00:28.000000000 -0500 ++++ xmlstarlet-1.6.1/configure.ac 2014-12-08 17:12:47.836499274 -0500 +@@ -1,5 +1,5 @@ + AC_PREREQ([2.62]) +-AC_INIT([XMLStarlet], [m4_esyscmd_s([git describe --tags --dirty])], ++AC_INIT([XMLStarlet], [m4_esyscmd_s([if test -d .git ; then git describe --tags --dirty ; fi])], + [http://sourceforge.net/projects/xmlstar/support], + [], + [http://xmlstar.sourceforge.net/]) diff --git a/xmlstarlet-1.6.1.tar.gz b/xmlstarlet-1.6.1.tar.gz new file mode 100644 index 0000000..be68a6a Binary files /dev/null and b/xmlstarlet-1.6.1.tar.gz differ diff --git a/xmlstarlet.spec b/xmlstarlet.spec new file mode 100644 index 0000000..f8bef54 --- /dev/null +++ b/xmlstarlet.spec @@ -0,0 +1,50 @@ +Name: xmlstarlet +Version: 1.6.1 +Release: 12 +Summary: Command Line Tool to Process XML Documents +License: MIT +URL: http://xmlstar.sourceforge.net/ +Source0: http://downloads.sourceforge.net/xmlstar/%{name}-%{version}.tar.gz +Patch0001: xmlstarlet-1.6.1-nogit.patch + +BuildRequires: xmlto automake autoconf libxslt-devel libxml2-devel >= 2.6.23 + +%description +XMLStarlet (xml) is a command line XML toolkit which can be used to +transform, query, validate, and edit XML documents and files using simple +set of shell commands in similar way it is done for plain text files using +'grep', 'sed', 'awk', 'tr', 'diff', or 'patch'. + +%package help +Summary: Help documentation for %{name} + +%description help +Man pages and other related help documents for %{name}. + +%prep +%autosetup -n %{name}-%{version} -p1 + +%build +autoreconf -i +%configure --disable-static-libs --with-libxml-include-prefix=%{_includedir}/libxml2 \ + --docdir=%{_pkgdocdir} +%make_build + +%install +%make_install +mv $RPM_BUILD_ROOT%{_bindir}/xml $RPM_BUILD_ROOT%{_bindir}/xmlstarlet + +%check +make check + +%files +%doc AUTHORS ChangeLog NEWS README Copyright TODO +%doc %{_pkgdocdir}/* +%{_bindir}/xmlstarlet + +%files help +%{_mandir}/man1/xmlstarlet.1* + +%changelog +* Wed Jan 8 2020 wangzhishun - 1.6.1-12 +- Package init