3 %bcond_without javadoc # don't build javadoc
5 %define shortname forms
6 %define srcname jgoodies-%{shortname}
7 %define ver %(echo %{version} | tr . _)
8 Summary: Framework to lay out and implement elegant Swing panels in Java
9 Name: java-jgoodies-forms
14 URL: http://www.jgoodies.com/freeware/forms/
15 Source0: http://www.jgoodies.com/download/libraries/%{shortname}/%{shortname}-%{ver}.zip
16 # Source0-md5: 756de0bee840592cdc12ef0cd5d8332e
21 BuildRequires: jpackage-utils >= 1.6
22 BuildRequires: rpm-javaprov
23 BuildRequires: rpmbuild(macros) >= 1.533
24 BuildRequires: sed >= 4.0
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 The JGoodies Forms framework helps you lay out and implement elegant
31 Swing panels quickly and consistently. It makes simple things easy and
32 the hard stuff possible, the good design easy and the bad difficult.
36 - Powerful, flexible and precise layout
37 - Easy to work with and quite easy to learn
38 - Faster UI production
39 - Better UI code readability
40 - Leads to better style guide compliance
43 Summary: Javadoc documentation for JGoodies Forms
47 The JGoodies Forms framework helps you lay out and implement elegant
48 Swing panels quickly and consistently. It makes simple things easy and
49 the hard stuff possible, the good design easy and the bad difficult.
51 This package contains the Javadoc documentation for JGoodies Forms.
54 Summary: Manual for %{srcname}
55 Summary(fr.UTF-8): Documentation pour %{srcname}
56 Summary(it.UTF-8): Documentazione di %{srcname}
57 Summary(pl.UTF-8): Podręcznik dla %{srcname}
61 Documentation for %{srcname}.
63 %description doc -l fr.UTF-8
64 Documentation pour %{srcname}.
66 %description doc -l it.UTF-8
67 Documentazione di %{srcname}.
69 %description doc -l pl.UTF-8
70 Dokumentacja do %{srcname}.
73 Summary: Demo for %{srcname}
74 Summary(pl.UTF-8): Pliki demonstracyjne dla pakietu %{srcname}
76 Requires: %{name} = %{epoch}:%{version}-%{release}
79 Demonstrations and samples for %{srcname}.
81 %description demo -l pl.UTF-8
82 Pliki demonstracyjne i przykłady dla pakietu %{srcname}.
85 %setup -q -n %{shortname}-%{version}
88 rm %{shortname}-%{version}.jar
91 # Fix the line endings and the encodings
92 for file in *.txt *.html docs/*.* docs/reference/* docs/tutorial/* \
93 src/tutorial/com/jgoodies/forms/tutorial/*.java \
94 src/tutorial/com/jgoodies/forms/tutorial/*/*.java; do
98 for file in docs/reference/*.html docs/tutorial/*.html; do
99 iconv --from=ISO-8859-1 --to=UTF-8 $file > $file.new
100 sed -i 's/iso-8859-1/utf-8/' $file.new
105 %ant compile jar %{?with_javadoc:javadoc}
108 rm -rf $RPM_BUILD_ROOT
109 install -d $RPM_BUILD_ROOT%{_javadir}
110 install -p build/%{shortname}.jar $RPM_BUILD_ROOT%{_javadir}/%{srcname}-%{version}.jar
111 ln -s %{srcname}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{srcname}.jar
115 install -d $RPM_BUILD_ROOT%{_javadocdir}/%{srcname}-%{version}
116 cp -a build/docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{srcname}-%{version}
117 ln -s %{srcname}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{srcname} # ghost symlink
121 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
122 cp -a src/tutorial/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
125 rm -rf $RPM_BUILD_ROOT
128 ln -nfs %{srcname}-%{version} %{_javadocdir}/%{srcname}
131 %defattr(644,root,root,755)
132 %doc RELEASE-NOTES.txt LICENSE.txt README.html
133 %{_javadir}/%{srcname}-%{version}.jar
134 %{_javadir}/%{srcname}.jar
137 %defattr(644,root,root,755)
141 %defattr(644,root,root,755)
142 %{_examplesdir}/%{name}-%{version}
146 %defattr(644,root,root,755)
147 %{_javadocdir}/%{srcname}-%{version}
148 %ghost %{_javadocdir}/%{srcname}