Explorar el Código

arptables: rename package to arptables-legacy

This prepare the introduction of arptables-nft.
Add PROVIDES so dependencies are not broken,
use ALTERNATIVES.

Signed-off-by: Etienne Champetier <[email protected]>
Etienne Champetier hace 3 años
padre
commit
2f5088ef5f
Se han modificado 1 ficheros con 7 adiciones y 4 borrados
  1. 7 4
      package/network/utils/arptables/Makefile

+ 7 - 4
package/network/utils/arptables/Makefile

@@ -19,22 +19,25 @@ PKG_LICENSE:=GPL-2.0
 
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/package.mk
 
 
-define Package/arptables
+define Package/arptables-legacy
   SECTION:=net
   SECTION:=net
   CATEGORY:=Network
   CATEGORY:=Network
   SUBMENU:=Firewall
   SUBMENU:=Firewall
   TITLE:=ARP firewalling software
   TITLE:=ARP firewalling software
   DEPENDS:=+kmod-arptables
   DEPENDS:=+kmod-arptables
   URL:=https://git.netfilter.org/arptables/
   URL:=https://git.netfilter.org/arptables/
+  PROVIDES:=arptables
+  ALTERNATIVES:=\
+    200:/usr/sbin/arptables:/usr/sbin/arptables-legacy
 endef
 endef
 
 
 MAKE_FLAGS += \
 MAKE_FLAGS += \
 	COPT_FLAGS="$(TARGET_CFLAGS) -D__OPTIMIZE__=1" \
 	COPT_FLAGS="$(TARGET_CFLAGS) -D__OPTIMIZE__=1" \
 	KERNEL_DIR="$(LINUX_DIR)"
 	KERNEL_DIR="$(LINUX_DIR)"
 
 
-define Package/arptables/install
+define Package/arptables-legacy/install
 	$(INSTALL_DIR) $(1)/usr/sbin
 	$(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
 endef
 
 
-$(eval $(call BuildPackage,arptables))
+$(eval $(call BuildPackage,arptables-legacy))