Spec cleanup + modernization
- Use modern build helper macros - Drop support for pre-usrmove versions (Fedora < 17 and RHEL < 7) - Erm, dont nuke build-root at beginning of %%install
This commit is contained in:
parent
513c3d081b
commit
729c31bed7
39
popt.spec
39
popt.spec
@ -1,7 +1,7 @@
|
||||
Summary: C library for parsing command line parameters
|
||||
Name: popt
|
||||
Version: 1.16
|
||||
Release: 15%{?dist}
|
||||
Release: 16%{?dist}
|
||||
License: MIT
|
||||
Group: System Environment/Libraries
|
||||
URL: http://www.rpm5.org/
|
||||
@ -44,38 +44,16 @@ The popt-static package includes static libraries of the popt library.
|
||||
Install it if you need to link statically with libpopt.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch0 -p1 -b .pkgconfig
|
||||
%patch1 -p1 -b .execfail
|
||||
%patch2 -p1 -b .man-page
|
||||
%patch3 -p1 -b .help
|
||||
%patch4 -p1 -b .nextarg-memleak
|
||||
%patch5 -p1 -b .glob-error
|
||||
%autosetup
|
||||
|
||||
%build
|
||||
%if 0%{?fedora} < 17 && 0%{?rhel} < 7
|
||||
%configure --libdir=/%{_lib}
|
||||
%else
|
||||
%configure
|
||||
%endif
|
||||
make %{?_smp_mflags}
|
||||
%make_build
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make DESTDIR=$RPM_BUILD_ROOT install
|
||||
%make_install
|
||||
|
||||
%if 0%{?fedora} < 17 && 0%{?rhel} < 7
|
||||
# Move libpopt.{so,a} to %{_libdir}
|
||||
rm -f $RPM_BUILD_ROOT/%{_lib}/libpopt.{la,so}
|
||||
pushd $RPM_BUILD_ROOT/%{_lib}
|
||||
mkdir -p $RPM_BUILD_ROOT%{_libdir}
|
||||
ln -sf ../../%{_lib}/$(ls libpopt.so.?.?.?) $RPM_BUILD_ROOT%{_libdir}/libpopt.so
|
||||
popd
|
||||
mv -f $RPM_BUILD_ROOT/%{_lib}/libpopt.a $RPM_BUILD_ROOT%{_libdir}/libpopt.a
|
||||
mv -f $RPM_BUILD_ROOT/%{_lib}/pkgconfig $RPM_BUILD_ROOT%{_libdir}/pkgconfig
|
||||
%else
|
||||
rm -f $RPM_BUILD_ROOT/%{_libdir}/libpopt.la
|
||||
%endif
|
||||
|
||||
# Multiple popt configurations are possible
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/popt.d
|
||||
@ -91,11 +69,7 @@ make check
|
||||
%license COPYING
|
||||
%doc CHANGES
|
||||
%{_sysconfdir}/popt.d
|
||||
%if 0%{?fedora} < 17 && 0%{?rhel} < 7
|
||||
/%{_lib}/libpopt.so.*
|
||||
%else
|
||||
%{_libdir}/libpopt.so.*
|
||||
%endif
|
||||
|
||||
%files devel
|
||||
%doc README
|
||||
@ -108,6 +82,11 @@ make check
|
||||
%{_libdir}/libpopt.a
|
||||
|
||||
%changelog
|
||||
* Thu Oct 11 2018 Panu Matilainen <pmatilai@redhat.com> - 1.16-16
|
||||
- Use modern build helper macros
|
||||
- Drop support for pre-usrmove versions (Fedora < 17 and RHEL < 7)
|
||||
- Erm, dont nuke build-root at beginning of %%install
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.16-15
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user