net-tools-vl.spec 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. %bcond_with systemd
  2. Summary: The basic tools for setting up networking.
  3. Summary(ja): ネットワークをセットアップするための基本的なツール
  4. Name: net-tools
  5. Version: 2.10
  6. Release: 1%{?_dist_release}%{?with_systemd:.systemd}
  7. Group: system,network,admin-tools
  8. Vendor: Project Vine
  9. Distribution: Vine Linux
  10. License: GPL
  11. URL: https://sourceforge.net/projects/net-tools/
  12. Source0: https://downloads.sourceforge.net/project/net-tools/net-tools-%{version}.tar.xz
  13. Source1: net-tools-config.h
  14. Source2: net-tools-config.make
  15. Source3: ether-wake.c
  16. Source4: ether-wake.8
  17. Source5: mii-diag.c
  18. Source6: mii-diag.8
  19. Source7: iptunnel.8
  20. Source8: ipmaddr.8
  21. Source9: arp-ethers.service
  22. # source for Vine
  23. Source100: net-tools-2.10-ja.po
  24. # adds <delay> option that allows netstat to cycle printing through statistics every delay seconds.
  25. Patch1: net-tools-cycle.patch
  26. # various man page fixes merged into one patch
  27. Patch2: net-tools-man.patch
  28. # linux-4.8
  29. Patch3: net-tools-linux48.patch
  30. # use all interfaces instead of default (#1003875)
  31. Patch20: ether-wake-interfaces.patch
  32. Patch24: net-tools-correct-exit-code.patch
  33. BuildRoot: %{_tmppath}/%{name}-root
  34. BuildRequires: bluez-libs-devel
  35. %if %{with systemd}
  36. %{?systemd_requires}
  37. %endif
  38. %description
  39. The net-tools package contains the basic tools needed for setting up
  40. networking: ethers, route and others.
  41. %description -l ja
  42. net-tools パッケージはネットワークをセットアップする基本的なツールを
  43. 含んでいます: イーサーネット, ルーティングやその他
  44. %debug_package
  45. %prep
  46. %setup -q
  47. %patch1 -p1 -b .cycle
  48. %patch2 -p1 -b .man
  49. #patch3 -p1 -b .linux48
  50. cp %SOURCE1 ./config.h
  51. cp %SOURCE2 ./config.make
  52. cp %SOURCE3 .
  53. cp %SOURCE4 ./man/en_US
  54. cp %SOURCE5 .
  55. cp %SOURCE6 ./man/en_US
  56. cp %SOURCE7 ./man/en_US
  57. cp %SOURCE8 ./man/en_US
  58. %patch20 -p1 -b .interfaces
  59. %patch24 -p1 -b .exit-codes
  60. touch ./config.h
  61. cp %SOURCE100 po/ja.po
  62. %build
  63. export CFLAGS="${RPM_OPT_FLAGS} -fpie"
  64. export LDFLAGS="${RPM_LD_FLAGS} -pie -Wl,-z,now"
  65. make
  66. make ether-wake
  67. gcc ${RPM_OPT_FLAGS} ${RPM_LD_FLAGS} -o mii-diag mii-diag.c
  68. %install
  69. rm -rf $RPM_BUILD_ROOT
  70. mv man/de_DE man/de
  71. mv man/fr_FR man/fr
  72. mv man/pt_BR man/pt
  73. make BASEDIR=%{buildroot} mandir=%{_mandir} install
  74. install -m 755 ether-wake %{buildroot}/sbin
  75. install -m 755 mii-diag %{buildroot}/sbin
  76. mv -f %{buildroot}/bin/{ifconfig,route} %{buildroot}/sbin/
  77. rm %{buildroot}/sbin/rarp
  78. rm %{buildroot}%{_mandir}/man8/rarp.8*
  79. rm %{buildroot}%{_mandir}/de*/man8/rarp.8*
  80. rm %{buildroot}%{_mandir}/fr*/man8/rarp.8*
  81. rm %{buildroot}%{_mandir}/pt*/man8/rarp.8*
  82. # otherwise %%find_lang finds them even they're empty
  83. rm -rf %{buildroot}%{_mandir}/de/man1
  84. rm -rf %{buildroot}%{_mandir}/fr/man1
  85. rm -rf %{buildroot}%{_mandir}/man1
  86. rm -rf %{buildroot}%{_mandir}/pt/man1
  87. rm -rf %{buildroot}%{_mandir}/pt/man5
  88. mkdir -p %{buildroot}%{_sysconfdir}
  89. touch %{buildroot}%{_sysconfdir}/ethers
  90. echo "# see man ethers for syntax" > %{buildroot}%{_sysconfdir}/ethers
  91. %if %{with systemd}
  92. # install systemd unit file
  93. install -D -p -m 644 %{SOURCE9} %{buildroot}%{_unitdir}/arp-ethers.service
  94. %endif
  95. %find_lang %{name}
  96. %clean
  97. rm -rf $RPM_BUILD_ROOT
  98. %if %{with systemd}
  99. %post
  100. %systemd_post arp-ethers.service
  101. %endif
  102. %files -f %{name}.lang
  103. %defattr(-,root,root)
  104. %license COPYING
  105. /bin/*
  106. /sbin/*
  107. %{_mandir}/man[58]/*
  108. %{_mandir}/de/man[58]/*
  109. %{_mandir}/fr/man[58]/*
  110. %{_mandir}/pt/man8/*
  111. %config(noreplace) %{_sysconfdir}/ethers
  112. %if %{with systemd}
  113. %attr(0644,root,root) %{_unitdir}/arp-ethers.service
  114. %endif
  115. %changelog
  116. * Thu Feb 18 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.10-1
  117. - new upstream release.
  118. - updated Source100 (ja.po).
  119. - dropped Patch100.
  120. - added systemd support (disabled as default).
  121. * Thu Nov 29 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.60-17
  122. - replace all patches from CentOS 6 (included previous patches).
  123. - added Patch99 to build with new kernel-headers.
  124. * Mon Jul 21 2014 Daisuke SUZUKI <daisuke@vinelinux.org> 1.60-16
  125. - update config.{h,make}
  126. - CONFIG_HWSTRIP=0, CONFIG_HWTR=0
  127. * Sat Aug 11 2012 Satoshi IWAMOTO <satoshi.iwamoto@nifty.ne.jp> 1.60-15vl6
  128. - add patch22, 65 to fix <BTS:1329>
  129. * Wed Apr 13 2011 Daisuke SUZUKI <daisuke@linux.or.jp> 1.60-14
  130. - rebuild for Vine 6
  131. * Wed Sep 10 2008 Shu KONNO <owa@bg.wakwak.com> 1.60-13vl5
  132. - applied new versioning policy, spec in utf-8
  133. - added net-tools-1.60-label.patch
  134. * Fri Aug 18 2006 KAZUKI SHIMURA <kazuki@ma.ccnw.ne.jp> 1.60-12vl2
  135. - add patches to build with current environment
  136. - x25_sr.patch (patch9)
  137. - gcc33.patch (patch10)
  138. - update ether-wake.c (source3)
  139. * Sat May 31 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.60-12vl1
  140. - update and replaced ja.po
  141. - sync with RedHat Rawhide 1.60-12
  142. - Fri Feb 07 2003 Phil Knirsch <pknirsch@redhat.com>
  143. - Fixed -s parameter.
  144. - Fix /proc statistics for -nic operation.
  145. - Fixed -i operation in general.
  146. - Tue Dec 17 2002 Phil Knirsch <pknirsch@redhat.com> 1.60-9
  147. - Copyright -> License.
  148. - Tue Aug 06 2002 Phil Knirsch <pknirsch@redhat.com>
  149. - Added patch from Norm for a corrected output.
  150. - Fri Apr 12 2002 Jeremy Katz <katzj@redhat.com>
  151. - fix nstrcmp() to be correct in the case where there are many devices
  152. of the same type, eg, "eth10" > "eth1" (#61436)
  153. - Tue Jul 31 2001 Bill Nottingham <notting@redhat.com>
  154. - do *not* use SIOCDEVPRIVATE for MII ioctls
  155. - Fri Jun 1 2001 Preston Brown <pbrown@redhat.com>
  156. - include wake-on-lan wakeup utility, ether-wake by Donald Becker
  157. * Sat May 12 2001 <sagami@vinelinux.org>
  158. - 1.60-4vl1: follow up with RH 1.60-1
  159. * Tue May 23 2000 Yasuyuki Furukawa <furukawa@vinelinux.org>
  160. - sync with RH 6.2
  161. * Tue Mar 7 2000 Jeff Johnson <jbj@redhat.com>
  162. - rebuild for sparc baud rates > 38400.
  163. * Wed Feb 02 2000 Cristian Gafton <gafton@redhat.com>
  164. - fix description
  165. * Fri Jan 14 2000 Jeff Johnson <jbj@redhat.com>
  166. - fix "netstat -ci" (#6904).
  167. - document more netstat options (#7429).
  168. * Thu Jan 13 2000 Jeff Johnson <jbj@redhat.com>
  169. - update to 1.54.
  170. - enable "everything but DECnet" including IPv6.
  171. * Mon Oct 11 1999 Norihito Ohmori <ohmori@flatout.org>
  172. - ported from net-tools-1.51 with Japanese catalog
  173. by Yasuyuki Furukawa
  174. * Sun Aug 29 1999 Jeff Johnson <jbj@redhat.com>
  175. - update to 1.53.
  176. * Wed Jul 28 1999 Jeff Johnson <jbj@redhat.com>
  177. - plug "netstat -c" fd leak (#3620).
  178. * Thu Jun 17 1999 Jeff Johnson <jbj@redhat.com>
  179. - plug potential buffer overruns.
  180. * Sat Jun 12 1999 John Hardin <jhardin@wolfenet.com>
  181. - patch to recognize ESP and GRE protocols for VPN masquerade
  182. * Fri Apr 23 1999 Jeff Johnson <jbj@redhat.com>
  183. - update to 1.52.
  184. * Thu Mar 25 1999 Jeff Johnson <jbj@redhat.com>
  185. - update interface statistics continuously (#1323)
  186. * Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
  187. - auto rebuild in the new build environment (release 2)
  188. * Fri Mar 19 1999 Jeff Johnson <jbj@redhat.com>
  189. - update to 1.51.
  190. - strip binaries.
  191. * Tue Feb 2 1999 Jeff Johnson <jbj@redhat.com>
  192. - update to 1.50.
  193. - added slattach/plipconfig/ipmaddr/iptunnel commands.
  194. - enabled translated man pages.
  195. * Tue Dec 15 1998 Jakub Jelinek <jj@ultra.linux.cz>
  196. - update to 1.49.
  197. * Sat Dec 5 1998 Jeff Johnson <jbj@redhat.com>
  198. - update to 1.48.
  199. * Thu Nov 12 1998 Jeff Johnson <jbj@redhat.com>
  200. - update to 1.47.
  201. * Wed Sep 2 1998 Jeff Johnson <jbj@redhat.com>
  202. - update to 1.46
  203. * Thu Jul 9 1998 Jeff Johnson <jbj@redhat.com>
  204. - build root
  205. - include ethers.5
  206. * Thu Jun 11 1998 Aron Griffis <agriffis@coat.com>
  207. - upgraded to 1.45
  208. - patched hostname.c to initialize buffer
  209. - patched ax25.c to use kernel headers
  210. * Fri May 01 1998 Prospector System <bugs@redhat.com>
  211. - translations modified for de, fr, tr
  212. * Fri Feb 27 1998 Jason Spangler <jasons@usemail.com>
  213. - added config patch
  214. * Fri Feb 27 1998 Jason Spangler <jasons@usemail.com>
  215. - changed to net-tools 1.432
  216. - removed old glibc 2.1 patch
  217. * Wed Oct 22 1997 Erik Troan <ewt@redhat.com>
  218. - added extra patches for glibc 2.1
  219. * Tue Oct 21 1997 Erik Troan <ewt@redhat.com>
  220. - included complete set of network protocols (some were removed for
  221. initial glibc work)
  222. * Wed Sep 03 1997 Erik Troan <ewt@redhat.com>
  223. - updated glibc patch for glibc 2.0.5
  224. * Thu Jun 19 1997 Erik Troan <ewt@redhat.com>
  225. - built against glibc
  226. - updated to 1.33