Hi Jiri & the List,

Can you update the initscript to use the service_start & service_stop
functions instead of start-stop-daemon ? You can find some doc in
/lib/functions.sh and usage in initscripts from other packages.

Thanks,
--
-{Nico}


On Thu, Nov 24, 2011 at 8:35 AM, Jiří Machálek <machal...@gmail.com> wrote:
> This patch adds variant of IRC server ngIRCd package compiled with
> OpenSSL support and init script.
>
> Signed-off-by: Jiri Machalek <machal...@gmail.com>
> ---
>
> Index: packages/net/ngircd/files/ngircd.init
> ===================================================================
> --- packages/net/ngircd/files/ngircd.init       (revision 0)
> +++ packages/net/ngircd/files/ngircd.init       (revision 0)
> @@ -0,0 +1,13 @@
> +#!/bin/sh /etc/rc.common
> +#Copyright (c) 2011 Jiri Machalek <machal...@gmail.com>
> +
> +START=62
> +APP=ngircd
> +
> +start () {
> +       start-stop-daemon -S -x $APP
> +}
> +
> +stop () {
> +       start-stop-daemon -K -n $APP -s TERM
> +}
>
> Property changes on: packages/net/ngircd/files/ngircd.init
> ___________________________________________________________________
> Added: svn:executable
>  + *
>
> Index: packages/net/ngircd/Makefile
> ===================================================================
> --- packages/net/ngircd/Makefile        (revision 29290)
> +++ packages/net/ngircd/Makefile        (working copy)
> @@ -8,28 +8,44 @@
>  include $(TOPDIR)/rules.mk
>
>  PKG_NAME:=ngircd
> -PKG_VERSION:=15
> -PKG_RELEASE:=2
> +PKG_VERSION:=18
> +PKG_RELEASE:=1
>
>  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
>  PKG_SOURCE_URL:= \
>        ftp://ngircd.barton.de/pub/ngircd/ \
>        ftp://ftp.berlios.de/pub/ngircd/
> -PKG_MD5SUM:=c183a85eba6fe51255983848f099c8ae
> +PKG_MD5SUM:=4958c8b2d128cf3e9888af3f782892a1
>
>  PKG_INSTALL:=1
>
> +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
> +
>  include $(INCLUDE_DIR)/package.mk
> +NGIRCD_DEPENDS:=+zlib
>
> -define Package/ngircd
> +define Package/ngircd/default
>  SECTION:=net
>  CATEGORY:=Network
>  SUBMENU:=Instant Messaging
> -  DEPENDS:=+zlib
> -  TITLE:=Next Generation IRC Server
>  URL:=http://ngircd.barton.de
>  endef
>
> +
> +define Package/ngircd
> +$(call Package/ngircd/default)
> +  DEPENDS:=$(NGIRCD_DEPENDS)
> +  VARIANT:=nossl
> +  TITLE:=Next Generation IRC Server
> +endef
> +
> +define Package/ngircd-openssl
> +$(call Package/ngircd/default)
> +  DEPENDS:=$(NGIRCD_DEPENDS) +libopenssl
> +  VARIANT:=ssl
> +  TITLE:=Next Generation IRC Server (with OpenSSL support)
> +endef
> +
>  define Package/ngircd/description
>  ngIRCd is an Open Source server for the Internet Relay Chat (IRC), which
>  is developed and published under the terms of the GNU General Public
> Licence.
> @@ -37,15 +53,42 @@
>  not deduced from the "grandfather of IRC daemons", the daemon of the
> IRCNet.
>  endef
>
> +define Package/ngircd-openssl/description
> +  ngIRCd is an Open Source server for the Internet Relay Chat (IRC), which
> +  is developed and published under the terms of the GNU General Public
> Licence.
> +  ngIRCd means "next generation IRC daemon", it's written from scratch and
> +  not deduced from the "grandfather of IRC daemons", the daemon of the
> IRCNet.
> +endef
> +
>  define Package/ngircd/conffiles
>  /etc/ngircd.conf
>  endef
>
> +define Package/ngircd-openssl/conffiles
> +/etc/ngircd.conf
> +endef
> +
> +ifeq ($(BUILD_VARIANT),ssl)
> +       CONFIGURE_ARGS += --with-openssl
> +endif
> +
>  define Package/ngircd/install
>       $(INSTALL_DIR) $(1)/usr/sbin
>       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ngircd $(1)/usr/sbin/
>       $(INSTALL_DIR) $(1)/etc
>       $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/ngircd.conf $(1)/etc/
> +       $(INSTALL_DIR) $(1)/etc/init.d
> +       $(INSTALL_BIN) ./files/ngircd.init $(1)/etc/init.d/ngircd
>  endef
>
> +define Package/ngircd-openssl/install
> +       $(INSTALL_DIR) $(1)/usr/sbin
> +       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/ngircd $(1)/usr/sbin/
> +       $(INSTALL_DIR) $(1)/etc
> +       $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/ngircd.conf $(1)/etc/
> +       $(INSTALL_DIR) $(1)/etc/init.d
> +       $(INSTALL_BIN) ./files/ngircd.init $(1)/etc/init.d/ngircd
> +endef
> +
>  $(eval $(call BuildPackage,ngircd))
> +$(eval $(call BuildPackage,ngircd-openssl))
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
>
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to