# commis.mk # David Rowe February 2010 # # usage: make -f commis.mk commis-package # # Some diaplan used for commissioning IP0Xes # include rules.mk TARGET_DIR=$(BUILD_DIR)/tmp/commis/ipkg/commis PKG_NAME:=commis PKG_VERSION:=1 PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/tmp/commis commis: mkdir -p $(TARGET_DIR)/etc/asterisk cp files/commis.conf $(TARGET_DIR)/etc/asterisk touch $(PKG_BUILD_DIR)/.built all: commis dirclean: define Package/$(PKG_NAME) SECTION:=utils CATEGORY:=Utilities TITLE:=Installs some dialplan used during IP0X commissioning DESCRIPTION:=\ Press 1...8 to dial Zap/1...Zap/8, 2020 to record/playback,\ 2008 to play a prompt. endef # post installation define Package/$(PKG_NAME)/postinst #!/bin/sh echo '#include "commis.conf"' >> /etc/asterisk/extensions.conf asterisk -rx "dialplan reload" endef # pre-remove define Package/$(PKG_NAME)/prerm #!/bin/sh -x sed -i 's/\#include "commis.conf"//g' /etc/asterisk/extensions.conf endef $(eval $(call BuildPackage,$(PKG_NAME))) commis-package: commis $(PACKAGE_DIR)/$(PKG_NAME)_$(VERSION)_$(PKGARCH).ipk