libnet: move to new upstream
authorRosen Penev <rosenp@gmail.com>
Sun, 18 Aug 2024 04:10:29 +0000 (21:10 -0700)
committerRosen Penev <rosenp@gmail.com>
Sun, 18 Aug 2024 17:55:39 +0000 (10:55 -0700)
SourceForge is 10 years old.

Allows removal of various old hacks.

Updated InstallDev with new stuff.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
libs/libnet-1.2.x/Makefile
libs/libnet-1.2.x/patches/100-musl-compat.patch [deleted file]

index 2215a3e40ea001cad55bd017e271bf79b82bb231..7318d5ee2ddfae7f3ebc870bd3a3d86e7169e920 100644 (file)
@@ -8,23 +8,22 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libnet
-PKG_VERSION:=1.2-rc3
-PKG_RELEASE:=4
+PKG_VERSION:=1.3
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=@SF/libnet-dev
-PKG_HASH:=72c380785ad44183005e654b47cc12485ee0228d7fa6b0a87109ff7614be4a63
+PKG_SOURCE_URL:=https://github.com/libnet/libnet/releases/download/v$(PKG_VERSION)
+PKG_HASH:=ad1e2dd9b500c58ee462acd839d0a0ea9a2b9248a1287840bc601e774fb6b28f
+
 PKG_MAINTAINER:=Mislav Novakovic <mislav.novakovic@sartura.hr>
 PKG_LICENSE:=GPL-2.0
 PKG_CPE_ID:=cpe:/a:libnet_project:libnet
 
-PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/package.mk
 
-TARGET_CFLAGS += $(FPIC)
-
 define Package/libnet-1.2.x
  SECTION:=libs
  CATEGORY:=Libraries
@@ -32,40 +31,31 @@ define Package/libnet-1.2.x
  TITLE:=Low-level packet creation library
 endef
 
-
 CONFIGURE_ARGS += \
        --enable-shared \
-       --enable-static
-
-CONFIGURE_VARS += \
-       ac_cv_libnet_endianess=$(ENDIANESS) \
-       libnet_cv_have_packet_socket=yes \
-       LL_INT_TYPE=libnet_link_linux
-
-define Build/Configure
-       (cd $(PKG_BUILD_DIR); touch \
-       configure.in \
-       include.m4 \
-       aclocal.m4 \
-       Makefile.in \
-       );
-       $(call Build/Configure/Default)
-endef
-
+       --enable-static \
+       --with-pic
 
 define Build/InstallDev
+       $(INSTALL_DIR) $(STAGING_DIR)/usr/bin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/libnet-config $(STAGING_DIR)/usr/bin
+       $(INSTALL_DIR) $(2)/bin
+       $(LN) ../../usr/bin/libnet-config $(2)/bin/
+
        $(INSTALL_DIR) $(STAGING_DIR)/usr/include
        $(CP) $(PKG_INSTALL_DIR)/usr/include/libnet.h $(STAGING_DIR)/usr/include
 
-       $(INSTALL_DIR) $(STAGING_DIR)
-       $(CP) $(PKG_BUILD_DIR)/libnet-config $(STAGING_DIR)/usr
-       chmod a+x $(STAGING_DIR)/usr/libnet-config
+       $(INSTALL_DIR) $(STAGING_DIR)/usr/include/libnet
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/libnet/*.h $(STAGING_DIR)/usr/include/libnet
 
        $(INSTALL_DIR) $(STAGING_DIR)/usr/include/libnet
        $(CP) $(PKG_INSTALL_DIR)/usr/include/libnet/libnet-*.h $(STAGING_DIR)/usr/include/libnet
 
        $(INSTALL_DIR) $(STAGING_DIR)/usr/lib
        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libnet.{a,la,so*} $(STAGING_DIR)/usr/lib
+
+       $(INSTALL_DIR) $(STAGING_DIR)/usr/lib/pkgconfig
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libnet.pc $(STAGING_DIR)/usr/lib/pkgconfig
 endef
 
 define Package/libnet-1.2.x/install
diff --git a/libs/libnet-1.2.x/patches/100-musl-compat.patch b/libs/libnet-1.2.x/patches/100-musl-compat.patch
deleted file mode 100644 (file)
index b95366a..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/src/libnet_link_linux.c
-+++ b/src/libnet_link_linux.c
-@@ -30,13 +30,8 @@
- #include <sys/time.h>
- #include <net/if.h>
--#if (__GLIBC__)
- #include <netinet/if_ether.h>
- #include <net/if_arp.h>
--#else
--#include <linux/if_arp.h>
--#include <linux/if_ether.h>
--#endif
- #if (HAVE_PACKET_SOCKET)
- #ifndef SOL_PACKET