boblight: update to boblight 478
[packages.git] / utils / boblight / Makefile
1 #
2 # Copyright (C) 2011-2013 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=boblight
11 PKG_REV:=478
12 PKG_VERSION:=$(PKG_REV)
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=http://boblight.googlecode.com/svn/trunk
17 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
18 PKG_SOURCE_PROTO:=svn
19 PKG_SOURCE_VERSION:=$(PKG_REV)
20
21 PKG_INSTALL:=1
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/boblight/Default
26   SECTION:=utils
27   CATEGORY:=Utilities
28   TITLE:=Tools for driving lights connected to an external controller
29   URL:=http://code.google.com/p/boblight/
30   DEPENDS:=+librt +libstdcpp
31 endef
32
33 define Package/boblight/Default/description
34   Its main purpose is to create light effects from an external input, such as a
35   video stream (desktop capture, video player, tv card), an audio stream (jack,
36   alsa), or user input (lirc, http). Currently it only handles video input by
37   desktop capture with xlib, video capture from v4l/v4l2 devices and user input
38   from the commandline with boblight-constant.
39
40   Boblight uses a client/server model, where clients are responsible for
41   translating an external input to light data, and boblightd is responsible for
42   translating the light data into commands for external light controllers.
43 endef
44
45 define Package/boblight-client
46   $(call Package/boblight/Default)
47   SECTION:=utils
48   CATEGORY:=Utilities
49   TITLE+= (constant color client)
50   DEPENDS+= +libboblight
51 endef
52
53 define Package/boblight-client/description
54   $(call Package/boblight/Default/description)
55
56   This package contains the boblight constant color client.
57 endef
58
59 define Package/boblight-daemon
60   $(call Package/boblight/Default)
61   SECTION:=utils
62   CATEGORY:=Utilities
63   TITLE+= (daemon)
64   DEPENDS+= +libboblight +libusb-1.0
65 endef
66
67 define Package/boblight-daemon/conffiles
68 /etc/boblight.conf
69 endef
70
71 define Package/boblight-daemon/description
72   $(call Package/boblight/Default/description)
73
74   This package contains the boblight daemon.
75 endef
76
77 define Package/libboblight
78   $(call Package/boblight/Default)
79   SECTION:=libs
80   CATEGORY:=Libraries
81   TITLE+= (library)
82 endef
83
84 define Package/libboblight/description
85   $(call Package/boblight/Default/description)
86
87   This package contains the libboblight shared library.
88 endef
89
90 CONFIGURE_ARGS += \
91         --without-portaudio \
92         --without-x11
93
94
95 define Build/InstallDev
96         $(INSTALL_DIR) $(1)/usr/include/libboblight
97         $(CP) $(PKG_INSTALL_DIR)/usr/include/libboblight $(1)/usr/include/
98         $(INSTALL_DIR) $(1)/usr/lib
99         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libboblight.{a,so*} $(1)/usr/lib/
100 endef
101
102 define Package/boblight-client/install
103         $(INSTALL_DIR) $(1)/usr/bin
104         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/boblight-constant $(1)/usr/bin/
105 endef
106
107 define Package/boblight-daemon/install
108         $(INSTALL_DIR) $(1)/etc
109         $(INSTALL_CONF) $(PKG_BUILD_DIR)/boblight.conf $(1)/etc/
110         $(INSTALL_DIR) $(1)/etc/init.d
111         $(INSTALL_BIN) ./files/boblight.init $(1)/etc/init.d/boblight
112         $(INSTALL_DIR) $(1)/usr/bin
113         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/boblightd $(1)/usr/bin/
114 endef
115
116 define Package/libboblight/install
117         $(INSTALL_DIR) $(1)/usr/lib
118         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libboblight.so* $(1)/usr/lib/
119 endef
120
121 $(eval $(call BuildPackage,boblight-client))
122 $(eval $(call BuildPackage,boblight-daemon))
123 $(eval $(call BuildPackage,libboblight))