[packages] boblight libc++ fix
[packages.git] / utils / boblight / Makefile
1 #
2 # Copyright (C) 2011-2012 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:=412
12 PKG_VERSION:=$(PKG_REV)
13 PKG_RELEASE:=1
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)/uclibc++.mk
24 include $(INCLUDE_DIR)/package.mk
25
26 define Package/boblight/Default
27   SECTION:=utils
28   CATEGORY:=Utilities
29   TITLE:=Tools for driving lights connected to an external controller
30   URL:=http://code.google.com/p/boblight/
31   DEPENDS:=+librt $(CXX_DEPENDS)
32 endef
33
34 define Package/boblight/Default/description
35   Its main purpose is to create light effects from an external input, such as a
36   video stream (desktop capture, video player, tv card), an audio stream (jack,
37   alsa), or user input (lirc, http). Currently it only handles video input by
38   desktop capture with xlib, video capture from v4l/v4l2 devices and user input
39   from the commandline with boblight-constant.
40
41   Boblight uses a client/server model, where clients are responsible for
42   translating an external input to light data, and boblightd is responsible for
43   translating the light data into commands for external light controllers.
44 endef
45
46 define Package/boblight-client
47   $(call Package/boblight/Default)
48   SECTION:=utils
49   CATEGORY:=Utilities
50   TITLE+= (constant color client)
51   DEPENDS+= +libboblight
52 endef
53
54 define Package/boblight-client/description
55   $(call Package/boblight/Default/description)
56
57   This package contains the boblight constant color client.
58 endef
59
60 define Package/boblight-daemon
61   $(call Package/boblight/Default)
62   SECTION:=utils
63   CATEGORY:=Utilities
64   TITLE+= (daemon)
65   DEPENDS+= +libboblight
66 endef
67
68 define Package/boblight-daemon/conffiles
69 /etc/boblight.conf
70 endef
71
72 define Package/boblight-daemon/description
73   $(call Package/boblight/Default/description)
74
75   This package contains the boblight daemon.
76 endef
77
78 define Package/libboblight
79   $(call Package/boblight/Default)
80   SECTION:=libs
81   CATEGORY:=Libraries
82   TITLE+= (library)
83 endef
84
85 define Package/libboblight/description
86   $(call Package/boblight/Default/description)
87
88   This package contains the libboblight shared library.
89 endef
90
91 CONFIGURE_ARGS += \
92         --without-portaudio \
93         --without-x11
94
95
96 define Build/InstallDev
97         $(INSTALL_DIR) $(1)/usr/include/libboblight
98         $(CP) $(PKG_INSTALL_DIR)/usr/include/libboblight $(1)/usr/include/
99         $(INSTALL_DIR) $(1)/usr/lib
100         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libboblight.{a,so*} $(1)/usr/lib/
101 endef
102
103 define Package/boblight-client/install
104         $(INSTALL_DIR) $(1)/usr/bin
105         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/boblight-constant $(1)/usr/bin/
106 endef
107
108 define Package/boblight-daemon/install
109         $(INSTALL_DIR) $(1)/etc
110         $(INSTALL_CONF) $(PKG_BUILD_DIR)/boblight.conf $(1)/etc/
111         $(INSTALL_DIR) $(1)/etc/init.d
112         $(INSTALL_BIN) ./files/boblight.init $(1)/etc/init.d/boblight
113         $(INSTALL_DIR) $(1)/usr/bin
114         $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/boblightd $(1)/usr/bin/
115 endef
116
117 define Package/libboblight/install
118         $(INSTALL_DIR) $(1)/usr/lib
119         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libboblight.so* $(1)/usr/lib/
120 endef
121
122 $(eval $(call BuildPackage,boblight-client))
123 $(eval $(call BuildPackage,boblight-daemon))
124 $(eval $(call BuildPackage,libboblight))