71 lines
2.1 KiB
RPMSpec
71 lines
2.1 KiB
RPMSpec
|
Summary: Utility to set/show the host name or domain name
|
||
|
Name: hostname
|
||
|
Version: 3.01
|
||
|
Release: 1%{?dist}
|
||
|
License: GPLv2+
|
||
|
Group: System Environment/Base
|
||
|
URL: http://packages.qa.debian.org/h/hostname.html
|
||
|
Source0: http://ftp.de.debian.org/debian/pool/main/h/hostname/hostname_%{version}.tar.gz
|
||
|
Source1: hostname.1.pt
|
||
|
Source2: hostname.1.de
|
||
|
|
||
|
# Initial changes
|
||
|
Patch1: hostname-initial.patch
|
||
|
|
||
|
#net-tools < 1.60-100 includes hostname
|
||
|
Conflicts: net-tools < 1.60-100
|
||
|
|
||
|
%description
|
||
|
This package provides commands which can be used to display the system's
|
||
|
DNS name, and to display or set its hostname or NIS domain name.
|
||
|
|
||
|
%prep
|
||
|
%setup -q -n hostname
|
||
|
%patch1 -p1 -b .initial
|
||
|
|
||
|
#man pages conversion
|
||
|
#french
|
||
|
iconv -f iso-8859-1 -t utf-8 -o hostname.tmp hostname.1.fr && mv hostname.tmp hostname.1.fr
|
||
|
|
||
|
%build
|
||
|
export CFLAGS="$RPM_OPT_FLAGS $CFLAGS"
|
||
|
make
|
||
|
|
||
|
%install
|
||
|
make BASEDIR=%{buildroot} install
|
||
|
|
||
|
install -d %{buildroot}%{_mandir}/pt/man1
|
||
|
install -m 0644 %SOURCE1 %{buildroot}%{_mandir}/pt/man1/hostname.1
|
||
|
ln -fs hostname.1 %{buildroot}%{_mandir}/pt/man1/dnsdomainname.1
|
||
|
ln -fs hostname.1 %{buildroot}%{_mandir}/pt/man1/domainname.1
|
||
|
ln -fs hostname.1 %{buildroot}%{_mandir}/pt/man1/ypdomainname.1
|
||
|
ln -fs hostname.1 %{buildroot}%{_mandir}/pt/man1/nisdomainname.1
|
||
|
|
||
|
install -d %{buildroot}%{_mandir}/de/man1
|
||
|
install -m 0644 %SOURCE2 %{buildroot}%{_mandir}/de/man1/hostname.1
|
||
|
ln -fs hostname.1 %{buildroot}%{_mandir}/de/man1/dnsdomainname.1
|
||
|
ln -fs hostname.1 %{buildroot}%{_mandir}/de/man1/domainname.1
|
||
|
ln -fs hostname.1 %{buildroot}%{_mandir}/de/man1/ypdomainname.1
|
||
|
ln -fs hostname.1 %{buildroot}%{_mandir}/de/man1/nisdomainname.1
|
||
|
|
||
|
|
||
|
%clean
|
||
|
rm -rf %{buildroot}
|
||
|
|
||
|
%files
|
||
|
%defattr(-,root,root)
|
||
|
%doc COPYRIGHT
|
||
|
/bin/*
|
||
|
%{_mandir}/man1/*
|
||
|
%{_mandir}/fr/man1/*
|
||
|
%{_mandir}/pt/man1/*
|
||
|
%{_mandir}/de/man1/*
|
||
|
|
||
|
%changelog
|
||
|
|
||
|
* Tue Nov 10 2009 Jiri Popelka <jpopelka@redhat.com> - 3.01-1
|
||
|
- Initial package. Up to now hostname has been part of net-tools package.
|
||
|
- This package is based on Debian's hostname because Debian has had hostname
|
||
|
as separate package since 1997 and the code is much better then the old one
|
||
|
contained in net-tools.
|