Commit d480b71e0f8d5baa1b03ab7a9efa0104d4b91651

Authored by Perry Werneck
1 parent 7fa8b530
Exists in master and in 1 other branch develop

Updating package.

Showing 2 changed files with 40 additions and 41 deletions   Show diff stats
rpm/_service
... ... @@ -3,15 +3,10 @@
3 3 <!-- https://github.com/openSUSE/obs-service-tar_scm/blob/master/tar_scm.py -->
4 4 <service name="tar_scm">
5 5  
6   - <!--
7   - <param name="sslverify">disable</param>
8   - <param name="url">https://softwarepublico.gov.br/gitlab/pw3270/libv3270.git</param>
9   - -->
10   -
11 6 <param name="url">https://github.com/PerryWerneck/libv3270.git</param>
12 7  
13   - <param name="changesgenerate">enable</param>
14   - <param name="changesauthor">perry.werneck@gmail.com</param>
  8 + <param name="changesgenerate">enable</param>
  9 + <param name="changesauthor">perry.werneck@gmail.com</param>
15 10  
16 11 <param name="versionformat">@PARENT_TAG@</param>
17 12 <param name="scm">git</param>
... ... @@ -19,10 +14,10 @@
19 14 </service>
20 15  
21 16 <!-- https://github.com/openSUSE/obs-service-extract_file -->
22   - <service name="extract_file">
  17 + <!-- service name="extract_file">
23 18 <param name="archive">*.tar</param>
24   - <param name="files">*/rpm/*.spec</param>
25   - </service>
  19 + <param name="files">*/rpm/libv3270.spec</param>
  20 + </service -->
26 21  
27 22 <service name="extract_file">
28 23 <param name="archive">*.tar</param>
... ...
rpm/libv3270.spec
... ... @@ -16,38 +16,24 @@
16 16 # Please submit bugfixes or comments via http://bugs.opensuse.org/
17 17 #
18 18  
19   -#---[ Versions ]------------------------------------------------------------------------------------------------------
20   -
21   -%define MAJOR_VERSION 5
22   -%define MINOR_VERSION 2
23   -
24   -%define _libvrs %{MAJOR_VERSION}_%{MINOR_VERSION}
25   -%define _product %(pkg-config --variable=product_name lib3270)
26   -
27 19 #---[ Macros ]--------------------------------------------------------------------------------------------------------
28 20  
29 21 %if ! %{defined _release}
30 22 %define _release suse%{suse_version}
31 23 %endif
32 24  
33   -#---[ Main package ]--------------------------------------------------------------------------------------------------
  25 +#---[ Package header ]------------------------------------------------------------------------------------------------
34 26  
35 27 Summary: 3270 Virtual Terminal for GTK
36   -Name: libv3270-%{_libvrs}
  28 +Name: libv3270
37 29 Version: 5.2
38 30 Release: 0
39 31 License: LGPL-3.0
40 32 Source: libv3270-%{version}.tar.xz
41 33  
42 34 Url: https://github.com/PerryWerneck/libv3270.git
43   -
44 35 Group: Development/Libraries/C and C++
45   -BuildRoot: /var/tmp/%{name}-%{version}
46 36  
47   -Provides: libv3270_%{MAJOR_VERSION}_%{MINOR_VERSION}
48   -Conflicts: otherproviders(libv3270_%{MAJOR_VERSION}_%{MINOR_VERSION})
49   -
50   -BuildRequires: lib3270-%{MAJOR_VERSION}_%{MINOR_VERSION}-devel
51 37 BuildRequires: autoconf >= 2.61
52 38 BuildRequires: automake
53 39 BuildRequires: binutils
... ... @@ -58,12 +44,12 @@ BuildRequires: m4
58 44  
59 45 %if 0%{?fedora} || 0%{?suse_version} > 1200
60 46  
61   -BuildRequires: pkgconfig(openssl)
62   -BuildRequires: pkgconfig(gtk+-3.0)
  47 +BuildRequires: pkgconfig(lib3270)
  48 +BuildRequires: pkgconfig(gtk+-3.0)
63 49  
64 50 %else
65 51  
66   -BuildRequires: openssl-devel
  52 +BuildRequires: lib3270-devel
67 53 BuildRequires: gtk3-devel
68 54  
69 55 %endif
... ... @@ -84,6 +70,23 @@ Originally designed as part of the pw3270 application this library provides a TN
84 70  
85 71 See more details at https://softwarepublico.gov.br/social/pw3270/
86 72  
  73 +#---[ Library ]-------------------------------------------------------------------------------------------------------
  74 +
  75 +%define _product %(pkg-config --variable=product_name lib3270)
  76 +%define MAJOR_VERSION %(echo %{version} | cut -d. -f1)
  77 +%define MINOR_VERSION %(echo %{version} | cut -d. -f2)
  78 +%define _libvrs %{MAJOR_VERSION}_%{MINOR_VERSION}
  79 +
  80 +%package -n %{name}-%{_libvrs}
  81 +Summary: TN3270 Access library
  82 +Group: Development/Libraries/C and C++
  83 +
  84 +%description -n %{name}-%{_libvrs}
  85 +
  86 +Originally designed as part of the pw3270 application this library provides a TN3270 virtual terminal widget for GTK 3.
  87 +
  88 +See more details at https://softwarepublico.gov.br/social/pw3270/
  89 +
87 90 #---[ Development ]---------------------------------------------------------------------------------------------------
88 91  
89 92 %package devel
... ... @@ -91,11 +94,13 @@ See more details at https://softwarepublico.gov.br/social/pw3270/
91 94 Summary: 3270 Virtual Terminal for GTK development files
92 95 Group: Development/Libraries/C and C++
93 96  
94   -Requires: %{name} = %{version}
95   -Requires: lib3270-%{MAJOR_VERSION}_%{MINOR_VERSION}-devel
  97 +Requires: %{name}-%{_libvrs} = %{version}
96 98  
97   -Provides: libv3270-devel = %{version}
98   -Conflicts: otherproviders(libv3270-devel)
  99 +%if 0%{?fedora} || 0%{?suse_version} > 1200
  100 +Requires: pkgconfig(lib3270)
  101 +%else
  102 +Requires: lib3270-devel
  103 +%endif
99 104  
100 105 %description devel
101 106  
... ... @@ -133,7 +138,6 @@ See more details at https://softwarepublico.gov.br/social/pw3270/
133 138 NOCONFIGURE=1 ./autogen.sh
134 139  
135 140 %configure \
136   - --with-sdk-version=%{version} \
137 141 --disable-static \
138 142 --enable-pic
139 143  
... ... @@ -143,7 +147,7 @@ make all
143 147 %install
144 148 %makeinstall
145 149  
146   -%files
  150 +%files -n %{name}-%{_libvrs}
147 151 %defattr(-,root,root)
148 152  
149 153 # https://en.opensuse.org/openSUSE:Packaging_for_Leap#RPM_Distro_Version_Macros
... ... @@ -154,8 +158,8 @@ make all
154 158 %doc AUTHORS README.md LICENSE
155 159 %endif
156 160  
157   -%{_libdir}/libv3270.so.%{MAJOR_VERSION}
158   -%{_libdir}/libv3270.so.%{MAJOR_VERSION}.%{MINOR_VERSION}
  161 +%{_libdir}/%{name}.so.%{MAJOR_VERSION}
  162 +%{_libdir}/%{name}.so.%{MAJOR_VERSION}.%{MINOR_VERSION}
159 163  
160 164 %{_datadir}/%{_product}/colors.conf
161 165  
... ... @@ -165,7 +169,7 @@ make all
165 169 %files devel
166 170 %defattr(-,root,root)
167 171  
168   -%{_libdir}/libv3270.so
  172 +%{_libdir}/%{name}.so
169 173 %{_libdir}/pkgconfig/*.pc
170 174  
171 175 %{_includedir}/v3270.h
... ... @@ -179,10 +183,10 @@ make all
179 183 /usr/share/glade/pixmaps/hicolor/16x16/actions/widget-v3270-terminal.png
180 184 /usr/share/glade/pixmaps/hicolor/22x22/actions/widget-v3270-terminal.png
181 185  
182   -%pre -p /sbin/ldconfig
  186 +%pre -n %{name}-%{_libvrs} -p /sbin/ldconfig
183 187  
184   -%post -p /sbin/ldconfig
  188 +%post -n %{name}-%{_libvrs} -p /sbin/ldconfig
185 189  
186   -%postun -p /sbin/ldconfig
  190 +%postun -n %{name}-%{_libvrs} -p /sbin/ldconfig
187 191  
188 192 %changelog
... ...