# # Copyright (C) 2008 Christian Pointner, # # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. # # This Makefile builds rhctl Package for OpenWRT # # $Id: $ include $(TOPDIR)/rules.mk PKG_NAME:=rhctl PKG_VERSION:=1.0_RC1 PKG_RELEASE:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://localhost/ PKG_MD5SUM:=b641ecdf5c7461244ebfdc1d058031a6 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install include $(INCLUDE_DIR)/package.mk define Package/rhctl SECTION:=utils CATEGORY:=Utilities TITLE:=Radio Helsinki control tools URL:=http://www.helsinki.at MAINTAINER:=Christian Pointner DEPENDS:=+udev udevtrigger endef define Package/rhctl/conffiles /etc/rhctl/switchctl.conf endef define Package/rhctl/description rhctl is a collection of daemons and tools intended to control the main audio switch of Radio Helsinki. endef define Build/Configure (cd $(PKG_BUILD_DIR); \ touch include.mk; \ ) endef define Build/Compile rm -rf $(PKG_INSTALL_DIR) mkdir -p $(PKG_INSTALL_DIR) $(MAKE) -C $(PKG_BUILD_DIR) \ $(TARGET_CONFIGURE_OPTS) \ TARGET=Linux \ CFLAGS="$(TARGET_CFLAGS)" \ LDFLAGS="$(TARGET_LDFLAGS) -ldl" $(STRIP) $(PKG_BUILD_DIR)/switchctl $(STRIP) $(PKG_BUILD_DIR)/serialclient $(STRIP) $(PKG_BUILD_DIR)/stdioclient $(STRIP) $(PKG_BUILD_DIR)/heartbeatclient endef define Package/rhctl/install $(INSTALL_DIR) $(1)/etc/rhctl $(INSTALL_DATA) ./files/switchctl.conf $(1)/etc/rhctl/ $(INSTALL_DIR) $(1)/etc/config $(INSTALL_DATA) ./files/rhctl.config $(1)/etc/config/rhctl $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/switchctl $(1)/usr/bin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/serialclient $(1)/usr/bin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/stdioclient $(1)/usr/bin/ $(INSTALL_BIN) $(PKG_BUILD_DIR)/heartbeatclient $(1)/usr/bin/ $(INSTALL_BIN) ./files/rhctlsh $(1)/usr/bin/ $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/udev.init $(1)/etc/init.d/udev $(INSTALL_BIN) ./files/switchctl.init $(1)/etc/init.d/switchctl $(INSTALL_BIN) ./files/serialclient.init $(1)/etc/init.d/serialclient $(INSTALL_BIN) ./files/heartbeatclient.init $(1)/etc/init.d/heartbeatclient $(INSTALL_DIR) $(1)/etc/udev/rules.d $(INSTALL_DATA) ./files/udev.rules $(1)/etc/udev/rules.d/50-rhctl.rules endef $(eval $(call BuildPackage,rhctl))