--- /dev/null
+/*
+* config.h Automatically generated configuration includefile
+*
+* NET-TOOLS A collection of programs that form the base set of the
+* NET-3 Networking Distribution for the LINUX operating
+* system.
+*
+* DO NOT EDIT DIRECTLY
+*
+*/
+
+/*
+ *
+ * Internationalization
+ *
+ * The net-tools package has currently been translated to French,
+ * German and Brazilian Portugese. Other translations are, of
+ * course, welcome. Answer `n' here if you have no support for
+ * internationalization on your system.
+ *
+ */
+#define I18N 1
+
+/*
+ *
+ * Protocol Families.
+ *
+ */
+#define HAVE_AFUNIX 1
+#define HAVE_AFINET 1
+#define HAVE_AFINET6 1
+#define HAVE_AFIPX 1
+#define HAVE_AFATALK 1
+#define HAVE_AFAX25 1
+#define HAVE_AFNETROM 1
+#define HAVE_AFROSE 1
+#define HAVE_AFX25 1
+#define HAVE_AFECONET 1
+#define HAVE_AFDECnet 0
+#define HAVE_AFASH 1
+#define HAVE_AFBLUETOOTH 0
+
+/*
+ *
+ * Device Hardware types.
+ *
+ */
+#define HAVE_HWETHER 1
+#define HAVE_HWARC 1
+#define HAVE_HWSLIP 1
+#define HAVE_HWPPP 1
+#define HAVE_HWTUNNEL 1
+#define HAVE_HWSTRIP 0
+#define HAVE_HWTR 0
+#define HAVE_HWAX25 1
+#define HAVE_HWROSE 1
+#define HAVE_HWNETROM 1
+#define HAVE_HWX25 1
+#define HAVE_HWFR 1
+#define HAVE_HWSIT 1
+#define HAVE_HWFDDI 1
+#define HAVE_HWHIPPI 1
+#define HAVE_HWASH 1
+#define HAVE_HWHDLCLAPB 1
+#define HAVE_HWIRDA 1
+#define HAVE_HWEC 1
+#define HAVE_HWEUI64 1
+#define HAVE_HWIB 1
+
+/*
+ *
+ * Other Features.
+ *
+ */
+#define HAVE_FW_MASQUERADE 1
+#define HAVE_IP_TOOLS 1
+#define HAVE_MII 1
+#define HAVE_SELINUX 0
--- /dev/null
+Summary: Basic networking tools
+Name: net-tools
+Version: 2.0_20121208git
+Release: 0
+License: GPLv2+
+Group: System/Base
+URL: http://sourceforge.net/projects/net-tools/
+
+# git archive --format=tar --remote=git://net-tools.git.sourceforge.net/gitroot/net-tools/net-tools master | xz > net-tools-%%{version}.%%{checkout}.tar.xz
+Source0: net-tools-%{version}.tar.xz
+Source1: net-tools-config.h
+Source2: net-tools-config.make
+
+%description
+The net-tools package contains basic networking tools,
+including ifconfig, netstat, route, and others.
+Most of them are obsolete. For replacement check iproute package.
+
+%prep
+%setup -q
+
+cp %SOURCE1 ./config.h
+cp %SOURCE2 ./config.make
+
+%build
+export CFLAGS="$RPM_OPT_FLAGS $CFLAGS -fpie"
+export LDFLAGS="$LDFLAGS -pie -Wl,-z,relro -Wl,-z,now"
+
+make
+
+%install
+make BASEDIR=%{buildroot} mandir=%{_mandir} install
+
+mkdir -p %{buildroot}/usr/sbin
+mv %{buildroot}/bin/ifconfig %{buildroot}/usr/sbin
+mv %{buildroot}/bin/route %{buildroot}/usr/sbin
+
+
+rm %{buildroot}/sbin/rarp
+
+# remove hostname (has its own package)
+rm %{buildroot}/bin/dnsdomainname
+rm %{buildroot}/bin/domainname
+rm %{buildroot}/bin/hostname
+rm %{buildroot}/bin/nisdomainname
+rm %{buildroot}/bin/ypdomainname
+
+%docs_package
+
+
+%files
+%license COPYING
+/bin/netstat
+/usr/sbin/ifconfig
+/usr/sbin/route
+/sbin/arp
+/sbin/ipmaddr
+/sbin/iptunnel
+/sbin/nameif
+/sbin/plipconfig
+/sbin/slattach
+/sbin/mii-tool