aboutsummaryrefslogtreecommitdiffstats
path: root/package/fonera-mp3/Makefile
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2007-08-27 20:10:35 +0000
committerJohn Crispin <john@openwrt.org>2007-08-27 20:10:35 +0000
commit6c0f55bc68f3d3a7fdd00e61ea7caf2ed4c620a9 (patch)
tree6d85567a32ef8e795cc4d88fdd545819577d6ad2 /package/fonera-mp3/Makefile
parent79b07af6945064e53ad7c3f0920dabd73cdbd161 (diff)
downloadupstream-6c0f55bc68f3d3a7fdd00e61ea7caf2ed4c620a9.tar.gz
upstream-6c0f55bc68f3d3a7fdd00e61ea7caf2ed4c620a9.tar.bz2
upstream-6c0f55bc68f3d3a7fdd00e61ea7caf2ed4c620a9.zip
added libjson-c. added driver, webinterface and userspace daemon for the fonera mp3-hack
SVN-Revision: 8509
Diffstat (limited to 'package/fonera-mp3/Makefile')
-rw-r--r--package/fonera-mp3/Makefile58
1 files changed, 58 insertions, 0 deletions
diff --git a/package/fonera-mp3/Makefile b/package/fonera-mp3/Makefile
new file mode 100644
index 0000000000..b807100b40
--- /dev/null
+++ b/package/fonera-mp3/Makefile
@@ -0,0 +1,58 @@
+#
+# 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
+PKG_BUILD_DEPENDS:=json-c
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/fonera-mp3d
+ SECTION:=utils
+ CATEGORY:=Utilities
+ DEPENDS:=@LINUX_2_6_ATHEROS
+ TITLE:=Daemon for fonera-mp3
+ DESCRIPTION:=Daemon to drive a vs1011X mp3 decoder attached to the \
+ fonera gpio pins
+endef
+
+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
+ $(INSTALL_DIR) $(1)/www/local
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/cgi/{stylesheet.css,json.js} $(1)/www/local
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/cgi/mp3.cgi $(1)/www/cgi-bin
+ ln -s mp3.cgi $(1)/www/cgi-bin/mp3_cmd.cgi
+ ln -s mp3.cgi $(1)/www/cgi-bin/mp3_json.cgi
+ ln -s mp3.cgi $(1)/www/cgi-bin/mp3_remote.cgi
+endef
+
+$(eval $(call BuildPackage,fonera-mp3d))