2015-06-10 14:52:50 +02:00
|
|
|
#
|
|
|
|
# spec file for package hostname
|
|
|
|
#
|
2020-09-08 10:48:02 +02:00
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2015-06-10 14:52:50 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2018-10-25 19:47:36 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2015-06-10 14:52:50 +02:00
|
|
|
#
|
|
|
|
|
2015-09-09 10:11:18 +02:00
|
|
|
|
2015-06-10 14:52:50 +02:00
|
|
|
Name: hostname
|
2020-09-08 10:48:02 +02:00
|
|
|
Version: 3.23
|
2015-06-10 14:52:50 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: Utility to Set/Show the Host Name or Domain Name
|
2018-04-01 06:26:07 +02:00
|
|
|
License: GPL-2.0-or-later
|
2015-06-10 14:52:50 +02:00
|
|
|
Group: Productivity/Networking/Other
|
2020-09-08 10:48:02 +02:00
|
|
|
URL: https://tracker.debian.org/pkg/hostname
|
2020-05-14 23:24:24 +02:00
|
|
|
Source0: http://http.debian.net/debian/pool/main/h/%{name}/%{name}_%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
|
|
|
Source1: nis-domainname
|
|
|
|
Source2: nis-domainname.service.in
|
|
|
|
BuildRequires: gcc
|
|
|
|
BuildRequires: systemd-rpm-macros
|
2015-06-11 09:33:59 +02:00
|
|
|
# net-tools requires hostname, but we know we do not rely on ourselves to build
|
|
|
|
#!BuildIgnore: hostname
|
2015-06-10 14:52:50 +02:00
|
|
|
|
|
|
|
%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
|
2018-02-21 10:44:50 +01:00
|
|
|
%setup -q -n %{name}
|
2020-05-14 23:24:24 +02:00
|
|
|
cp %{SOURCE1} %{SOURCE2} .
|
2015-06-10 14:52:50 +02:00
|
|
|
|
|
|
|
%build
|
2018-02-21 10:44:50 +01:00
|
|
|
make %{?_smp_mflags} CFLAGS="%{optflags} -D_GNU_SOURCE"
|
2015-06-10 14:52:50 +02:00
|
|
|
|
|
|
|
%install
|
2015-09-09 10:11:18 +02:00
|
|
|
install -D -p -m 755 %{name} %{buildroot}%{_bindir}/%{name}
|
2015-06-10 14:52:50 +02:00
|
|
|
install -d -m 755 %{buildroot}/bin/
|
2015-09-09 10:11:18 +02:00
|
|
|
ln -sf %{_bindir}/%{name} %{buildroot}/bin/%{name}
|
|
|
|
install -D -p -m 644 %{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
|
2016-04-04 13:47:46 +02:00
|
|
|
for prog in dnsdomainname domainname ypdomainname nisdomainname; do
|
2015-09-09 10:11:18 +02:00
|
|
|
ln -sf %{_bindir}/%{name} %{buildroot}/bin/$prog
|
|
|
|
ln -sf %{_bindir}/%{name} %{buildroot}%{_bindir}/$prog
|
2015-06-10 14:52:50 +02:00
|
|
|
ln -sf hostname.1 %{buildroot}%{_mandir}/man1/${prog}.1
|
|
|
|
done
|
2020-05-19 15:09:41 +02:00
|
|
|
sed -e "s|@LIBEXECDIR@|%{_libexecdir}|g" nis-domainname.service.in > nis-domainname.service
|
2020-05-14 23:24:24 +02:00
|
|
|
install -m 0755 -d %{buildroot}%{_libexecdir}/%{name}
|
|
|
|
install -m 0755 -d %{buildroot}%{_unitdir}
|
|
|
|
install -p -m 0755 nis-domainname %{buildroot}%{_libexecdir}/%{name}
|
|
|
|
install -p -m 0644 nis-domainname.service %{buildroot}%{_unitdir}
|
|
|
|
|
|
|
|
%post
|
|
|
|
%systemd_post nis-domainname.service
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%systemd_preun nis-domainname.service
|
2015-06-10 14:52:50 +02:00
|
|
|
|
|
|
|
%files
|
2018-04-01 06:26:07 +02:00
|
|
|
%license COPYRIGHT
|
|
|
|
%doc debian/changelog
|
2015-09-09 10:11:18 +02:00
|
|
|
/bin/%{name}
|
2015-06-10 14:52:50 +02:00
|
|
|
/bin/domainname
|
|
|
|
/bin/dnsdomainname
|
2016-04-04 13:47:46 +02:00
|
|
|
/bin/nisdomainname
|
|
|
|
/bin/ypdomainname
|
2015-09-09 10:11:18 +02:00
|
|
|
%{_bindir}/%{name}
|
2015-06-10 14:52:50 +02:00
|
|
|
%{_bindir}/domainname
|
|
|
|
%{_bindir}/dnsdomainname
|
2016-04-04 13:47:46 +02:00
|
|
|
%{_bindir}/nisdomainname
|
|
|
|
%{_bindir}/ypdomainname
|
2015-09-09 10:11:18 +02:00
|
|
|
%{_mandir}/man1/%{name}.1%{ext_man}
|
|
|
|
%{_mandir}/man1/domainname.1%{ext_man}
|
|
|
|
%{_mandir}/man1/dnsdomainname.1%{ext_man}
|
2016-04-04 13:47:46 +02:00
|
|
|
%{_mandir}/man1/nisdomainname.1%{ext_man}
|
|
|
|
%{_mandir}/man1/ypdomainname.1%{ext_man}
|
2020-05-14 23:24:24 +02:00
|
|
|
%{_unitdir}/nis-domainname.service
|
|
|
|
%{_libexecdir}/%{name}/
|
2015-09-09 10:11:18 +02:00
|
|
|
|
|
|
|
%changelog
|