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/openswan/Makefile | 14 ++++++-------- package/openswan/files/openswan.conffiles | 1 + package/openswan/files/openswan.init | 4 +++- package/openswan/files/openswan.postinst | 3 +++ package/openswan/ipkg/openswan.conffiles | 1 - package/openswan/ipkg/openswan.control | 5 ----- package/openswan/ipkg/openswan.postinst | 3 --- 7 files changed, 13 insertions(+), 18 deletions(-) create mode 100644 package/openswan/files/openswan.conffiles create mode 100644 package/openswan/files/openswan.postinst delete mode 100644 package/openswan/ipkg/openswan.conffiles delete mode 100644 package/openswan/ipkg/openswan.control delete mode 100644 package/openswan/ipkg/openswan.postinst (limited to 'package/openswan') diff --git a/package/openswan/Makefile b/package/openswan/Makefile index 4758e85a1..7fea6fdd9 100644 --- a/package/openswan/Makefile +++ b/package/openswan/Makefile @@ -9,12 +9,16 @@ PKG_NAME:= openswan PKG_VERSION:= 2.6.21 PKG_RELEASE:= 1 PKG_MD5SUM:= ba9da6c90e0f5fe856767d7510ce371f -MASTER_SITES:= http://www.openswan.org/download/ \ +PKG_DESCR:= IPSec software +PKG_SECTION:= net +PKG_DEPENDS:= ip libgmp +PKG_URL:= http://www.openswan.org +PKG_SITES:= http://www.openswan.org/download/ \ ftp://ftp.openswan.org/openswan/ include ${TOPDIR}/mk/package.mk -$(eval $(call PKG_template,OPENSWAN,openswan,${PKG_VERSION}-${PKG_RELEASE})) +$(eval $(call PKG_template,OPENSWAN,openswan,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) FLAGS:= ${TCFLAGS} ${TCPPFLAGS} ${TLDFLAGS} @@ -42,8 +46,6 @@ do-install: INC_USRLOCAL="/usr" \ MODPROBE="insmod" \ install - -post-install: rm -rf ${IDIR_OPENSWAN}/usr/share rm -rf ${IDIR_OPENSWAN}/usr/man rm -rf ${IDIR_OPENSWAN}/var @@ -51,9 +53,5 @@ post-install: ${IDIR_OPENSWAN}/usr/libexec/ipsec/setup rm -rf ${IDIR_OPENSWAN}/etc/rc*.d find ${IDIR_OPENSWAN} -name \*.old -print0 | xargs -0 rm -rf - mkdir -p ${IDIR_OPENSWAN}/etc/init.d - ${INSTALL_BIN} ./files/openswan.init \ - ${IDIR_OPENSWAN}/etc/init.d/ipsec - #${IPKG_BUILD} ${IDIR_OPENSWAN} ${PACKAGE_DIR} include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/openswan/files/openswan.conffiles b/package/openswan/files/openswan.conffiles new file mode 100644 index 000000000..ff0851c29 --- /dev/null +++ b/package/openswan/files/openswan.conffiles @@ -0,0 +1 @@ +/etc/ipsec.conf diff --git a/package/openswan/files/openswan.init b/package/openswan/files/openswan.init index 04ac52052..fb43619d1 100644 --- a/package/openswan/files/openswan.init +++ b/package/openswan/files/openswan.init @@ -1,5 +1,7 @@ #!/bin/sh -#FWINIT 60 +#PKG openswan +#INIT 60 + . /etc/rc.conf case $1 in diff --git a/package/openswan/files/openswan.postinst b/package/openswan/files/openswan.postinst new file mode 100644 index 000000000..a5f8e11b2 --- /dev/null +++ b/package/openswan/files/openswan.postinst @@ -0,0 +1,3 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf ipsec ipsec NO diff --git a/package/openswan/ipkg/openswan.conffiles b/package/openswan/ipkg/openswan.conffiles deleted file mode 100644 index ff0851c29..000000000 --- a/package/openswan/ipkg/openswan.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/ipsec.conf diff --git a/package/openswan/ipkg/openswan.control b/package/openswan/ipkg/openswan.control deleted file mode 100644 index 5ff4bfe0c..000000000 --- a/package/openswan/ipkg/openswan.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openswan -Section: base -Priority: optional -Depends: libgmp, ip -Description: Openswan IPSec software diff --git a/package/openswan/ipkg/openswan.postinst b/package/openswan/ipkg/openswan.postinst deleted file mode 100644 index a5f8e11b2..000000000 --- a/package/openswan/ipkg/openswan.postinst +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -. $IPKG_INSTROOT/etc/functions.sh -add_rcconf ipsec ipsec NO -- cgit v1.2.3