net-tools/net-tools.spec

157 lines
4.2 KiB
RPMSpec
Raw Normal View History

2019-09-30 11:09:40 -04:00
Name: net-tools
2021-12-07 19:59:39 +08:00
Version: 2.10
Release: 5
2019-09-30 11:09:40 -04:00
Summary: Important Programs for Networking
License: GPLv2+
URL: https://sourceforge.net/projects/net-tools/
2021-12-07 19:59:39 +08:00
source0: https://sourceforge.net/projects/net-tools/files/%{name}-%{version}.tar.xz
2019-09-30 11:09:40 -04:00
Source1: net-tools-config.h
Source2: net-tools-config.make
Source3: ether-wake.c
Source4: ether-wake.8
Source5: mii-diag.c
Source6: mii-diag.8
Source7: iptunnel.8
Source8: ipmaddr.8
Source9: arp-ethers.service
2021-12-07 19:59:39 +08:00
Patch1: backport-net-tools-cycle.patch
Patch2: backport-net-tools-man.patch
Patch3: backport-ether-wake-interfaces.patch
Patch4: backport-interface-change-pointopoint-short-flag-from-P-to-p.patch
Patch5: fix-ifconfig-display-error-when-the-length-of-interface-name-is-15.patch
Patch6: backport-Revert-sscanf-pattern-is-Lu-not-llu-for-long-long-unsigned.patch
2019-09-30 11:09:40 -04:00
BuildRequires: bluez-libs-devel gettext, libselinux libselinux-devel systemd gcc
%{?systemd_requires}
%description
This package contains programs for network administration and maintenance.
Most of the utilities formerly contained in this package (netstat, arp,
ifconfig, rarp, route) are obsoleted by the tools from iproute2 package (ip, ss)
and have been moved to net-tools-deprecated.
%package_help
%prep
2021-12-07 19:59:39 +08:00
%setup -q
2019-09-30 11:09:40 -04:00
cp %SOURCE1 ./config.h
cp %SOURCE2 ./config.make
cp %SOURCE3 .
cp %SOURCE4 ./man/en_US
cp %SOURCE5 .
cp %SOURCE6 ./man/en_US
cp %SOURCE7 ./man/en_US
cp %SOURCE8 ./man/en_US
%patch1 -p1 -b .cycle
%patch2 -p1 -b .man
2021-12-07 19:59:39 +08:00
%patch3 -p1 -b .interfaces
%patch4 -p1
%patch5 -p1
%patch6 -p1
2019-09-30 11:09:40 -04:00
touch ./config.h
%build
export CFLAGS="${RPM_OPT_FLAGS} -fpie"
export LDFLAGS="${RPM_LD_FLAGS} -pie -Wl,-z,now"
make
make ether-wake
%{__cc} ${RPM_OPT_FLAGS} ${RPM_LD_FLAGS} -o mii-diag mii-diag.c
2019-09-30 11:09:40 -04:00
%install
mv man/de_DE man/de
mv man/fr_FR man/fr
mv man/pt_BR man/pt
make BASEDIR=%{buildroot} BINDIR=%{_bindir} SBINDIR=%{_sbindir} install
cp %{buildroot}%{_bindir}/ifconfig %{buildroot}%{_sbindir}
rm -f %{buildroot}%{_bindir}/ifconfig
cp %{buildroot}%{_bindir}/route %{buildroot}%{_sbindir}
rm -f %{buildroot}%{_bindir}/route
cp -p ether-wake %{buildroot}%{_sbindir}
chmod 755 %{buildroot}%{_sbindir}/ether-wake
cp -p mii-diag %{buildroot}%{_sbindir}
chmod 755 %{buildroot}%{_sbindir}/mii-diag
mkdir -p %{buildroot}%{_unitdir}
cp %{SOURCE9} %{buildroot}%{_unitdir}
chmod 644 %{buildroot}%{_unitdir}/arp-ethers.service
touch %{buildroot}%{_unitdir}/arp-ethers.service
%post
%systemd_post arp-ethers.service
%files
%defattr(-,root,root)
%license COPYING
%{_bindir}/netstat
%{_prefix}/lib/systemd/system/arp-ethers.service
%{_sbindir}/*
%{_datadir}/locale/*
%exclude %{_sbindir}/rarp
%files help
%defattr(-,root,root)
%{_mandir}/de/man5/*.gz
%{_mandir}/de/man8/*.gz
%{_mandir}/fr/man5/*.gz
%{_mandir}/fr/man8/*.gz
%{_mandir}/man5/ethers.5.gz
%{_mandir}/man8/*.gz
%{_mandir}/pt/man8/*.gz
%exclude %{_mandir}/man8/rarp.8*
%exclude %{_mandir}/de/man8/rarp.8*
%exclude %{_mandir}/fr/man8/rarp.8*
%exclude %{_mandir}/pt/man8/rarp.8*
%exclude %{_mandir}/de/man1
%exclude %{_mandir}/fr/man1
%exclude %{_mandir}/man1
%exclude %{_mandir}/pt/man1
%exclude %{_mandir}/pt/man5
%changelog
* Tue Apr 08 2025 gaihuiying <eaglegai@163.com> - 2.10-5
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:backport to use llu instead of Lu for unsigned long long type
* Thu Feb 22 2024 luofng <luofeng13@huawei.com> - 2.10-4
- Type: enhencement
- CVE:NA
- SUG:NA
- DESC:support for building with clang
* Mon Dec 19 2022 eaglegai <eaglegai@163.com> - 2.10-3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix ifconfig display error when the length of interface name is 15
* Thu Oct 20 2022 konglidong <konglidong@uniontech.com> - 2.10-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:interface: change pointopoint short flag from P to p
2021-12-07 19:59:39 +08:00
* Tue Dec 07 2021 gaihuiying<gaihuiying1@huawei.com> - 2.10-1
- Type:requirement
- ID:NA
- SUG:NA
- DESC:update net-tools to 2.10
* Wed Sep 2 2020 zengwefeng<zwfeng@huawei.com> - 2.0-0.55
2020-09-02 19:49:17 +08:00
- Type:NA
- ID:NA
- SUG:NA
- DESC:add yaml file
2019-12-31 20:08:06 +08:00
* Tue Dec 31 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.0-0.54
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:optimization the spec
2019-09-30 11:09:40 -04:00
* Wed Sep 11 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.0-0.53
- Package init