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/quagga/Makefile | 30 +++++++++++++++++++----------- package/quagga/files/quagga.init | 4 +++- package/quagga/files/quagga.postinst | 16 ++++++++++++++++ package/quagga/ipkg/quagga-bgpd.control | 6 ------ package/quagga/ipkg/quagga-ospf6d.control | 6 ------ package/quagga/ipkg/quagga-ospfd.control | 6 ------ package/quagga/ipkg/quagga-ripd.control | 6 ------ package/quagga/ipkg/quagga-ripngd.control | 6 ------ package/quagga/ipkg/quagga-vtysh.control | 6 ------ package/quagga/ipkg/quagga.control | 6 ------ package/quagga/ipkg/quagga.postinst | 16 ---------------- 11 files changed, 38 insertions(+), 70 deletions(-) create mode 100644 package/quagga/files/quagga.postinst delete mode 100644 package/quagga/ipkg/quagga-bgpd.control delete mode 100644 package/quagga/ipkg/quagga-ospf6d.control delete mode 100644 package/quagga/ipkg/quagga-ospfd.control delete mode 100644 package/quagga/ipkg/quagga-ripd.control delete mode 100644 package/quagga/ipkg/quagga-ripngd.control delete mode 100644 package/quagga/ipkg/quagga-vtysh.control delete mode 100644 package/quagga/ipkg/quagga.control delete mode 100644 package/quagga/ipkg/quagga.postinst (limited to 'package/quagga') diff --git a/package/quagga/Makefile b/package/quagga/Makefile index 2ac084c06..6ac348331 100644 --- a/package/quagga/Makefile +++ b/package/quagga/Makefile @@ -9,21 +9,32 @@ PKG_NAME:= quagga PKG_VERSION:= 0.99.12 PKG_RELEASE:= 1 PKG_MD5SUM:= d2bb513f4ac113dbb300c15a0bd0a241 -MASTER_SITES:= http://www.quagga.net/download/ \ +PKG_DESCR:= A routing software package +PKG_SECTION:= net +PKG_URL:= http://www.quagga.net +PKG_SITES:= http://www.quagga.net/download/ \ http://www.de.quagga.net/download/ \ http://www.uk.quagga.net/download/ +PKG_DESCR_1:= BGP daemon +PKG_DESCR_2:= OSPF daemon +PKG_DESCR_3:= OSPF IPv6 daemon +PKG_DESCR_4:= RIPng daemon +PKG_DESCR_5:= RIP daemon +PKG_DESCR_6:= vtysh utility + + include ${TOPDIR}/mk/package.mk -$(eval $(call PKG_template,QUAGGA,quagga,${PKG_VERSION}-${PKG_RELEASE})) -$(eval $(call PKG_template,QUAGGA_BGPD,quagga-bgpd,${PKG_VERSION}-${PKG_RELEASE})) -$(eval $(call PKG_template,QUAGGA_OSPFD,quagga-ospfd,${PKG_VERSION}-${PKG_RELEASE})) +$(eval $(call PKG_template,QUAGGA,quagga,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +$(eval $(call PKG_template,QUAGGA_BGPD,quagga-bgpd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_1},${PKG_SECTION})) +$(eval $(call PKG_template,QUAGGA_OSPFD,quagga-ospfd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_2},${PKG_SECTION})) ifeq ($(ADK_IPV6),y) -$(eval $(call PKG_template,QUAGGA_OSPF6D,quagga-ospf6d,${PKG_VERSION}-${PKG_RELEASE})) -$(eval $(call PKG_template,QUAGGA_RIPNGD,quagga-ripngd,${PKG_VERSION}-${PKG_RELEASE})) +$(eval $(call PKG_template,QUAGGA_OSPF6D,quagga-ospf6d,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_3},${PKG_SECTION})) +$(eval $(call PKG_template,QUAGGA_RIPNGD,quagga-ripngd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_4},${PKG_SECTION})) endif -$(eval $(call PKG_template,QUAGGA_RIPD,quagga-ripd,${PKG_VERSION}-${PKG_RELEASE})) -$(eval $(call PKG_template,QUAGGA_VTYSH,quagga-vtysh,${PKG_VERSION}-${PKG_RELEASE})) +$(eval $(call PKG_template,QUAGGA_RIPD,quagga-ripd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_5},${PKG_SECTION})) +$(eval $(call PKG_template,QUAGGA_VTYSH,quagga-vtysh,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR_6},${PKG_SECTION})) CONFIGURE_STYLE:= gnu CONFIGURE_ARGS+= --localstatedir=/var/run/quagga \ @@ -37,15 +48,12 @@ INSTALL_STYLE:= auto post-install: ${INSTALL_DIR} ${IDIR_QUAGGA}/usr/{lib,sbin} - ${INSTALL_DIR} ${IDIR_QUAGGA}/etc/init.d/ ${CP} ${WRKINST}/usr/lib/libzebra.so.* ${IDIR_QUAGGA}/usr/lib/ ${INSTALL_BIN} ${WRKINST}/usr/sbin/zebra \ ${WRKINST}/usr/sbin/watchquagga ${IDIR_QUAGGA}/usr/sbin/ # avoid /etc being set to 0750 ${INSTALL_DIR} ${IDIR_QUAGGA}/etc/quagga/ chmod 0750 ${IDIR_QUAGGA}/etc/quagga/ - ${INSTALL_BIN} ./files/quagga.init \ - ${IDIR_QUAGGA}/etc/init.d/quagga ${INSTALL_DIR} ${IDIR_QUAGGA}/var/run/quagga ${INSTALL_DIR} ${IDIR_QUAGGA_BGPD}/usr/sbin ${CP} ${WRKINST}/usr/sbin/bgpd ${IDIR_QUAGGA_BGPD}/usr/sbin/ diff --git a/package/quagga/files/quagga.init b/package/quagga/files/quagga.init index 6c40fe356..498287051 100644 --- a/package/quagga/files/quagga.init +++ b/package/quagga/files/quagga.init @@ -1,5 +1,7 @@ #!/bin/sh -#FWINIT 50 +#PKG quagga +#INIT 50 + ME=$(basename $0) usage() { diff --git a/package/quagga/files/quagga.postinst b/package/quagga/files/quagga.postinst new file mode 100644 index 000000000..868d00de9 --- /dev/null +++ b/package/quagga/files/quagga.postinst @@ -0,0 +1,16 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh + +gid=$(get_next_gid) +add_group quagga $gid +add_user quagga $(get_next_uid) $gid /tmp +add_rcconf quagga quagga NO +add_service zebrasrv 2600/tcp +add_service zebra 2601/tcp +add_service ripd 2602/tcp +add_service ripngd 2603/tcp +add_service ospfd 2604/tcp +add_service bgpd 2605/tcp +add_service ospf6d 2606/tcp +add_service ospfapi 2607/tcp +add_service isisd 2608/tcp diff --git a/package/quagga/ipkg/quagga-bgpd.control b/package/quagga/ipkg/quagga-bgpd.control deleted file mode 100644 index d8e9b80b2..000000000 --- a/package/quagga/ipkg/quagga-bgpd.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: quagga-bgpd -Priority: optional -Section: net -Depends: quagga -Description: A BGPv4, BGPv4+, BGPv4- routing engine for use with Quagga - routing software diff --git a/package/quagga/ipkg/quagga-ospf6d.control b/package/quagga/ipkg/quagga-ospf6d.control deleted file mode 100644 index 07cf20582..000000000 --- a/package/quagga/ipkg/quagga-ospf6d.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: quagga-ospf6d -Priority: optional -Section: net -Depends: quagga -Description: An OSPFv3 routing engine for use with Quagga - routing software diff --git a/package/quagga/ipkg/quagga-ospfd.control b/package/quagga/ipkg/quagga-ospfd.control deleted file mode 100644 index c9fc77ce8..000000000 --- a/package/quagga/ipkg/quagga-ospfd.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: quagga-ospfd -Priority: optional -Section: net -Depends: quagga -Description: An OSPFv2 routing engine for use with Quagga - routing software diff --git a/package/quagga/ipkg/quagga-ripd.control b/package/quagga/ipkg/quagga-ripd.control deleted file mode 100644 index e7ff89952..000000000 --- a/package/quagga/ipkg/quagga-ripd.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: quagga-ripd -Priority: optional -Section: net -Depends: quagga -Description: A RIP routing engine for use with Quagga - routing software diff --git a/package/quagga/ipkg/quagga-ripngd.control b/package/quagga/ipkg/quagga-ripngd.control deleted file mode 100644 index f6b2804c2..000000000 --- a/package/quagga/ipkg/quagga-ripngd.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: quagga-ripngd -Priority: optional -Section: net -Depends: quagga -Description: A RIPNG routing engine for use with Quagga - routing software diff --git a/package/quagga/ipkg/quagga-vtysh.control b/package/quagga/ipkg/quagga-vtysh.control deleted file mode 100644 index b26d11df3..000000000 --- a/package/quagga/ipkg/quagga-vtysh.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: quagga-vtysh -Priority: optional -Section: net -Depends: quagga, libncurses, libreadline -Description: integrated shell for interacting with Quagga - routing software diff --git a/package/quagga/ipkg/quagga.control b/package/quagga/ipkg/quagga.control deleted file mode 100644 index 303f299e8..000000000 --- a/package/quagga/ipkg/quagga.control +++ /dev/null @@ -1,6 +0,0 @@ -Package: quagga -Priority: optional -Section: net -Description: A routing software package that provides TCP/IP - based routing services with routing protocols support such - as RIPv1, RIPv2, RIPng, OSPFv2, OSPFv3, BGP-4, and BGP-4+. diff --git a/package/quagga/ipkg/quagga.postinst b/package/quagga/ipkg/quagga.postinst deleted file mode 100644 index 868d00de9..000000000 --- a/package/quagga/ipkg/quagga.postinst +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -. $IPKG_INSTROOT/etc/functions.sh - -gid=$(get_next_gid) -add_group quagga $gid -add_user quagga $(get_next_uid) $gid /tmp -add_rcconf quagga quagga NO -add_service zebrasrv 2600/tcp -add_service zebra 2601/tcp -add_service ripd 2602/tcp -add_service ripngd 2603/tcp -add_service ospfd 2604/tcp -add_service bgpd 2605/tcp -add_service ospf6d 2606/tcp -add_service ospfapi 2607/tcp -add_service isisd 2608/tcp -- cgit v1.2.3