distribution/packages/network/iptables/package.mk

46 lines
1.2 KiB
Makefile
Raw Normal View History

2022-02-05 14:23:32 +00:00
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2018 Team LibreELEC (https://libreelec.tv)
# Copyright (C) 2018-present Team CoreELEC (https://coreelec.org)
2022-02-05 14:23:32 +00:00
PKG_NAME="iptables"
PKG_LICENSE="GPL"
PKG_SITE="http://www.netfilter.org/"
PKG_DEPENDS_TARGET="toolchain linux libmnl libnftnl"
2022-02-05 14:23:32 +00:00
PKG_LONGDESC="IP packet filter administration."
PKG_TOOLCHAIN="autotools"
2022-11-02 22:15:36 +00:00
case ${DEVICE} in
RK356*)
2023-02-13 22:43:44 +00:00
PKG_VERSION="1.8.3"
2023-11-13 11:49:14 +00:00
PKG_EXTENSION="bz2"
2023-02-13 22:43:44 +00:00
PKG_PATCH_DIRS+="4.x"
PKG_CONFIGURE_OPTS_TARGET="--with-kernel=$(kernel_path)
CPPFLAGS=-I${SYSROOT_PREFIX}/usr/include"
;;
2022-11-02 22:15:36 +00:00
*)
2023-11-13 11:49:14 +00:00
PKG_VERSION="1.8.9"
PKG_EXTENSION="xz"
2022-11-02 22:15:36 +00:00
PKG_PATCH_DIRS+="5.x"
;;
esac
2022-07-05 00:43:17 +00:00
2023-11-13 11:49:14 +00:00
PKG_URL="https://www.netfilter.org/projects/iptables/files/${PKG_NAME}-${PKG_VERSION}.tar.${PKG_EXTENSION}"
2022-02-05 14:23:32 +00:00
post_makeinstall_target() {
mkdir -p ${INSTALL}/usr/config/iptables/
cp -PR ${PKG_DIR}/config/README ${INSTALL}/usr/config/iptables/
2022-02-05 14:23:32 +00:00
mkdir -p ${INSTALL}/etc/iptables/
cp -PR ${PKG_DIR}/config/* ${INSTALL}/etc/iptables/
2022-02-05 14:23:32 +00:00
mkdir -p ${INSTALL}/usr/lib/coreelec
cp ${PKG_DIR}/scripts/iptables_helper ${INSTALL}/usr/lib/coreelec
2022-02-05 14:23:32 +00:00
}
post_install() {
enable_service iptables.service
}