fonera-mp3: fix json-c dependency here as well
[openwrt/svn-archive/archive.git] / package / fonera-mp3 / Makefile
1 #
2 # Copyright (C) 2006 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 # $Id: Makefile 8444 2007-08-20 16:12:24Z nbd $
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=fonera-mp3d
12 PKG_RELEASE:=1
13 PKG_VERSION:=1.0
14
15 PKG_BUILD_DEPENDS:=libjson
16
17 include $(INCLUDE_DIR)/package.mk
18
19 define Package/fonera-mp3d
20 SECTION:=utils
21 CATEGORY:=Utilities
22 DEPENDS:=@LINUX_2_6_ATHEROS
23 TITLE:=Daemon for fonera-mp3
24 DESCRIPTION:=Daemon to drive a vs1011X mp3 decoder attached to the \
25 fonera gpio pins
26 endef
27
28 define Build/Prepare
29 mkdir -p $(PKG_BUILD_DIR)
30 $(CP) ./src/* $(PKG_BUILD_DIR)/
31 endef
32
33 define Build/Compile
34 $(MAKE) -C $(PKG_BUILD_DIR) \
35 $(TARGET_CONFIGURE_OPTS) \
36 CFLAGS="$(TARGET_CFLAGS)"
37 $(MAKE) -C $(PKG_BUILD_DIR)/cgi \
38 $(TARGET_CONFIGURE_OPTS) \
39 CFLAGS="$(TARGET_CFLAGS) -I $(STAGING_DIR)/usr/include/json" \
40 LDLIBS="$(STAGING_DIR)/usr/lib/libjson.a"
41 $(MAKE) -C $(PKG_BUILD_DIR)/cli \
42 $(TARGET_CONFIGURE_OPTS) \
43 CFLAGS="$(TARGET_CFLAGS)"
44 endef
45
46 define Package/fonera-mp3d/install
47 $(INSTALL_DIR) $(1)/usr/bin
48 $(INSTALL_BIN) $(PKG_BUILD_DIR)/mp3d $(1)/usr/bin/
49 $(INSTALL_BIN) $(PKG_BUILD_DIR)/cli/mplay $(1)/usr/bin/
50 $(INSTALL_DIR) $(1)/www/cgi-bin
51 $(INSTALL_DIR) $(1)/www/local
52 $(INSTALL_BIN) $(PKG_BUILD_DIR)/cgi/{stylesheet.css,json.js} $(1)/www/local
53 $(INSTALL_BIN) $(PKG_BUILD_DIR)/cgi/mp3.cgi $(1)/www/cgi-bin
54 ln -s mp3.cgi $(1)/www/cgi-bin/mp3_cmd.cgi
55 ln -s mp3.cgi $(1)/www/cgi-bin/mp3_json.cgi
56 ln -s mp3.cgi $(1)/www/cgi-bin/mp3_remote.cgi
57 endef
58
59 $(eval $(call BuildPackage,fonera-mp3d))