Name:         libnsl2
Version:      1.2.0
Release:      2%{?_dist_release}
Summary:      Public client interface library for NIS(YP) and NIS+
Group:        System Environment/Libraries

Vendor:       Project Vine
Distribution: Vine Linux

License:      BSD and LGPLv2+
URL:          https://github.com/thkukuk/libnsl
Source0:      https://github.com/thkukuk/libnsl/archive/v%{version}.tar.gz#/libnsl-%{version}.tar.gz

Patch1:       0001-Don-t-include-ltmain.sh-since-this-would-require-the.patch
Patch2:       0002-Remove-outdated-download-url-issue-4.patch
Patch3:       0003-Detect-recursive-lock-between-yp_all-and-do_ypcall.patch
Patch4:       0004-Detect-recursive-NIS-calls.patch

Patch100:     libnsl2-1.0.5-include_stdint.patch

BuildRequires: autoconf, automake, gettext-devel, libtool, libtirpc-devel

%description
This package contains the libnsl library. This library contains
the public client interface for NIS(YP) and NIS+.
This code was formerly part of glibc, but is now standalone to
be able to link against TI-RPC for IPv6 support.

%package devel
Summary: Development files for libnsl
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: glibc-devel >= 2.28

%description devel
Development files for libnsl2


%prep
%autosetup -n libnsl-%{version} -p1

%build
export CFLAGS="%{optflags}"
autoreconf -fiv
%configure\
    --libdir=%{_libdir}\
    --includedir=%{_includedir}

%make_build


%install
rm -rf %{buildroot}
%make_install

rm %{buildroot}/%{_libdir}/libnsl.a
rm %{buildroot}/%{_libdir}/libnsl.la

%files
%license COPYING
%{_libdir}/libnsl.so.2
%{_libdir}/libnsl.so.2.0.0

%files devel
%{_libdir}/libnsl.so
%{_includedir}/*
%{_libdir}/pkgconfig/libnsl.pc

%changelog
* Sat Mar 28 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.2.0-2
- rebuilt with current environment.

* Fri Jan 25 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.2.0-1
- initial build for Vine Linux.

