hostname/hostname.spec
Andreas Stieger 4b826dfe8b Accepting request 311546 from home:dimstar:Factory
- BuildIgnore hostname (ourselves): net-tools has a dependency on
  hostname, and net-tools is part of the VMInstall package set. As
  we know we do not rely on our own code to build, we can safely
  ignore hostname and break that nasty buildcycle.

OBS-URL: https://build.opensuse.org/request/show/311546
OBS-URL: https://build.opensuse.org/package/show/network:utilities/hostname?expand=0&rev=2
2015-06-11 07:33:59 +00:00

64 lines
2.2 KiB
RPMSpec

#
# spec file for package hostname
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: hostname
Version: 3.15
Release: 0
License: GPL-2.0+
Summary: Utility to Set/Show the Host Name or Domain Name
Url: https://tracker.debian.org/pkg/hostname
Group: Productivity/Networking/Other
Source: http://http.debian.net/debian/pool/main/h/hostname/%{name}_%{version}.tar.gz
# net-tools requires hostname, but we know we do not rely on ourselves to build
#!BuildIgnore: hostname
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%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 %{name}
%build
make %{?_smp_mflags}
%install
install -D -p -m 755 hostname %{buildroot}%{_bindir}/hostname
install -d -m 755 %{buildroot}/bin/
ln -sf %{_bindir}/hostname %{buildroot}/bin/hostname
install -D -p -m 644 hostname.1 %{buildroot}%{_mandir}/man1/hostname.1
# do not install ypdomainname and nisdomainname which are provided by yp-tools
for prog in dnsdomainname domainname; do
ln -sf %{_bindir}/hostname %{buildroot}/bin/$prog
ln -sf %{_bindir}/hostname %{buildroot}%{_bindir}/$prog
ln -sf hostname.1 %{buildroot}%{_mandir}/man1/${prog}.1
done
%files
%defattr(-,root,root)
%doc COPYRIGHT
/bin/hostname
/bin/domainname
/bin/dnsdomainname
%{_bindir}/hostname
%{_bindir}/domainname
%{_bindir}/dnsdomainname
%{_mandir}/man1/hostname.1*
%{_mandir}/man1/domainname.1*
%{_mandir}/man1/dnsdomainname.1*