2007-08-28 04:10:35 +08:00
|
|
|
#
|
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
# $Id: Makefile 8444 2007-08-20 16:12:24Z nbd $
|
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=fonera-mp3d
|
|
|
|
PKG_RELEASE:=1
|
|
|
|
PKG_VERSION:=1.0
|
2007-08-28 23:11:42 +08:00
|
|
|
|
|
|
|
PKG_BUILD_DEPENDS:=libjson
|
2007-08-28 04:10:35 +08:00
|
|
|
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/fonera-mp3d
|
|
|
|
SECTION:=utils
|
|
|
|
CATEGORY:=Utilities
|
2007-09-09 03:55:42 +08:00
|
|
|
DEPENDS:=@TARGET_atheros
|
2007-08-28 04:10:35 +08:00
|
|
|
TITLE:=Daemon for fonera-mp3
|
|
|
|
endef
|
|
|
|
|
2007-09-07 16:34:51 +08:00
|
|
|
define Package/fonera-mp3d/description
|
|
|
|
Daemon to drive a vs1011X mp3 decoder attached to the
|
|
|
|
fonera gpio pins
|
2007-09-07 16:58:53 +08:00
|
|
|
endef
|
2007-09-07 16:34:51 +08:00
|
|
|
|
2007-08-28 04:10:35 +08:00
|
|
|
define Build/Prepare
|
|
|
|
mkdir -p $(PKG_BUILD_DIR)
|
|
|
|
$(CP) ./src/* $(PKG_BUILD_DIR)/
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR) \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
CFLAGS="$(TARGET_CFLAGS)"
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR)/cgi \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
CFLAGS="$(TARGET_CFLAGS) -I $(STAGING_DIR)/usr/include/json" \
|
|
|
|
LDLIBS="$(STAGING_DIR)/usr/lib/libjson.a"
|
|
|
|
$(MAKE) -C $(PKG_BUILD_DIR)/cli \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
|
|
|
CFLAGS="$(TARGET_CFLAGS)"
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/fonera-mp3d/install
|
|
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/mp3d $(1)/usr/bin/
|
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/cli/mplay $(1)/usr/bin/
|
|
|
|
$(INSTALL_DIR) $(1)/www/cgi-bin
|
2007-09-03 21:11:58 +08:00
|
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/cgi/mp3.cgi $(1)/www/cgi-bin/
|
|
|
|
ln -sf mp3.cgi $(1)/www/cgi-bin/mp3_cmd.cgi
|
|
|
|
ln -sf mp3.cgi $(1)/www/cgi-bin/mp3_json.cgi
|
|
|
|
ln -sf mp3.cgi $(1)/www/cgi-bin/mp3_remote.cgi
|
2007-08-28 04:10:35 +08:00
|
|
|
$(INSTALL_DIR) $(1)/www/local
|
2007-09-03 21:11:58 +08:00
|
|
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/cgi/{stylesheet.css,json.js} $(1)/www/local/
|
2007-09-11 05:19:21 +08:00
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
|
|
|
$(INSTALL_BIN) ./files/mp3d.init $(1)/etc/init.d/mp3d
|
2007-08-28 04:10:35 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,fonera-mp3d))
|