From ba3359722cbf8aa7b0ed39e1f81d1d74ec88fecd Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 30 May 2009 20:39:07 +0200 Subject: optimize ipkg package management - generate ipkg control file from PKG_* variables - automatically install init scripts from ./files/*.init set #PKG pkgname to set the binary package - rename FWINIT -> INIT - move postinst and conffiles meta data to ./files - update the packages to the latest upstream version - remove some unready or unused package (strongswan,..) more cleanups needed after allmodconfig --- package/shorewall-common/Makefile | 14 ++++----- .../files/shorewall-common.conffiles | 33 ++++++++++++++++++++++ .../files/shorewall-common.postinst | 6 ++++ .../shorewall-common/files/shorewall-common.prerm | 8 ++++++ package/shorewall-common/files/shorewall.init | 4 ++- .../ipkg/shorewall-common.conffiles | 33 ---------------------- .../shorewall-common/ipkg/shorewall-common.control | 5 ---- .../ipkg/shorewall-common.postinst | 6 ---- .../shorewall-common/ipkg/shorewall-common.prerm | 8 ------ 9 files changed, 57 insertions(+), 60 deletions(-) create mode 100644 package/shorewall-common/files/shorewall-common.conffiles create mode 100644 package/shorewall-common/files/shorewall-common.postinst create mode 100644 package/shorewall-common/files/shorewall-common.prerm delete mode 100644 package/shorewall-common/ipkg/shorewall-common.conffiles delete mode 100644 package/shorewall-common/ipkg/shorewall-common.control delete mode 100644 package/shorewall-common/ipkg/shorewall-common.postinst delete mode 100644 package/shorewall-common/ipkg/shorewall-common.prerm (limited to 'package/shorewall-common') diff --git a/package/shorewall-common/Makefile b/package/shorewall-common/Makefile index d2e234d92..230d6e56d 100644 --- a/package/shorewall-common/Makefile +++ b/package/shorewall-common/Makefile @@ -9,12 +9,17 @@ PKG_NAME:= shorewall-common PKG_VERSION:= 4.0.7 PKG_RELEASE:= 1 PKG_MD5SUM:= 2df43356b1fdbc91920d48c5595aa101 -MASTER_SITES:= http://www1.shorewall.net/pub/shorewall/4.0/shorewall-${PKG_VERSION}/ +PKG_DESCR:= high-level netfilter configuration tool +PKG_SECTION:= net +PKG_DEPENDS:= iptables +PKG_URL:= http://www.shorewall.net +PKG_SITES:= http://www1.shorewall.net/pub/shorewall/4.0/shorewall-${PKG_VERSION}/ + DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.bz2 include ${TOPDIR}/mk/package.mk -$(eval $(call PKG_template,SHOREWALL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE})) +$(eval $(call PKG_template,SHOREWALL,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) do-install: PREFIX="${WRKINST}" ${WRKBUILD}/install.sh -n @@ -33,13 +38,9 @@ ifeq ($(ADK_PACKAGE_SHOREWALL_STRIPSHARED),y) endif post-install: - ${INSTALL_DIR} ${IDIR_SHOREWALL}/etc/init.d ${INSTALL_DIR} ${IDIR_SHOREWALL}/etc/shorewall ${INSTALL_DIR} ${IDIR_SHOREWALL}/usr/share/shorewall ${INSTALL_DIR} ${IDIR_SHOREWALL}/sbin - - ${INSTALL_BIN} ./files/shorewall.init ${IDIR_SHOREWALL}/etc/init.d/shorewall - ${INSTALL_DATA} ${WRKINST}/etc/shorewall/* ${IDIR_SHOREWALL}/etc/shorewall/ ${INSTALL_DATA} ${WRKINST}/usr/share/shorewall/actions.std ${IDIR_SHOREWALL}/usr/share/shorewall/ ${INSTALL_DATA} ${WRKINST}/usr/share/shorewall/configpath ${IDIR_SHOREWALL}/usr/share/shorewall/ @@ -49,7 +50,6 @@ post-install: ${INSTALL_DATA} ${WRKINST}/usr/share/shorewall/action.* ${IDIR_SHOREWALL}/usr/share/shorewall/ ${INSTALL_DATA} ${WRKINST}/usr/share/shorewall/macro.* ${IDIR_SHOREWALL}/usr/share/shorewall/ ${INSTALL_DATA} ${WRKINST}/usr/share/shorewall/lib.* ${IDIR_SHOREWALL}/usr/share/shorewall/ - ${INSTALL_BIN} ${WRKINST}/usr/share/shorewall/firewall ${IDIR_SHOREWALL}/usr/share/shorewall/ ${INSTALL_BIN} ${WRKINST}/usr/share/shorewall/functions ${IDIR_SHOREWALL}/usr/share/shorewall/ ${INSTALL_BIN} ${WRKINST}/usr/share/shorewall/wait4ifup ${IDIR_SHOREWALL}/usr/share/shorewall/ diff --git a/package/shorewall-common/files/shorewall-common.conffiles b/package/shorewall-common/files/shorewall-common.conffiles new file mode 100644 index 000000000..99893804c --- /dev/null +++ b/package/shorewall-common/files/shorewall-common.conffiles @@ -0,0 +1,33 @@ +/etc/shorewall/Makefile +/etc/shorewall/accounting +/etc/shorewall/actions +/etc/shorewall/blacklist +/etc/shorewall/continue +/etc/shorewall/ecn +/etc/shorewall/hosts +/etc/shorewall/init +/etc/shorewall/initdone +/etc/shorewall/interfaces +/etc/shorewall/ipsec +/etc/shorewall/maclist +/etc/shorewall/masq +/etc/shorewall/nat +/etc/shorewall/netmap +/etc/shorewall/params +/etc/shorewall/policy +/etc/shorewall/providers +/etc/shorewall/proxyarp +/etc/shorewall/route_rules +/etc/shorewall/routestopped +/etc/shorewall/rules +/etc/shorewall/shorewall.conf +/etc/shorewall/start +/etc/shorewall/started +/etc/shorewall/stop +/etc/shorewall/stopped +/etc/shorewall/tcclasses +/etc/shorewall/tcdevices +/etc/shorewall/tcrules +/etc/shorewall/tos +/etc/shorewall/tunnels +/etc/shorewall/zones diff --git a/package/shorewall-common/files/shorewall-common.postinst b/package/shorewall-common/files/shorewall-common.postinst new file mode 100644 index 000000000..bade6304b --- /dev/null +++ b/package/shorewall-common/files/shorewall-common.postinst @@ -0,0 +1,6 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf shorewall + +mkdir -p $IPKG_INSTROOT/usr/share/shorewall/runtime +chmod 0700 $IPKG_INSTROOT/usr/share/shorewall/runtime diff --git a/package/shorewall-common/files/shorewall-common.prerm b/package/shorewall-common/files/shorewall-common.prerm new file mode 100644 index 000000000..805b69980 --- /dev/null +++ b/package/shorewall-common/files/shorewall-common.prerm @@ -0,0 +1,8 @@ +#!/bin/sh + +# commented out: we never change this information ourselves +# plus: this will destroy /etc/rc.conf entirely. +# read some info about shell redirections if you don’t know why. +#cat $IPKG_INSTROOT/etc/rc.conf | grep -v "shorewall" >$IPKG_INSTROOT/etc/rc.conf + +rm -rf /usr/share/shorewall/runtime diff --git a/package/shorewall-common/files/shorewall.init b/package/shorewall-common/files/shorewall.init index c2800f732..da2ea2a51 100644 --- a/package/shorewall-common/files/shorewall.init +++ b/package/shorewall-common/files/shorewall.init @@ -1,5 +1,7 @@ #!/bin/sh -#FWINIT 45 +#PKG shorewall-common +#INIT 45 + . /etc/rc.conf case $1 in diff --git a/package/shorewall-common/ipkg/shorewall-common.conffiles b/package/shorewall-common/ipkg/shorewall-common.conffiles deleted file mode 100644 index 99893804c..000000000 --- a/package/shorewall-common/ipkg/shorewall-common.conffiles +++ /dev/null @@ -1,33 +0,0 @@ -/etc/shorewall/Makefile -/etc/shorewall/accounting -/etc/shorewall/actions -/etc/shorewall/blacklist -/etc/shorewall/continue -/etc/shorewall/ecn -/etc/shorewall/hosts -/etc/shorewall/init -/etc/shorewall/initdone -/etc/shorewall/interfaces -/etc/shorewall/ipsec -/etc/shorewall/maclist -/etc/shorewall/masq -/etc/shorewall/nat -/etc/shorewall/netmap -/etc/shorewall/params -/etc/shorewall/policy -/etc/shorewall/providers -/etc/shorewall/proxyarp -/etc/shorewall/route_rules -/etc/shorewall/routestopped -/etc/shorewall/rules -/etc/shorewall/shorewall.conf -/etc/shorewall/start -/etc/shorewall/started -/etc/shorewall/stop -/etc/shorewall/stopped -/etc/shorewall/tcclasses -/etc/shorewall/tcdevices -/etc/shorewall/tcrules -/etc/shorewall/tos -/etc/shorewall/tunnels -/etc/shorewall/zones diff --git a/package/shorewall-common/ipkg/shorewall-common.control b/package/shorewall-common/ipkg/shorewall-common.control deleted file mode 100644 index 41b7d8e43..000000000 --- a/package/shorewall-common/ipkg/shorewall-common.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: shorewall-common -Priority: optional -Section: net -Depends: iptables -Description: high-level netfilter configuration tool diff --git a/package/shorewall-common/ipkg/shorewall-common.postinst b/package/shorewall-common/ipkg/shorewall-common.postinst deleted file mode 100644 index bade6304b..000000000 --- a/package/shorewall-common/ipkg/shorewall-common.postinst +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -. $IPKG_INSTROOT/etc/functions.sh -add_rcconf shorewall - -mkdir -p $IPKG_INSTROOT/usr/share/shorewall/runtime -chmod 0700 $IPKG_INSTROOT/usr/share/shorewall/runtime diff --git a/package/shorewall-common/ipkg/shorewall-common.prerm b/package/shorewall-common/ipkg/shorewall-common.prerm deleted file mode 100644 index 805b69980..000000000 --- a/package/shorewall-common/ipkg/shorewall-common.prerm +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -# commented out: we never change this information ourselves -# plus: this will destroy /etc/rc.conf entirely. -# read some info about shell redirections if you don’t know why. -#cat $IPKG_INSTROOT/etc/rc.conf | grep -v "shorewall" >$IPKG_INSTROOT/etc/rc.conf - -rm -rf /usr/share/shorewall/runtime -- cgit v1.2.3