packages: xupnpd: add new package
[packages.git] / multimedia / xupnpd / Makefile
1 #
2 # Copyright (C) 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:=xupnpd
11 PKG_REV:=387
12 PKG_VERSION:=$(PKG_REV)
13 PKG_RELEASE:=5
14
15 PKG_SOURCE_PROTO:=svn
16 PKG_SOURCE_VERSION:=$(PKG_REV)
17 PKG_SOURCE_SUBDIR:=xupnpd-$(PKG_VERSION)
18 PKG_SOURCE_URL:=http://tsdemuxer.googlecode.com/svn/trunk/xupnpd/src/
19 PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz
20
21 include $(INCLUDE_DIR)/package.mk
22
23 LUA_FLAGS:=-llua
24
25 define Build/Compile
26         (cd $(PKG_BUILD_DIR); $(TARGET_CC) -v $(LUA_FLAGS) $(TARGET_CFLAGS) -fno-exceptions -fno-rtti -DWITH_URANDOM $(TARGET_CPPFLAGS) $(TARGET_LDFLAGS) -lm -ldl -lcrypt -o xupnpd *.c *.cpp)
27 endef
28
29 define Package/xupnpd
30   SECTION:=multimedia
31   CATEGORY:=Multimedia
32   DEPENDS:=+liblua
33   TITLE:=eXtensible UPnP agent
34   URL:=http://xupnpd.org/
35 endef
36
37 define Package/xupnpd/conffiles
38 /usr/share/xupnpd/xupnpd.lua
39 /usr/share/xupnpd/config
40 /usr/share/xupnpd/playlists
41 endef
42
43 define Package/xupnpd/description
44 xupnpd - eXtensible UPnP agent
45 This program is a light DLNA Media Server which provides ContentDirectory:1 service for sharing IPTV unicast streams over local area network (with udpxy for multicast to HTTP unicast conversion).
46 The program shares UTF8-encoded M3U playlists with links over local area network as content of the directory.
47 You can watch HDTV broadcasts (multicast or unicast) and listen Internet Radio in IP network without transcoding and PC.
48 endef
49
50 define Package/xupnpd/install
51         $(INSTALL_DIR) $(1)/usr/bin
52         $(INSTALL_BIN) $(PKG_BUILD_DIR)/xupnpd $(1)/usr/bin
53         $(INSTALL_DIR) $(1)/etc/init.d
54         $(INSTALL_BIN) ./files/xupnpd.init $(1)/etc/init.d/xupnpd
55         $(INSTALL_DIR) $(1)/usr/share/xupnpd
56         $(CP) $(PKG_BUILD_DIR)/*.lua $(1)/usr/share/xupnpd
57         $(INSTALL_DIR) $(1)/usr/share/xupnpd/ui
58         $(CP) $(PKG_BUILD_DIR)/ui/* $(1)/usr/share/xupnpd/ui
59         $(INSTALL_DIR) $(1)/usr/share/xupnpd/www
60         $(CP) $(PKG_BUILD_DIR)/www/* $(1)/usr/share/xupnpd/www
61         $(INSTALL_DIR) $(1)/usr/share/xupnpd/playlists
62         $(INSTALL_DIR) $(1)/usr/share/xupnpd/plugins
63         $(CP) $(PKG_BUILD_DIR)/plugins/* $(1)/usr/share/xupnpd/plugins
64         $(INSTALL_DIR) $(1)/usr/share/xupnpd/config
65         $(INSTALL_DIR) $(1)/etc/xupnpd
66         (cd $(1)/etc/xupnpd; ln -s ../../usr/share/xupnpd/config ./; ln -s ../../usr/share/xupnpd/xupnpd.lua ./)
67         $(INSTALL_DIR) $(1)/usr/share/xupnpd/localmedia
68 endef
69
70 $(eval $(call BuildPackage,xupnpd))