2016-07-12 11:42:41 +00:00
|
|
|
#
|
|
|
|
# spec file for package paperclips
|
|
|
|
#
|
2025-02-05 06:46:12 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2016-07-12 11:42:41 +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.
|
|
|
|
|
2022-03-23 09:23:52 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2016-07-12 11:42:41 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
Name: paperclips
|
|
|
|
Version: 1.0.4
|
|
|
|
Release: 0
|
|
|
|
Summary: Simplified Java Printing Support for SWT
|
|
|
|
License: EPL-1.0
|
|
|
|
Group: Development/Languages/Java
|
2022-03-23 09:23:52 +00:00
|
|
|
URL: https://code.google.com/archive/p/swt-paperclips/
|
|
|
|
# The link is broken
|
|
|
|
#Source: https://swt-paperclips.googlecode.com/files/net.sf.paperclips.source_%{version}.200908120926.jar
|
|
|
|
Source: net.sf.paperclips.source_%{version}.200908120926.jar
|
2017-09-20 07:04:37 +00:00
|
|
|
Patch0: paperclips-1.0.4-javadoc.patch
|
2016-07-12 11:42:41 +00:00
|
|
|
BuildRequires: ant
|
|
|
|
BuildRequires: eclipse-swt
|
2017-09-20 07:04:37 +00:00
|
|
|
BuildRequires: fdupes
|
2022-03-23 09:23:52 +00:00
|
|
|
BuildRequires: java-devel >= 1.8
|
2016-07-12 11:42:41 +00:00
|
|
|
BuildRequires: javapackages-tools
|
|
|
|
BuildRequires: unzip
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description
|
|
|
|
A simple, light weight, extensible Java printing plug-in for SWT.
|
|
|
|
|
|
|
|
%package javadoc
|
|
|
|
Summary: Javadoc for %{name}
|
|
|
|
Group: Development/Libraries/Java
|
|
|
|
|
|
|
|
%description javadoc
|
|
|
|
Simple, light weight, extensible Java printing plug-in for SWT. PaperClips
|
|
|
|
hides the complexity of laying out and rendering documents on the printer,
|
|
|
|
helping you focus on what to print instead of how to print it.
|
|
|
|
|
|
|
|
In a nutshell, PaperClips provides an assortment of document "building
|
|
|
|
blocks," which you can tweak and combine to form a custom document. The
|
|
|
|
assembled document is then sent to PaperClips for printing. PaperClips
|
|
|
|
includes support for printing text, images, borders, headers and footers,
|
|
|
|
column layouts and grid layouts, to name a few. It can also be extended with
|
|
|
|
your own printable classes.
|
|
|
|
|
|
|
|
With PaperClips you do not have to track cursors, calculate line breaking,
|
|
|
|
fool around with font metrics, or manage system resources--it's all handled
|
|
|
|
internally. And unlike report-generation tools, you are not constrained to a
|
|
|
|
predefined document structure (like report bands). Every document is custom
|
|
|
|
and the layout is up to you.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -c %{name}-%{version}
|
2024-02-21 21:05:17 +00:00
|
|
|
%patch -P 0 -p1
|
2016-07-12 11:42:41 +00:00
|
|
|
|
|
|
|
%build
|
2025-02-05 06:46:12 +00:00
|
|
|
export CLASSPATH=$(find-jar swt)
|
2016-07-12 11:42:41 +00:00
|
|
|
|
|
|
|
pushd src
|
2024-09-29 09:19:36 +00:00
|
|
|
javac -source 1.8 -target 1.8 -g -encoding UTF-8 $(find . -type f -name "*.java")
|
2016-07-12 11:42:41 +00:00
|
|
|
jarfile="../net.sf.paperclips_%{version}.jar"
|
|
|
|
files="$(find . -type f \( -name '*.class' -o -name '*.properties' \))"
|
|
|
|
test ! -d classes && mf="" \
|
|
|
|
|| mf="`find classes/ -type f -name "*.mf" 2>/dev/null`"
|
|
|
|
test -n "$mf" && jar cvfm $jarfile $mf $files \
|
2024-09-29 09:19:36 +00:00
|
|
|
|| jar --create --verbose \
|
2024-09-24 14:40:19 +00:00
|
|
|
%if %{?pkg_vcmp:%pkg_vcmp java-devel >= 17}%{!?pkg_vcmp:0}
|
|
|
|
--date="$(date -u -d @${SOURCE_DATE_EPOCH:-$(date +%%s)} +%%Y-%%m-%%dT%%H:%%M:%%SZ)" \
|
|
|
|
%endif
|
|
|
|
--file=$jarfile $files
|
2016-07-12 11:42:41 +00:00
|
|
|
popd
|
|
|
|
|
2017-09-20 07:04:37 +00:00
|
|
|
%{ant} \
|
|
|
|
-f gen_javadoc.xml \
|
2022-03-23 09:23:52 +00:00
|
|
|
-Dant.build.javac.source=1.8 -Dswt.jar=$(build-classpath swt)
|
2016-07-12 11:42:41 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
mkdir -p %{buildroot}%{_javadir}
|
|
|
|
install net.sf.paperclips_%{version}.jar %{buildroot}%{_javadir}
|
|
|
|
|
|
|
|
mkdir -p %{buildroot}%{_javadocdir}/%{name}-%{version}
|
|
|
|
cp -r api/* %{buildroot}%{_javadocdir}/%{name}-%{version}
|
2017-09-20 07:04:37 +00:00
|
|
|
%fdupes -s %{buildroot}%{_javadocdir}/%{name}-%{version}
|
2016-07-12 11:42:41 +00:00
|
|
|
|
|
|
|
%files
|
|
|
|
%{_javadir}/net.sf.paperclips_%{version}.jar
|
|
|
|
|
|
|
|
%files javadoc
|
|
|
|
%{_javadocdir}/%{name}-%{version}
|
|
|
|
|
|
|
|
%changelog
|