Commit 423a6f7592ae668e0604685c045c6b30ba59250b
1 parent
b5841af4
Exists in
master
and in
3 other branches
Fixing spec file.
Showing
1 changed file
with
44 additions
and
65 deletions
Show diff stats
rpm/lib3270.spec
... | ... | @@ -16,42 +16,21 @@ |
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 | - | |
26 | -#Compat macro for new _fillupdir macro introduced in Nov 2017 | |
27 | -%if ! %{defined _fillupdir} | |
28 | - %define _fillupdir /var/adm/fillup-templates | |
29 | -%endif | |
30 | - | |
31 | -#---[ Macros ]-------------------------------------------------------------------------------------------------------- | |
32 | - | |
33 | -%if ! %{defined _release} | |
34 | - %define _release suse%{suse_version} | |
35 | -%endif | |
36 | - | |
37 | -#---[ Main package ]-------------------------------------------------------------------------------------------------- | |
19 | +#---[ Package header ]------------------------------------------------------------------------------------------------ | |
38 | 20 | |
39 | 21 | Summary: TN3270 Access library |
40 | -Name: lib3270-%{_libvrs} | |
22 | +Name: lib3270 | |
41 | 23 | Version: 5.2 |
42 | 24 | Release: 0 |
43 | 25 | License: LGPL-3.0 |
44 | 26 | |
45 | -Source: lib3270-%{version}.tar.xz | |
27 | +Source: %{name}-%{version}.tar.xz | |
46 | 28 | |
47 | -Url: https://github.com/PerryWerneck/lib3270.git | |
29 | +URL: https://github.com/PerryWerneck/lib3270 | |
48 | 30 | |
49 | -Group: Development/Libraries/C and C++ | |
31 | +Group: System/Libraries | |
50 | 32 | BuildRoot: /var/tmp/%{name}-%{version} |
51 | 33 | |
52 | -Provides: lib3270_%{_libvrs} | |
53 | -Conflicts: otherproviders(lib3270_%{_libvrs}) | |
54 | - | |
55 | 34 | BuildRequires: autoconf >= 2.61 |
56 | 35 | BuildRequires: automake |
57 | 36 | BuildRequires: binutils |
... | ... | @@ -62,8 +41,7 @@ BuildRequires: m4 |
62 | 41 | BuildRequires: pkgconfig |
63 | 42 | BuildRequires: fdupes |
64 | 43 | |
65 | -%if 0%{? | |
66 | -fedora} || 0%{?suse_version} > 1200 | |
44 | +%if 0%{?fedora} || 0%{?suse_version} > 1200 | |
67 | 45 | |
68 | 46 | BuildRequires: pkgconfig(openssl) |
69 | 47 | BuildRequires: pkgconfig(libssl) |
... | ... | @@ -76,50 +54,59 @@ BuildRequires: xz |
76 | 54 | |
77 | 55 | %endif |
78 | 56 | |
79 | -%description | |
57 | +%if 0%{?centos_version} | |
58 | +# CENTOS Requires gdb for debuginfo | |
59 | +BuildRequires: gdb | |
60 | +%endif | |
80 | 61 | |
81 | -TN3270 access library originally designed as part of the pw3270 application. | |
62 | +%description | |
63 | +TN3270 access library, originally designed as part of the pw3270 application. | |
82 | 64 | |
83 | -See more details at https://softwarepublico.gov.br/social/pw3270/ | |
65 | +For more details, see https://softwarepublico.gov.br/social/pw3270/ . | |
84 | 66 | |
85 | -#---[ Development ]--------------------------------------------------------------------------------------------------- | |
67 | +#---[ Library ]------------------------------------------------------------------------------------------------------- | |
86 | 68 | |
87 | -%package -n lib3270-devel | |
69 | +%define MAJOR_VERSION %(echo %{version} | cut -d. -f1) | |
70 | +%define MINOR_VERSION %(echo %{version} | cut -d. -f2) | |
71 | +%define _libvrs %{MAJOR_VERSION}_%{MINOR_VERSION} | |
88 | 72 | |
89 | -Summary: TN3270 Access library development files | |
90 | -Group: Development/Libraries/C and C++ | |
73 | +%package -n %{name}-%{_libvrs} | |
74 | +Summary: TN3270 Access library | |
75 | +Group: Development/Libraries/C and C++ | |
91 | 76 | |
92 | -Requires: %{name} = %{version} | |
77 | +%description -n %{name}-%{_libvrs} | |
78 | +TN3270 access library, originally designed as part of the pw3270 application. | |
93 | 79 | |
94 | -%description -n lib3270-devel | |
80 | +For more details, see https://softwarepublico.gov.br/social/pw3270/ . | |
95 | 81 | |
96 | -TN3270 access library for C/C++ development files. | |
82 | +%package devel | |
97 | 83 | |
98 | -Originally designed as part of the pw3270 application. | |
84 | +Summary: TN3270 Access library development files | |
85 | +Group: Development/Libraries/C and C++ | |
86 | +Requires: %{name}-%{_libvrs} = %{version} | |
99 | 87 | |
100 | -See more details at https://softwarepublico.gov.br/social/pw3270/ | |
88 | +%description devel | |
89 | +Header files for the TN3270 access library. | |
101 | 90 | |
102 | 91 | #---[ Build & Install ]----------------------------------------------------------------------------------------------- |
103 | 92 | |
104 | 93 | %prep |
105 | -%setup -n lib3270-%{version} | |
94 | +%setup | |
106 | 95 | |
107 | -NOCONFIGURE=1 ./autogen.sh | |
96 | +NOCONFIGURE=1 \ | |
97 | + ./autogen.sh | |
108 | 98 | |
109 | -%configure \ | |
110 | - --with-sdk-version=%{version} \ | |
111 | - --disable-static | |
99 | +%configure | |
112 | 100 | |
113 | 101 | %build |
114 | -make clean | |
115 | -make all | |
102 | +make all %{?_smp_mflags} | |
116 | 103 | |
117 | 104 | %install |
118 | 105 | |
119 | -%makeinstall | |
120 | -%fdupes %{buildroot} | |
106 | +%make_install | |
107 | +%fdupes %{buildroot}/%{_prefix} | |
121 | 108 | |
122 | -%files | |
109 | +%files -n %{name}-%{_libvrs} | |
123 | 110 | %defattr(-,root,root) |
124 | 111 | |
125 | 112 | # https://en.opensuse.org/openSUSE:Packaging_for_Leap#RPM_Distro_Version_Macros |
... | ... | @@ -132,32 +119,24 @@ make all |
132 | 119 | |
133 | 120 | %dir %{_datadir}/pw3270 |
134 | 121 | |
135 | -%{_libdir}/lib3270.so.%{MAJOR_VERSION} | |
136 | -%{_libdir}/lib3270.so.%{MAJOR_VERSION}.%{MINOR_VERSION} | |
122 | +%{_libdir}/%{name}.so.%{MAJOR_VERSION} | |
123 | +%{_libdir}/%{name}.so.%{MAJOR_VERSION}.%{MINOR_VERSION} | |
137 | 124 | |
138 | -%files -n lib3270-devel | |
125 | +%files devel | |
139 | 126 | %defattr(-,root,root) |
140 | 127 | |
141 | -%{_libdir}/lib3270.so | |
128 | +%{_libdir}/%{name}.so | |
142 | 129 | |
143 | 130 | %{_includedir}/*.h |
144 | -%{_includedir}/lib3270 | |
131 | +%{_includedir}/%{name} | |
145 | 132 | |
146 | 133 | %{_libdir}/pkgconfig/*.pc |
147 | 134 | |
148 | 135 | %dir %{_datadir}/pw3270/pot |
149 | 136 | %{_datadir}/pw3270/pot/*.pot |
150 | 137 | |
151 | -%pre | |
152 | -/sbin/ldconfig | |
153 | -exit 0 | |
154 | - | |
155 | -%post | |
156 | -/sbin/ldconfig | |
157 | -exit 0 | |
138 | +%post -n %{name}-%{_libvrs} -p /sbin/ldconfig | |
158 | 139 | |
159 | -%postun | |
160 | -/sbin/ldconfig | |
161 | -exit 0 | |
140 | +%postun -n %{name}-%{_libvrs} -p /sbin/ldconfig | |
162 | 141 | |
163 | 142 | %changelog | ... | ... |