pw3270.spec.in
7.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
%define _rel @PACKAGE_RELEASE@
#---[ Check for OpenOffice ]------------------------------------------------------------------------------------------
%if 0%(if [ -x @OO_SDK_HOME@/bin/idlc ]; then echo 1; else echo 0; fi)
%define _uno 1
%define ooo_home @OO_HOME@
%define ooo_ure_home @OO_URE_HOME@
%define ooo_sdk_home @OO_SDK_HOME@
%endif
%if 0%(if [ -x /opt/openoffice.org/basis3.1/sdk/bin/idlc ]; then echo 1; else echo 0; fi)
%define _uno 1
%define ooo_home /usr/lib/ooo3
%define ooo_ure_home /opt/openoffice.org/ure
%define ooo_sdk_home /opt/openoffice.org/basis3.1/sdk
%endif
%if 0%(if [ -x /opt/openoffice.org/basis3.0/sdk/bin/idlc ]; then echo 1; else echo 0; fi)
%define _uno 1
%define ooo_home /opt/openoffice.org
%define ooo_ure_home /opt/openoffice.org/ure
%define ooo_sdk_home /opt/openoffice.org/basis3.0/sdk
%endif
%define _uno 0
#---[ Check for Java ]------------------------------------------------------------------------------------------------
%if 0%(if [ -x @JDK_HOME@/bin/javah ]; then echo 1; else echo 0; fi)
%define _java 1
%endif
#---[ Check for distro ]----------------------------------------------------------------------------------------------
%define _release %{_rel}
%define _distro Linux
%if 0%{?suse_version}
%define _release %{_rel}.suse%{suse_version}
%define _distro SuSE Linux %{suse_version}
%endif
%if 0%{?mdkversion}
%define _release %{_rel}.mdv%{mandriva_release}
%define _redhat 0
%define _distro Mandriva Linux %{mandriva_release}
%endif
%if 0%{?fedora_version}
%define _release %{_rel}.fc%{fedora_version}
%define _redhat 0
%define _distro Fedora %{fedora_version}
%endif
%if 0%{?_redhat}
%define _redhat_prefix %(grep -q "Red Hat Linux" /etc/redhat-release && echo rhl || echo el)
%define _redhat_vernum %(rpm -qf --queryformat %{VERSION} /etc/redhat-release|tr -d '.')
%define _release %{_rel}.%{_redhat_prefix}%{_redhat_vernum}
%define _distro %{_redhat_prefix} %{_redhat_vernum}
%endif
#---[ Check for extras ]----------------------------------------------------------------------------------------------
%define _rexx %(which oorexx-config > /dev/null 2>&1; if [ "$?" = "0" ]; then echo 1; else echo 0; fi)
#---[ Packaging ]-----------------------------------------------------------------------------------------------------
Name: @PACKAGE@
License: LGPL
Group: System/X11/Terminals
Version: @PACKAGE_VERSION@
Release: %_release
Summary: IBM 3270 Terminal emulator for gtk.
Source: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: openssl shared-mime-info libgnome libgnomeui %{name}-lib = @PACKAGE_VERSION@
Distribution: %_distro
BuildRequires: autoconf automake gcc-c++ sed pkgconfig gtk2-devel libgnome-devel gettext-devel
%description
IBM 3270 terminal emulator gtk. It can be used to communicate with
any IBM host that supports 3270-style connections over TELNET.
SVN Revision: @PACKAGE_REVISION@
SVN sources from: @PACKAGE_SOURCE@
%package lib
Provides: %{name}-lib
Summary: 3270 Communication library for %{name}
Group: Development/Libraries
Requires: openssl %{name}-lib
BuildRequires: autoconf openssl-devel sed pkgconfig
%description lib
tn3270 protocol library for %{name}
SVN Revision: @PACKAGE_REVISION@
SVN sources from: @PACKAGE_SOURCE@
%package devel
Provides: %{name}-devel
Summary: Devel for 3270 Communication library for %{name}
Group: Development/Libraries
Requires: %{name}-lib = @PACKAGE_VERSION@
%description devel
devel for tn3270 protocol library for %{name}
SVN Revision: @PACKAGE_REVISION@
SVN sources from: @PACKAGE_SOURCE@
%if 0%{?_rexx}
%package rexx
Summary: Rexx scripts support for %{name}
Group: Development/Libraries
Requires: ooRexx >= 3.2.0 %{name}-lib = @PACKAGE_VERSION@
BuildRequires: ooRexx >= 3.2.0
%description rexx
Rexx bindings for 3270 access using lib3270 (non-gui)
SVN Revision: @PACKAGE_REVISION@
SVN sources from: @PACKAGE_SOURCE@
%package plugin-rexx
Summary: Rexx plugin for %{name}
Group: Development/Libraries
Requires: %{name}-rexx = @PACKAGE_VERSION@
BuildRequires: ooRexx >= 3.2.0
%description plugin-rexx
Plugin to add Rexx scripting suport in %{name}
SVN Revision: @PACKAGE_REVISION@
SVN sources from: @PACKAGE_SOURCE@
%endif
%if 0%{?_uno}
%package OpenOffice
Provides: %{name}-OpenOffice
Group: Productivity/Office/Suite
Summary: 3270 calls for OpenOffice/StarBasic.
Requires: %{name}-lib = @PACKAGE_VERSION@
BuildRequires: autoconf sed pkgconfig zip
%description OpenOffice
Uno/OpenOffice library allowing 3270 access from StarBasic
SVN Revision: @PACKAGE_REVISION@
SVN sources from: @PACKAGE_SOURCE@
%endif
%if 0%{?_java}
%package java
Group: Development/Libraries
Summary: Java bindings for %{name}
Requires: %{name}-lib = @PACKAGE_VERSION@
%description java
Jni library allowing 3270 access from java programs (non-GUI)
SVN Revision: @PACKAGE_REVISION@
SVN sources from: @PACKAGE_SOURCE@
%package plugin-java
Group: Development/Libraries
Summary: Java plugin for %{name}
Requires: %{name}-java = @PACKAGE_VERSION@
%description plugin-java
Plugin allowing use of java classes inside %{name}'s UI
SVN Revision: @PACKAGE_REVISION@
SVN sources from: @PACKAGE_SOURCE@
%endif
%prep
%setup -q -n %{name}-%{version}
aclocal
autoconf
%if 0%{?_uno}
UNO_OPTIONS="--with-office-sdk-home=%{ooo_sdk_home} --with-office-home=%{ooo_home} --with-office-ure-home=%{ooo_ure_home}"
%else
UNO_OPTIONS="--disable-office"
%endif
%if 0%{?_java}
JAVA_OPTIONS="--with-jnidir=%{_jnidir} --with-jvmjardir=%{_jvmjardir}"
%else
JAVA_OPTIONS=""
%endif
%configure --disable-trace $UNO_OPTIONS $JAVA_OPTIONS
%build
make clean
make Release
%install
rm -rf $RPM_BUILD_ROOT
cd %{_builddir}/%{name}-%{version}
make DESTDIR=$RPM_BUILD_ROOT docdir=%{_docdir} install
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc ChangeLog AUTHORS LICENSE
%{_bindir}/%{name}
%{_datadir}/applications/*.desktop
%{_datadir}/locale/*/LC_MESSAGES/*.mo
%{_datadir}/%{name}/pw3270.conf
%{_datadir}/%{name}/ui/default.xml
%{_datadir}/%{name}/ui/keypad.xml
%{_datadir}/%{name}/ui/functions.xml
%{_datadir}/%{name}/%{name}.svg
%{_datadir}/%{name}/colors.conf
%post
/sbin/ldconfig
/usr/bin/update-mime-database /usr/share/mime >/dev/null
%postun
/sbin/ldconfig
/usr/bin/update-mime-database /usr/share/mime >/dev/null
%if 0%{?_uno}
%post OpenOffice
if [ -x /opt/broffice.org3/program/unopkg ] then
/opt/broffice.org3/program/unopkg add --shared %ooo_home/share/extension/install/%{name}.oxt
else
@UNOPKG@ add --shared %ooo_home/share/extension/install/%{name}.oxt
fi
%preun OpenOffice
if [ -x /opt/broffice.org3/program/unopkg ] then
/opt/broffice.org3/program/unopkg remove --shared %{name}.oxt
else
@UNOPKG@ remove --shared %{name}.oxt
fi
%endif
%files lib
%defattr(-,root,root)
%{_docdir}
%{_libdir}/lib3270.so
%files devel
%defattr(-,root,root)
%{_includedir}/lib3270.h
%{_includedir}/lib3270
%{_libdir}/pkgconfig
%{_datadir}/%{name}/ui/debug.xml
%if 0%{?_rexx}
%files rexx
%defattr(-,root,root)
%{_libdir}/librx3270.so
%{_bindir}/rx3270.cls
%files plugin-rexx
%defattr(-,root,root)
%{_libdir}/%{name}/plugins/rx3270.so
%{_datadir}/%{name}/ui/rexx.xml
%endif
%if 0%{?_uno}
%files OpenOffice
%defattr(-,root,root)
%ooo_home/share/extension/install/*.oxt
%endif
%if 0%{?_java}
%files java
%defattr(-,root,root)
%{_jnidir}
%{_jvmjardir}
%files plugin-java
%defattr(-,root,root)
%{_libdir}/%{name}/plugins/j3270plugin.so
%endif