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/openldap/Makefile | 31 +++++++++++++++++--------- package/openldap/files/libopenldap.conffiles | 1 + package/openldap/files/openldap-slapd.postinst | 5 +++++ package/openldap/files/slapd.init | 4 +++- package/openldap/ipkg/libopenldap.conffiles | 1 - package/openldap/ipkg/libopenldap.control | 5 ----- package/openldap/ipkg/openldap-slapd.control | 5 ----- package/openldap/ipkg/openldap-slapd.postinst | 5 ----- package/openldap/ipkg/openldap-utils.control | 5 ----- 9 files changed, 29 insertions(+), 33 deletions(-) create mode 100644 package/openldap/files/libopenldap.conffiles create mode 100644 package/openldap/files/openldap-slapd.postinst delete mode 100644 package/openldap/ipkg/libopenldap.conffiles delete mode 100644 package/openldap/ipkg/libopenldap.control delete mode 100644 package/openldap/ipkg/openldap-slapd.control delete mode 100644 package/openldap/ipkg/openldap-slapd.postinst delete mode 100644 package/openldap/ipkg/openldap-utils.control (limited to 'package/openldap') diff --git a/package/openldap/Makefile b/package/openldap/Makefile index 267b61d2b..a92bac9b3 100644 --- a/package/openldap/Makefile +++ b/package/openldap/Makefile @@ -9,12 +9,30 @@ PKG_NAME:= openldap PKG_VERSION:= 2.4.16 PKG_RELEASE:= 1 PKG_MD5SUM:= ed5b86e9d2b372d10edfe3bb59fee165 -DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tgz -MASTER_SITES:= ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/ \ +PKG_DESCR:= OpenLDAP client libraries +PKG_SECTION:= libs +PKG_DEPENDS:= libopenssl libsasl2 +PKG_URL:= http://www.openldap.org +PKG_SITES:= ftp://ftp.openldap.org/pub/OpenLDAP/openldap-release/ \ ftp://sunsite.cnlab-switch.ch/mirror/OpenLDAP/openldap-release/ \ ftp://ftp.nl.uu.net/pub/unix/db/openldap/openldap-release/ \ ftp://ftp.plig.org/pub/OpenLDAP/openldap-release/ +PKG_DESCR_1:= OpenLDAP utilities +PKG_DEPENDS_1:= libopenldap +PKG_SECTION_1:= net +PKG_DESCR_2:= OpenLDAP server daemon +PKG_DEPENDS_2:= libopenldap +PKG_SECTION_2:= net + +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tgz + +include ${TOPDIR}/mk/package.mk + +$(eval $(call PKG_template,LIBOPENLDAP,libopenldap,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) +$(eval $(call PKG_template,OPENLDAP_UTILS,openldap-utils,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_1},${PKG_DESCR_1},${PKG_SECTION_1})) +$(eval $(call PKG_template,OPENLDAP_SLAPD,openldap-slapd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_2},${PKG_DESCR_2},${PKG_SECTION_2})) + PKG_CONFIGURE_OPTIONS+= \ --enable-slapd \ --enable-bdb \ @@ -32,12 +50,6 @@ PKG_CONFIGURE_OPTIONS+= \ --with-tls \ --with-yielding_select="yes" \ -include ${TOPDIR}/mk/package.mk - -$(eval $(call PKG_template,LIBOPENLDAP,libopenldap,${PKG_VERSION}-${PKG_RELEASE})) -$(eval $(call PKG_template,OPENLDAP_UTILS,openldap-utils,${PKG_VERSION}-${PKG_RELEASE})) -$(eval $(call PKG_template,OPENLDAP_SLAPD,openldap-slapd,${PKG_VERSION}-${PKG_RELEASE})) - pre-configure: (cd ${WRKBUILD}; rm -rf config.{cache,status} ; \ CPPFLAGS=-D_GNU_SOURCE ./configure \ @@ -70,13 +82,10 @@ post-install: ${INSTALL_DIR} ${IDIR_OPENLDAP_UTILS}/usr/bin ${CP} ${WRKINST}/usr/bin/ldap* ${IDIR_OPENLDAP_UTILS}/usr/bin/ ${INSTALL_DIR} ${IDIR_OPENLDAP_SLAPD}/etc/openldap/schema - ${INSTALL_DIR} ${IDIR_OPENLDAP_SLAPD}/etc/init.d ${INSTALL_DIR} ${IDIR_OPENLDAP_SLAPD}/usr/sbin ${CP} ${WRKINST}/usr/sbin/slap* ${IDIR_OPENLDAP_SLAPD}/usr/sbin/ ${INSTALL_DATA} ${WRKINST}/etc/openldap/schema/core.schema \ ${IDIR_OPENLDAP_SLAPD}/etc/openldap/schema ${INSTALL_DATA} ./files/slapd.conf ${IDIR_OPENLDAP_SLAPD}/etc/openldap - ${INSTALL_DATA} ./files/slapd.init \ - ${IDIR_OPENLDAP_SLAPD}/etc/init.d/slapd include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/openldap/files/libopenldap.conffiles b/package/openldap/files/libopenldap.conffiles new file mode 100644 index 000000000..25f44c322 --- /dev/null +++ b/package/openldap/files/libopenldap.conffiles @@ -0,0 +1 @@ +/etc/openldap/ldap.conf diff --git a/package/openldap/files/openldap-slapd.postinst b/package/openldap/files/openldap-slapd.postinst new file mode 100644 index 000000000..d6ecee377 --- /dev/null +++ b/package/openldap/files/openldap-slapd.postinst @@ -0,0 +1,5 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_user slapd $(get_next_uid) $(get_next_gid) /var/run/slapd +add_group slapd $(get_next_gid) +add_rcconf 'use "YES" to enable' slapd NO diff --git a/package/openldap/files/slapd.init b/package/openldap/files/slapd.init index 814345c44..60f717927 100644 --- a/package/openldap/files/slapd.init +++ b/package/openldap/files/slapd.init @@ -1,5 +1,7 @@ #!/bin/sh -#FWINIT 70 +#PKG openldap-slapd +#INIT 70 + . /etc/rc.conf case $1 in diff --git a/package/openldap/ipkg/libopenldap.conffiles b/package/openldap/ipkg/libopenldap.conffiles deleted file mode 100644 index 25f44c322..000000000 --- a/package/openldap/ipkg/libopenldap.conffiles +++ /dev/null @@ -1 +0,0 @@ -/etc/openldap/ldap.conf diff --git a/package/openldap/ipkg/libopenldap.control b/package/openldap/ipkg/libopenldap.control deleted file mode 100644 index 84b145f58..000000000 --- a/package/openldap/ipkg/libopenldap.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: libopenldap -Priority: optional -Section: libs -Description: OpenLDAP (Lightweight Directory Access Protocol) client libraries -Depends: libopenssl, libsasl2 diff --git a/package/openldap/ipkg/openldap-slapd.control b/package/openldap/ipkg/openldap-slapd.control deleted file mode 100644 index c5b9e12d4..000000000 --- a/package/openldap/ipkg/openldap-slapd.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openldap-slapd -Priority: optional -Section: admin -Description: OpenLDAP server -Depends: libopenldap, libopenssl, libsasl2, libdb, libpthread diff --git a/package/openldap/ipkg/openldap-slapd.postinst b/package/openldap/ipkg/openldap-slapd.postinst deleted file mode 100644 index d6ecee377..000000000 --- a/package/openldap/ipkg/openldap-slapd.postinst +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -. $IPKG_INSTROOT/etc/functions.sh -add_user slapd $(get_next_uid) $(get_next_gid) /var/run/slapd -add_group slapd $(get_next_gid) -add_rcconf 'use "YES" to enable' slapd NO diff --git a/package/openldap/ipkg/openldap-utils.control b/package/openldap/ipkg/openldap-utils.control deleted file mode 100644 index 3a515c69f..000000000 --- a/package/openldap/ipkg/openldap-utils.control +++ /dev/null @@ -1,5 +0,0 @@ -Package: openldap-utils -Priority: optional -Section: admin -Description: OpenLDAP (Lightweight Directory Access Protocol) client utilities -Depends: libopenldap, libopenssl, libsasl2 -- cgit v1.2.3