2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 # $Id: Makefile 8444 2007-08-20 16:12:24Z nbd $
9 include $(TOPDIR
)/rules.mk
15 PKG_BUILD_DEPENDS
:=libjson
17 include $(INCLUDE_DIR
)/package.mk
19 define Package
/fonera-mp3d
22 DEPENDS
:=@TARGET_atheros
23 TITLE
:=Daemon for fonera-mp3
26 define Package
/fonera-mp3d
/description
27 Daemon to drive a vs1011X mp3 decoder attached to the
32 mkdir
-p
$(PKG_BUILD_DIR
)
33 $(CP
) .
/src
/* $(PKG_BUILD_DIR
)/
37 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
38 $(TARGET_CONFIGURE_OPTS
) \
39 CFLAGS
="$(TARGET_CFLAGS)"
40 $(MAKE
) -C
$(PKG_BUILD_DIR
)/cgi \
41 $(TARGET_CONFIGURE_OPTS
) \
42 CFLAGS
="$(TARGET_CFLAGS) -I $(STAGING_DIR)/usr/include/json" \
43 LDLIBS
="$(STAGING_DIR)/usr/lib/libjson.a"
44 $(MAKE
) -C
$(PKG_BUILD_DIR
)/cli \
45 $(TARGET_CONFIGURE_OPTS
) \
46 CFLAGS
="$(TARGET_CFLAGS)"
49 define Package
/fonera-mp3d
/install
50 $(INSTALL_DIR
) $(1)/usr
/bin
51 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/mp3d
$(1)/usr
/bin
/
52 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/cli
/mplay
$(1)/usr
/bin
/
53 $(INSTALL_DIR
) $(1)/www
/cgi-bin
54 $(INSTALL_BIN
) $(PKG_BUILD_DIR
)/cgi
/mp3.cgi
$(1)/www
/cgi-bin
/
55 ln
-sf mp3.cgi
$(1)/www
/cgi-bin
/mp3_cmd.cgi
56 ln
-sf mp3.cgi
$(1)/www
/cgi-bin
/mp3_json.cgi
57 ln
-sf mp3.cgi
$(1)/www
/cgi-bin
/mp3_remote.cgi
58 $(INSTALL_DIR
) $(1)/www
/local
59 $(INSTALL_DATA
) $(PKG_BUILD_DIR
)/cgi
/{stylesheet.css
,json.js
} $(1)/www
/local
/
60 $(INSTALL_DIR
) $(1)/etc
/init.d
61 $(INSTALL_BIN
) .
/files
/mp3d.init
$(1)/etc
/init.d
/mp3d
64 $(eval
$(call BuildPackage
,fonera-mp3d
))