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
|
Summary: C library for parsing command line parameters
|
||||||
Name: popt
|
Name: popt
|
||||||
Version: 1.16
|
Version: 1.16
|
||||||
Release: 15%{?dist}
|
Release: 16%{?dist}
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
URL: http://www.rpm5.org/
|
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.
|
Install it if you need to link statically with libpopt.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%autosetup
|
||||||
%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
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if 0%{?fedora} < 17 && 0%{?rhel} < 7
|
|
||||||
%configure --libdir=/%{_lib}
|
|
||||||
%else
|
|
||||||
%configure
|
%configure
|
||||||
%endif
|
%make_build
|
||||||
make %{?_smp_mflags}
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf $RPM_BUILD_ROOT
|
%make_install
|
||||||
make DESTDIR=$RPM_BUILD_ROOT 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
|
rm -f $RPM_BUILD_ROOT/%{_libdir}/libpopt.la
|
||||||
%endif
|
|
||||||
|
|
||||||
# Multiple popt configurations are possible
|
# Multiple popt configurations are possible
|
||||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/popt.d
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/popt.d
|
||||||
@ -91,11 +69,7 @@ make check
|
|||||||
%license COPYING
|
%license COPYING
|
||||||
%doc CHANGES
|
%doc CHANGES
|
||||||
%{_sysconfdir}/popt.d
|
%{_sysconfdir}/popt.d
|
||||||
%if 0%{?fedora} < 17 && 0%{?rhel} < 7
|
|
||||||
/%{_lib}/libpopt.so.*
|
|
||||||
%else
|
|
||||||
%{_libdir}/libpopt.so.*
|
%{_libdir}/libpopt.so.*
|
||||||
%endif
|
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%doc README
|
%doc README
|
||||||
@ -108,6 +82,11 @@ make check
|
|||||||
%{_libdir}/libpopt.a
|
%{_libdir}/libpopt.a
|
||||||
|
|
||||||
%changelog
|
%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
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.16-15
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user