arptables: rename package to arptables-legacy
authorEtienne Champetier <champetier.etienne@gmail.com>
Tue, 1 Mar 2022 03:37:41 +0000 (22:37 -0500)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 19 Mar 2022 15:13:58 +0000 (16:13 +0100)
This prepare the introduction of arptables-nft.
Add PROVIDES so dependencies are not broken,
use ALTERNATIVES.

Signed-off-by: Etienne Champetier <champetier.etienne@gmail.com>
package/network/utils/arptables/Makefile

index d1168ae68f01c6f22407a5cbff469bd210e99467..6f06c7037aefd3ed58fef1406bee0f54649f9175 100644 (file)
@@ -19,22 +19,25 @@ PKG_LICENSE:=GPL-2.0
 
 include $(INCLUDE_DIR)/package.mk
 
-define Package/arptables
+define Package/arptables-legacy
   SECTION:=net
   CATEGORY:=Network
   SUBMENU:=Firewall
   TITLE:=ARP firewalling software
   DEPENDS:=+kmod-arptables
   URL:=https://git.netfilter.org/arptables/
+  PROVIDES:=arptables
+  ALTERNATIVES:=\
+    200:/usr/sbin/arptables:/usr/sbin/arptables-legacy
 endef
 
 MAKE_FLAGS += \
        COPT_FLAGS="$(TARGET_CFLAGS) -D__OPTIMIZE__=1" \
        KERNEL_DIR="$(LINUX_DIR)"
 
-define Package/arptables/install
+define Package/arptables-legacy/install
        $(INSTALL_DIR) $(1)/usr/sbin
-       $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/arptables $(1)/usr/sbin/arptables-legacy
 endef
 
-$(eval $(call BuildPackage,arptables))
+$(eval $(call BuildPackage,arptables-legacy))