2007-03-14 11:41:38 +00:00
|
|
|
#
|
2018-01-13 20:48:03 +00:00
|
|
|
# spec file for package xmlformat
|
2007-03-14 11:41:38 +00:00
|
|
|
#
|
2021-05-17 07:39:53 +00:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2007-03-14 11:41:38 +00:00
|
|
|
#
|
2009-06-17 22:09:36 +00:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
2021-05-17 07:39:53 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2007-03-14 11:41:38 +00:00
|
|
|
#
|
|
|
|
|
|
2009-06-17 22:09:36 +00:00
|
|
|
|
2007-03-14 11:41:38 +00:00
|
|
|
Name: xmlformat
|
2021-05-17 07:39:53 +00:00
|
|
|
Version: 1.9
|
2018-01-13 20:48:03 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: XML document formatter
|
2021-05-17 07:39:53 +00:00
|
|
|
License: BSD-3-Clause AND GPL-3.0-only
|
2007-03-14 11:41:38 +00:00
|
|
|
Group: Productivity/Publishing/XML
|
2021-05-17 07:39:53 +00:00
|
|
|
URL: https://github.com/someth2say/xmlformat
|
|
|
|
|
Source0: https://github.com/someth2say/xmlformat/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
2018-01-13 20:48:03 +00:00
|
|
|
BuildRequires: perl
|
2021-05-17 07:39:53 +00:00
|
|
|
BuildRequires: ruby
|
|
|
|
|
BuildRequires: shunit2
|
|
|
|
|
Requires(post): update-alternatives
|
|
|
|
|
Requires(postun): update-alternatives
|
2009-06-17 22:09:36 +00:00
|
|
|
BuildArch: noarch
|
2007-03-14 11:41:38 +00:00
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
xmlformat is a configurable formatter (or "pretty-printer") for XML
|
2018-01-13 20:48:03 +00:00
|
|
|
documents. It provides control over indentation, line-breaking, and text
|
|
|
|
|
wrapping. These properties can be defined on a per-element basis.
|
2007-03-14 11:41:38 +00:00
|
|
|
|
2018-01-13 20:48:03 +00:00
|
|
|
xmlformat provides improved diagnostic information when a document is not
|
|
|
|
|
well-formed. (Prints line and token number, and stack trace).
|
2007-03-14 11:41:38 +00:00
|
|
|
|
2021-05-17 07:39:53 +00:00
|
|
|
Based on Kitebird's original implementation v1.04
|
|
|
|
|
|
2007-03-14 11:41:38 +00:00
|
|
|
%prep
|
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
|
|
%build
|
2021-05-17 07:39:53 +00:00
|
|
|
# --
|
2007-03-14 11:41:38 +00:00
|
|
|
|
|
|
|
|
%install
|
2021-05-17 07:39:53 +00:00
|
|
|
install -Dpm 0755 bin/xmlformat.pl %{buildroot}%{_bindir}/xmlformat.pl
|
|
|
|
|
install -Dpm 0755 bin/xmlformat.rb %{buildroot}%{_bindir}/xmlformat.rb
|
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
|
|
|
|
ln -s -f %{_sysconfdir}/alternatives/xmlformat %{buildroot}/%{_bindir}/xmlformat
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
(cd test; ./test.sh )
|
|
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
%{_sbindir}/update-alternatives --install %{_bindir}/xmlformat xmlformat %{_bindir}/xmlformat.rb 10
|
|
|
|
|
%{_sbindir}/update-alternatives --install %{_bindir}/xmlformat xmlformat %{_bindir}/xmlformat.pl 20
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
if [ ! -f %{_bindir}/xmlformat ] ; then
|
|
|
|
|
update-alternatives --remove xmlformat %{_bindir}/xmlformat
|
|
|
|
|
fi
|
2007-03-14 11:41:38 +00:00
|
|
|
|
|
|
|
|
%files
|
2021-05-17 07:39:53 +00:00
|
|
|
%doc README.md *.html
|
|
|
|
|
%doc bin/xmlformat.conf
|
|
|
|
|
%license LICENSE.txt
|
|
|
|
|
%{_bindir}/xmlformat*
|
|
|
|
|
%ghost %_sysconfdir/alternatives/xmlformat
|
2007-03-14 11:41:38 +00:00
|
|
|
|
2009-06-17 22:09:36 +00:00
|
|
|
%changelog
|