Make ipkg depends on tar and gunzip (#2821)
[openwrt.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:=@TARGET_atheros
23 TITLE:=Daemon for fonera-mp3
24 endef
25
26 define Package/fonera-mp3d/description
27 Daemon to drive a vs1011X mp3 decoder attached to the
28 fonera gpio pins
29 endef
30
31 define Build/Prepare
32 mkdir -p $(PKG_BUILD_DIR)
33 $(CP) ./src/* $(PKG_BUILD_DIR)/
34 endef
35
36 define Build/Compile
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)"
47 endef
48
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
62 endef
63
64 $(eval $(call BuildPackage,fonera-mp3d))
This page took 0.052459 seconds and 5 git commands to generate.