diff --git a/libnsl.spec b/libnsl.spec index 03caef0..d3b6d84 100644 --- a/libnsl.spec +++ b/libnsl.spec @@ -16,23 +16,23 @@ # +%define debug_package_requires libnsl1 = %{version}-%{release} Name: libnsl Version: 1.1.0 Release: 0 Summary: Network Support Library (NIS/NIS+) License: LGPL-2.1 Group: System/Libraries -BuildRequires: autoconf -BuildRequires: libtool -BuildRequires: pkg-config -%if 0%{?suse_version} >= 1310 -BuildRequires: libtirpc-devel >= 1.0 -%endif Url: http://github.com/thkukuk/libnsl Source: %{name}-%{version}.tar.bz2 Source1: baselibs.conf +BuildRequires: autoconf +BuildRequires: libtool +BuildRequires: pkg-config BuildRoot: %{_tmppath}/%{name}-%{version}-build -%define debug_package_requires libnsl1 = %{version}-%{release} +%if 0%{?suse_version} >= 1310 +BuildRequires: libtirpc-devel >= 1.0 +%endif %description The Network Support Library for NIS/NIS+ was formerly part of glibc and @@ -50,7 +50,6 @@ is now a standalone library. The big difference is, that this library has support for IPv6. The NIS+ code is deprecated and only there "as is". - %package devel Summary: Development package for Network Support Library (NIS/NIS+) Group: Development/Libraries/C and C++ @@ -63,31 +62,29 @@ has support for IPv6. This package contains all files to develop and link against libnsl. The NIS+ API is deprecated and only there "as is". - %prep %setup -q %build %configure --libdir=/%{_libdir}/nsl --includedir=%{_includedir}/nsl -%{__make} %{?_smp_mflags} +make %{?_smp_mflags} %install # Don't strip .symtab to allow debugging export STRIP_KEEP_SYMTAB=libnsl*.so* # NO_BRP_CHECK_ROOTFS is for SLES11 only, but does not harm for Factory export NO_BRP_CHECK_ROOTFS=true -make install DESTDIR=$RPM_BUILD_ROOT - %{__mv} -v $RPM_BUILD_ROOT/%{_libdir}/nsl/%{name}.so.2* $RPM_BUILD_ROOT%{_libdir}/ +make %{?_smp_mflags} DESTDIR=%{buildroot} install + mv -v %{buildroot}/%{_libdir}/nsl/%{name}.so.2* %{buildroot}%{_libdir}/ # Adjust devel so link -%{__rm} -v %{buildroot}/%{_libdir}/nsl/%{name}.{a,la,so} -%{__ln_s} -v %{_lib}/%{name}.so.2 %{buildroot}%{_libdir}/nsl/%{name}.so -%{__mv} -v $RPM_BUILD_ROOT/%{_libdir}/nsl/pkgconfig $RPM_BUILD_ROOT/%{_libdir} +rm -v %{buildroot}/%{_libdir}/nsl/%{name}.{a,la,so} +ln -s -v %{_lib}/%{name}.so.2 %{buildroot}%{_libdir}/nsl/%{name}.so +mv -v %{buildroot}/%{_libdir}/nsl/pkgconfig %{buildroot}/%{_libdir} %check -make check +make %{?_smp_mflags} check %post -n libnsl2 -p /sbin/ldconfig - %postun -n libnsl2 -p /sbin/ldconfig %files -n libnsl2