]> git.pld-linux.org Git - SPECS.git/blob - java-jgoodies-forms.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / java-jgoodies-forms.spec
1 #
2 # Conditional build:
3 %bcond_without  javadoc         # don't build javadoc
4
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
10 Version:        1.2.0
11 Release:        3
12 License:        BSD
13 Group:          Libraries/Java
14 URL:            http://www.jgoodies.com/freeware/forms/
15 Source0:        http://www.jgoodies.com/download/libraries/%{shortname}/%{shortname}-%{ver}.zip
16 # Source0-md5:  756de0bee840592cdc12ef0cd5d8332e
17 Patch0:         build.patch
18 BuildRequires:  ant
19 BuildRequires:  iconv
20 BuildRequires:  jdk
21 BuildRequires:  jpackage-utils >= 1.6
22 BuildRequires:  rpm-javaprov
23 BuildRequires:  rpmbuild(macros) >= 1.533
24 BuildRequires:  sed >= 4.0
25 BuildRequires:  unzip
26 BuildArch:      noarch
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
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.
33
34 Main Benefits:
35
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
41
42 %package javadoc
43 Summary:        Javadoc documentation for JGoodies Forms
44 Group:          Documentation
45
46 %description javadoc
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.
50
51 This package contains the Javadoc documentation for JGoodies Forms.
52
53 %package doc
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}
58 Group:          Documentation
59
60 %description doc
61 Documentation for %{srcname}.
62
63 %description doc -l fr.UTF-8
64 Documentation pour %{srcname}.
65
66 %description doc -l it.UTF-8
67 Documentazione di %{srcname}.
68
69 %description doc -l pl.UTF-8
70 Dokumentacja do %{srcname}.
71
72 %package demo
73 Summary:        Demo for %{srcname}
74 Summary(pl.UTF-8):      Pliki demonstracyjne dla pakietu %{srcname}
75 Group:          Documentation
76 Requires:       %{name} = %{epoch}:%{version}-%{release}
77
78 %description demo
79 Demonstrations and samples for %{srcname}.
80
81 %description demo -l pl.UTF-8
82 Pliki demonstracyjne i przykłady dla pakietu %{srcname}.
83
84 %prep
85 %setup -q -n %{shortname}-%{version}
86 %undos build.xml
87 %patch0 -p1
88 rm %{shortname}-%{version}.jar
89 rm -r docs/api
90
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
95         sed -i 's/\r//' $file
96 done
97
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
101         mv $file.new $file
102 done
103
104 %build
105 %ant compile jar %{?with_javadoc:javadoc}
106
107 %install
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
112
113 # javadoc
114 %if %{with javadoc}
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
118 %endif
119
120 # demo
121 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
122 cp -a src/tutorial/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
123
124 %clean
125 rm -rf $RPM_BUILD_ROOT
126
127 %post javadoc
128 ln -nfs %{srcname}-%{version} %{_javadocdir}/%{srcname}
129
130 %files
131 %defattr(644,root,root,755)
132 %doc RELEASE-NOTES.txt LICENSE.txt README.html
133 %{_javadir}/%{srcname}-%{version}.jar
134 %{_javadir}/%{srcname}.jar
135
136 %files doc
137 %defattr(644,root,root,755)
138 %doc docs/*
139
140 %files demo
141 %defattr(644,root,root,755)
142 %{_examplesdir}/%{name}-%{version}
143
144 %if %{with javadoc}
145 %files javadoc
146 %defattr(644,root,root,755)
147 %{_javadocdir}/%{srcname}-%{version}
148 %ghost %{_javadocdir}/%{srcname}
149 %endif
This page took 0.438184 seconds and 3 git commands to generate.