[packages] pianobar: add pianobar, a pandora radio client (#10583, thanks lnxsrt)
[openwrt/svn-archive/archive.git] / sound / pianobar / Makefile
1 #
2 # Copyright (C) 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:=pianobar
11 PKG_VERSION:=2012.01.10
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
15 PKG_SOURCE_URL:=http://6xq.net/static/projects/pianobar
16 PKG_MD5SUM:=448c57d65c71158674e8b30a8cfa217e
17
18 PKG_BUILD_DEPENDS:=libao libfaad2 libmad
19 PKG_INSTALL:=1
20
21 include $(INCLUDE_DIR)/package.mk
22
23 define Package/pianobar/Default
24 DEPENDS:=+libgnutls
25 TITLE:=Pandora radio
26 URL:=http://6xq.net/projects/pianobar/
27 endef
28
29 define Package/pianobar/Default/description
30 Pianobar is a free/open-source, console-based replacement for Pandora’s flash
31 player.
32 endef
33
34 define Package/pianobar
35 $(call Package/pianobar/Default)
36 SECTION:=sound
37 CATEGORY:=Sound
38 DEPENDS+= +libao +libfaad2 +libmad +libpiano +libpthread
39 TITLE+= console client
40 endef
41
42 define Package/pianobar/description
43 $(call Package/pianobar/Default/description)
44 endef
45
46 define Package/libpiano
47 $(call Package/pianobar/Default)
48 SECTION:=libs
49 CATEGORY:=Libraries
50 TITLE+= library
51 endef
52
53 define Package/libpiano/description
54 $(call Package/pianobar/Default/description)
55 This package contains the libpiano shared library.
56 endef
57
58 TARGET_CFLAGS += -std=c99
59
60 MAKE_FLAGS += \
61 DYNLINK="1" \
62 PREFIX="/usr"
63
64 define Build/InstallDev
65 $(INSTALL_DIR) $(1)/usr/include
66 $(CP) $(PKG_INSTALL_DIR)/usr/include/*.h $(1)/usr/include/
67 $(INSTALL_DIR) $(1)/usr/lib
68 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpiano.{a,so*} $(1)/usr/lib/
69 endef
70
71 define Package/pianobar/install
72 $(INSTALL_DIR) $(1)/usr/bin
73 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pianobar $(1)/usr/bin/
74 endef
75
76 define Package/libpiano/install
77 $(INSTALL_DIR) $(1)/usr/lib
78 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpiano.so.* $(1)/usr/lib/
79 endef
80
81 $(eval $(call BuildPackage,pianobar))
82 $(eval $(call BuildPackage,libpiano))