File ditaa.spec of Package ditaa

#
# spec file for package ditaa
#
# Copyright (c) 2018, Martin Hauke <mardnh@gmx.de>
#
# 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.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


Name:           ditaa
Version:        0.10
Release:        0
Summary:        Diagrams Through ASCII Art
License:        LGPL-3.0-or-later
Group:          Productivity/Graphics/Visualization/Graph
URL:            http://ditaa.sourceforge.net/
#Git-Clone:     https://github.com/stathissideris/ditaa.git
Source:         https://github.com/stathissideris/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1:        ditaa-wrapper.sh
Source2:        ditaa.1
# Patches from debian
Patch0:         remove-JavadocTaglet.patch
Patch1:         02-fix_usage_message.patch
BuildRequires:  ant
BuildRequires:  apache-commons-cli
BuildRequires:  java-devel >= 1.5
BuildRequires:  jericho-html
BuildRequires:  jpackage-utils
BuildRequires:  xmlgraphics-batik
Requires:       apache-commons-cli
Requires:       xmlgraphics-batik
Requires:       jericho-html
BuildArch:      noarch

%description
ditaa is a small command-line utility written in Java, that can
convert diagrams drawn using ASCII art ('drawings' that contain
characters that resemble lines like | / - ), into proper bitmap
graphics.

%prep
%setup -q
%patch0 -p1
%patch1 -p1
sed -i 's|source="1.6"|source="1.7"|g' build/release.xml
sed -i 's|ditaa version 0.9|ditaa version 0.10|g' src/org/stathissideris/ascii2image/core/CommandLineConverter.java

%build
mkdir bin
%{ant} -f build/release.xml

%install
install -Dpm 0644 releases/%{name}0_9.jar %{buildroot}%{_javadir}/%{name}.jar
install -Dpm 0755 %{SOURCE1} %{buildroot}%{_bindir}/%{name}
install -Dpm 0644 %{SOURCE2} %{buildroot}%{_mandir}/man1/%{name}.1

%files
%license COPYING
%doc HISTORY README
%{_javadir}/%{name}.jar
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1%{?ext_man}

%changelog
openSUSE Build Service is sponsored by