File drawj2d.spec of Package Drawj2d
#
# spec file for package Drawj2d
#
# Copyright (c) 2015-2025 A. Vontobel
#
# 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 http://sourceforge.net/projects/drawj2d/
#
Name: drawj2d
Summary: Draw vector graphics to scale using a descriptive language
Version: 1.4.0
Release: 1
License: GPL-3.0+
Group: Productivity/Graphics/Visualization/Graph
Source: http://prdownloads.sourceforge.net/drawj2d/%{version}/Drawj2d-%{version}.src.tar.gz
URL: http://drawj2d.sourceforge.net
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires:java-devel >= 11
BuildRequires:ant
Requires: java >= 11
BuildArch: noarch
%description
Drawj2d creates technical line drawings using a descriptive language. It writes pdf, svg, eps, emf, rM and dxf vector graphics or png images. It runs on all platforms that run Java.
It is inspired by Asymptote but with a tcl-like syntax and 2D only.
%prep
%setup -q -n Drawj2d
%build
%ant jar
gzip resources/manpage/drawj2d.1
%install
# jars
install -dm 0755 "%buildroot/%_datadir/%name"
install -m 0644 dist/%{name}.jar "%buildroot/%_datadir/%name/"
# manpage
install -dm 0755 "%buildroot/%{_mandir}/man1"
install -m 0644 resources/manpage/drawj2d.1.gz "%buildroot/%{_mandir}/man1/"
# startscript
install -dm 0755 "%buildroot/%_bindir"
cat >"%buildroot/%_bindir/%name" << EOF
#!/bin/sh
exec java -jar "%_datadir/%name/%name.jar" "\$@"
EOF
chmod 0755 "%buildroot/%_bindir/%name"
%files
%defattr(-,root,root)
%doc resources/docs/*
%_bindir/%name
%_datadir/%name
%{_mandir}/man1/*
%changelog
* Sun Oct 12 2025 Adrian Vontobel <qwert2003@users.sourceforge.net> 1.4.0-1
- Initial rpm release of this version.