Commit 560e9a4bf41b47f02ce9421c74034fe327388d9e

Authored by Perry Werneck
1 parent e8cf13fc

Aplicando patch enviado por Jan Engelhardt (opensuse-review-team)

- Put libpw3270 into its own package (shared library guideline).
- Drop require on /usr/bin/openssl, this is unusual for a library
  to request.
- %configure already sets CFLAGS,CXXFLAGS, do not set it again.
  Replace old RPM variables. Remove redundant %clean section.
  Do not run fdupes across hardlink boundaries.
- Fix one RPM category. Trim redundant words from description.
Showing 2 changed files with 43 additions and 50 deletions   Show diff stats
locale/pw3270.pot
@@ -9,7 +9,7 @@ msgstr "" @@ -9,7 +9,7 @@ msgstr ""
9 "#-#-#-#-# lib3270.pot (PACKAGE VERSION) #-#-#-#-#\n" 9 "#-#-#-#-# lib3270.pot (PACKAGE VERSION) #-#-#-#-#\n"
10 "Project-Id-Version: PACKAGE VERSION\n" 10 "Project-Id-Version: PACKAGE VERSION\n"
11 "Report-Msgid-Bugs-To: \n" 11 "Report-Msgid-Bugs-To: \n"
12 -"POT-Creation-Date: 2017-08-21 10:23-0300\n" 12 +"POT-Creation-Date: 2017-08-23 16:19-0300\n"
13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 14 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
15 "Language-Team: LANGUAGE <LL@li.org>\n" 15 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -20,7 +20,7 @@ msgstr &quot;&quot; @@ -20,7 +20,7 @@ msgstr &quot;&quot;
20 "#-#-#-#-# pw3270.pot (PACKAGE VERSION) #-#-#-#-#\n" 20 "#-#-#-#-# pw3270.pot (PACKAGE VERSION) #-#-#-#-#\n"
21 "Project-Id-Version: PACKAGE VERSION\n" 21 "Project-Id-Version: PACKAGE VERSION\n"
22 "Report-Msgid-Bugs-To: \n" 22 "Report-Msgid-Bugs-To: \n"
23 -"POT-Creation-Date: 2017-08-21 10:23-0300\n" 23 +"POT-Creation-Date: 2017-08-23 16:19-0300\n"
24 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 24 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
25 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 25 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
26 "Language-Team: LANGUAGE <LL@li.org>\n" 26 "Language-Team: LANGUAGE <LL@li.org>\n"
rpm/pw3270.spec
@@ -31,8 +31,8 @@ @@ -31,8 +31,8 @@
31 #---[ Packaging ]----------------------------------------------------------------------------------------------------- 31 #---[ Packaging ]-----------------------------------------------------------------------------------------------------
32 32
33 Name: pw3270 33 Name: pw3270
34 -Version: 5.1  
35 -Release: 1 34 +Version: 5.1
  35 +Release: 0
36 Summary: IBM 3270 Terminal emulator for GTK 36 Summary: IBM 3270 Terminal emulator for GTK
37 License: GPL-2.0 37 License: GPL-2.0
38 Group: System/X11/Terminals 38 Group: System/X11/Terminals
@@ -44,7 +44,6 @@ Source: pw3270-%{version}.tar.bz2 @@ -44,7 +44,6 @@ Source: pw3270-%{version}.tar.bz2
44 BuildRoot: %{_tmppath}/%{name}-%{version}-build 44 BuildRoot: %{_tmppath}/%{name}-%{version}-build
45 45
46 Requires: shared-mime-info 46 Requires: shared-mime-info
47 -Provides: libpw3270-%{_libvrs}  
48 47
49 #--[ Setup by distribution ]------------------------------------------------------------------------------------------ 48 #--[ Setup by distribution ]------------------------------------------------------------------------------------------
50 # 49 #
@@ -139,50 +138,60 @@ BuildRequires: help2man @@ -139,50 +138,60 @@ BuildRequires: help2man
139 %endif 138 %endif
140 139
141 %description 140 %description
142 -Open-source GTK-based IBM 3270 terminal emulator with many advanced features. It can be used to communicate with any IBM host that supports 3270-style connections over TELNET.  
143 -Based on the original x3270 code, pw3270 was originally created for Banco do Brasil, and is now used worldwide. 141 +GTK-based IBM 3270 terminal emulator with many advanced features. It can be used to communicate with any IBM host that supports 3270-style connections over TELNET.
  142 +
  143 +Based on the original x3270 code, pw3270 was originally created for Banco do Brasil, and is now used worldwide.
144 144
145 #--[ lib3270 ]-------------------------------------------------------------------------------------------------------- 145 #--[ lib3270 ]--------------------------------------------------------------------------------------------------------
146 146
147 %package -n lib3270-%{_libvrs} 147 %package -n lib3270-%{_libvrs}
148 Summary: 3270 Communication library for %{name} 148 Summary: 3270 Communication library for %{name}
149 -Group: Development/Libraries/C and C++  
150 -Requires: openssl 149 +Group: System/Libraries
151 Provides: lib3270 = %{version} 150 Provides: lib3270 = %{version}
152 151
153 %description -n lib3270-%{_libvrs} 152 %description -n lib3270-%{_libvrs}
154 -Open-source GTK-based IBM 3270 terminal emulator with many advanced features. It can be used to communicate with any IBM host that supports 3270-style connections over TELNET. 153 +GTK-based IBM 3270 terminal emulator with many advanced features. It can be used to communicate with any IBM host that supports 3270-style connections over TELNET.
  154 +
  155 +This package contains the tn3270 protocol library for %{name}.
155 156
156 -This package contains the tn3270 protocol library for %{name} 157 +%package -n libpw3270-%{_libvrs}
  158 +Summary: 3270 terminal emulation library
  159 +Group: System/Libraries
  160 +
  161 +%description -n libpw3270-%{_libvrs}
  162 +GTK-based IBM 3270 terminal emulator with many advanced features. It can be used to communicate with any IBM host that supports 3270-style connections over TELNET.
  163 +
  164 +This package contains the terminal emulator library.
157 165
158 #--[ Devel ]---------------------------------------------------------------------------------------------------------- 166 #--[ Devel ]----------------------------------------------------------------------------------------------------------
159 167
160 %package -n lib3270-devel 168 %package -n lib3270-devel
161 Summary: Devel for 3270 Communication library for %{name} 169 Summary: Devel for 3270 Communication library for %{name}
162 Group: Development/Libraries/C and C++ 170 Group: Development/Libraries/C and C++
163 -Requires: lib3270-%{_libvrs} 171 +Requires: lib3270-%{_libvrs} = %{version}
164 172
165 %description -n lib3270-devel 173 %description -n lib3270-devel
166 -Open-source GTK-based IBM 3270 terminal emulator with many advanced features. It can be used to communicate with any IBM host that supports 3270-style connections over TELNET.  
167 -This package contains the development files for tn3270 protocol library for %{name} 174 +GTK-based IBM 3270 terminal emulator with many advanced features. It can be used to communicate with any IBM host that supports 3270-style connections over TELNET.
  175 +
  176 +This package contains the development files for tn3270 protocol library for %{name}.
168 177
169 %package devel 178 %package devel
170 Summary: Files required for development of %{name} plugins 179 Summary: Files required for development of %{name} plugins
171 Group: Development/Libraries/C and C++ 180 Group: Development/Libraries/C and C++
172 Requires: pkgconfig(lib3270) = %{version} 181 Requires: pkgconfig(lib3270) = %{version}
173 Requires: pkgconfig(gtk+-3.0) 182 Requires: pkgconfig(gtk+-3.0)
174 -Requires: libpw3270-%{_libvrs} 183 +Requires: libpw3270-%{_libvrs} = %{version}
175 184
176 %description -n %{name}-devel 185 %description -n %{name}-devel
177 -Open-source GTK-based IBM 3270 terminal emulator with many advanced features. It can be used to communicate with any IBM host that supports 3270-style connections over TELNET. 186 +GTK-based IBM 3270 terminal emulator with many advanced features. It can be used to communicate with any IBM host that supports 3270-style connections over TELNET.
178 187
179 -This package contains the development files for %{name} 188 +This package contains the development files for %{name}.
180 189
181 #--[ Plugins ]-------------------------------------------------------------------------------------------------------- 190 #--[ Plugins ]--------------------------------------------------------------------------------------------------------
182 191
183 %if 0%{?_dbus} 192 %if 0%{?_dbus}
184 %package plugin-dbus 193 %package plugin-dbus
185 -Summary: DBUS object for %{name} 194 +Summary: D-Bus object for %{name}
186 Group: System/X11/Terminals 195 Group: System/X11/Terminals
187 Requires: %{name} = %{version} 196 Requires: %{name} = %{version}
188 Requires: dbus-1 197 Requires: dbus-1
@@ -199,16 +208,12 @@ Plugin exporting a DBUS object from every %{name} open session. @@ -199,16 +208,12 @@ Plugin exporting a DBUS object from every %{name} open session.
199 208
200 aclocal 209 aclocal
201 autoconf 210 autoconf
202 -  
203 -export CFLAGS="$RPM_OPT_FLAGS"  
204 -export CXXFLAGS="$RPM_OPT_FLAGS"  
205 -export FFLAGS="$RPM_OPT_FLAGS"  
206 -  
207 %configure --with-release=%{release} 211 %configure --with-release=%{release}
208 212
209 %build 213 %build
210 make clean 214 make clean
211 -make all 215 +# parallel build is broken
  216 +make all -j1
212 217
213 %install 218 %install
214 %make_install 219 %make_install
@@ -230,21 +235,17 @@ EOF @@ -230,21 +235,17 @@ EOF
230 chmod 644 pw3270.desktop 235 chmod 644 pw3270.desktop
231 236
232 desktop-file-install --mode 644 \ 237 desktop-file-install --mode 644 \
233 - --dir $RPM_BUILD_ROOT/%{_datadir}/applications \ 238 + --dir %{buildroot}/%{_datadir}/applications \
234 --add-category System \ 239 --add-category System \
235 --add-category TerminalEmulator \ 240 --add-category TerminalEmulator \
236 pw3270.desktop 241 pw3270.desktop
237 242
238 # Java now lives in another package 243 # Java now lives in another package
239 -rm ${RPM_BUILD_ROOT}/%{_datadir}/pw3270/ui/*java*.xml 244 +rm %{buildroot}/%{_datadir}/pw3270/ui/*java*.xml
240 245
241 # ooRexx now lives in another package 246 # ooRexx now lives in another package
242 -rm ${RPM_BUILD_ROOT}/%{_datadir}/pw3270/ui/*rexx*.xml  
243 -  
244 -%fdupes $RPM_BUILD_ROOT  
245 -  
246 -%clean  
247 -rm -rf %{buildroot} 247 +rm %{buildroot}/%{_datadir}/pw3270/ui/*rexx*.xml
  248 +%fdupes %{buildroot}/%{_prefix}
248 249
249 #---[ Files ]--------------------------------------------------------------------------------------------------------- 250 #---[ Files ]---------------------------------------------------------------------------------------------------------
250 251
@@ -259,9 +260,6 @@ rm -rf %{buildroot} @@ -259,9 +260,6 @@ rm -rf %{buildroot}
259 %dir %{_datadir}/pw3270 260 %dir %{_datadir}/pw3270
260 %dir %{_datadir}/pw3270/ui 261 %dir %{_datadir}/pw3270/ui
261 %{_bindir}/pw3270 262 %{_bindir}/pw3270
262 -%{_libdir}/libpw3270.so.%{MAJOR_VERSION}  
263 -%{_libdir}/libpw3270.so.%{MAJOR_VERSION}.%{MINOR_VERSION}  
264 -  
265 %{_datadir}/applications/pw3270.desktop 263 %{_datadir}/applications/pw3270.desktop
266 264
267 %{_datadir}/pw3270/ui/00default.xml 265 %{_datadir}/pw3270/ui/00default.xml
@@ -277,6 +275,11 @@ rm -rf %{buildroot} @@ -277,6 +275,11 @@ rm -rf %{buildroot}
277 %{_libdir}/lib3270.so.%{MAJOR_VERSION}.%{MINOR_VERSION} 275 %{_libdir}/lib3270.so.%{MAJOR_VERSION}.%{MINOR_VERSION}
278 %{_libdir}/lib3270.so.%{MAJOR_VERSION} 276 %{_libdir}/lib3270.so.%{MAJOR_VERSION}
279 277
  278 +%files -n libpw3270-%{_libvrs}
  279 +%defattr(-,root,root)
  280 +%{_libdir}/libpw3270.so.%{MAJOR_VERSION}.%{MINOR_VERSION}
  281 +%{_libdir}/libpw3270.so.%{MAJOR_VERSION}
  282 +
280 %files -n lib3270-devel 283 %files -n lib3270-devel
281 %defattr(-,root,root) 284 %defattr(-,root,root)
282 %{_includedir}/lib3270 285 %{_includedir}/lib3270
@@ -305,20 +308,10 @@ rm -rf %{buildroot} @@ -305,20 +308,10 @@ rm -rf %{buildroot}
305 308
306 #---[ Scripts ]------------------------------------------------------------------------------------------------------- 309 #---[ Scripts ]-------------------------------------------------------------------------------------------------------
307 310
308 -%post  
309 -/sbin/ldconfig  
310 -exit 0  
311 -  
312 -%postun  
313 -/sbin/ldconfig  
314 -exit 0  
315 -  
316 -%post -n lib3270-%{_libvrs}  
317 -/sbin/ldconfig  
318 -exit 0  
319 -  
320 -%postun -n lib3270-%{_libvrs}  
321 -/sbin/ldconfig  
322 -exit 0 311 +%post -n lib3270-%{_libvrs} -p /sbin/ldconfig
  312 +%postun -n lib3270-%{_libvrs} -p /sbin/ldconfig
  313 +%post -n libpw3270-%{_libvrs} -p /sbin/ldconfig
  314 +%postun -n libpw3270-%{_libvrs} -p /sbin/ldconfig
323 315
324 %changelog 316 %changelog
  317 +