File mirhost.spec of Package mirhost
# norootforbuild
Name: mirhost
Version: 20110419
Release: 1
Summary: Traditional utility for querying DNS servers
# ISC (strlfun.c), MirBSD (strlfun.c, host.c), BSD (host)
License: BSD-Source-Code AND MirOS AND ISC
Group: System
URL: http://cvs.mirbsd.de/src/usr.bin/host/
Source0: https://www.freewrt.org/~tg/debs/dists/sid/wtf/Pkgs/host/mirhost_%{version}.tar.gz
Source1: https://www.mirbsd.org/MirOS/dist/mir/OTHER/strlfun.c.1.2
BuildRequires: gcc glibc-devel patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
'host' is a utility, similar to 'nslookup' (deprecated) or
'dig', used to query DNS servers for domain names and zones.
This package provides the traditional version of 'host', as
delivered with the BSD operating systems. BIND9 provides a
similar utility, in 'bind9-host'. The 'host' package also
provides an implementation of this utility. This 'mirhost'
implementation uses the traditional output format expected
by many shell scripts but lacks some more modern functions,
such as "host 2001:db8::1" (although the form "host -t ptr
1.0.0...8.b.d.1.0.0.2.ip6.arpa." is supported).
%prep
%setup -T -b 0
(cd src && patch -lp0) <debian/diffs/manpage-rename.diff
cp "%{SOURCE1}" strlfun.c
%build
CC="%__cc"
CFLAGS="%{?mageia:-g }%{optflags}"
export CC CFLAGS
make -f strlfun.c
cd src
$CC $CFLAGS -c host.c
$CC $CFLAGS -o host host.o -L.. -lstrlfun -lresolv
cd ..
%install
%__install -d -m0755 "%{buildroot}%{_bindir}"
%__install -d -m0755 "%{buildroot}%{_mandir}"/man1
%__install -c -m0755 src/host "%{buildroot}%{_bindir}/%{name}"
%__install -c -p -m0644 src/host.1 "%{buildroot}%{_mandir}/man1/%{name}.1"
%files
%defattr(-,root,root,-)
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1*
%changelog
* Tue Apr 19 2011 Thorsten Glaser <t.glaser@tarent.de> 20110419-1
- Update to fix AXFR max. size problem (Debian #477478)
* Mon Apr 18 2011 Thorsten Glaser <t.glaser@tarent.de> 20100608-1
- RPMify