Merge pull request #950 from salzmdan/master
[feed/packages.git] / multimedia / xupnpd / Makefile
1 #
2 # Copyright (C) 2013-2015 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:=404
12 PKG_VERSION:=$(PKG_REV)
13 PKG_RELEASE:=1
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 PKG_MAINTAINER:=Álvaro Fernández Rojas <noltari@gmail.com>
21
22 include $(INCLUDE_DIR)/package.mk
23
24 LUA_FLAGS:=-llua
25
26 define Build/Compile
27 (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)
28 endef
29
30 define Package/xupnpd
31 SECTION:=multimedia
32 CATEGORY:=Multimedia
33 DEPENDS:=+liblua
34 TITLE:=eXtensible UPnP agent
35 URL:=http://xupnpd.org/
36 endef
37
38 define Package/xupnpd/conffiles
39 /usr/share/xupnpd/xupnpd.lua
40 /usr/share/xupnpd/config
41 /usr/share/xupnpd/playlists
42 endef
43
44 define Package/xupnpd/description
45 xupnpd - eXtensible UPnP agent
46 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).
47 The program shares UTF8-encoded M3U playlists with links over local area network as content of the directory.
48 You can watch HDTV broadcasts (multicast or unicast) and listen Internet Radio in IP network without transcoding and PC.
49 endef
50
51 define Package/xupnpd/install
52 $(INSTALL_DIR) $(1)/usr/bin
53 $(INSTALL_BIN) $(PKG_BUILD_DIR)/xupnpd $(1)/usr/bin
54 $(INSTALL_DIR) $(1)/etc/init.d
55 $(INSTALL_BIN) ./files/xupnpd.init $(1)/etc/init.d/xupnpd
56 $(INSTALL_DIR) $(1)/usr/share/xupnpd
57 $(CP) $(PKG_BUILD_DIR)/*.lua $(1)/usr/share/xupnpd
58 $(INSTALL_DIR) $(1)/usr/share/xupnpd/ui
59 $(CP) $(PKG_BUILD_DIR)/ui/* $(1)/usr/share/xupnpd/ui
60 $(INSTALL_DIR) $(1)/usr/share/xupnpd/www
61 $(CP) $(PKG_BUILD_DIR)/www/* $(1)/usr/share/xupnpd/www
62 $(INSTALL_DIR) $(1)/usr/share/xupnpd/playlists
63 $(INSTALL_DIR) $(1)/usr/share/xupnpd/plugins
64 $(CP) $(PKG_BUILD_DIR)/plugins/* $(1)/usr/share/xupnpd/plugins
65 $(INSTALL_DIR) $(1)/usr/share/xupnpd/config
66 $(INSTALL_DIR) $(1)/etc/xupnpd
67 (cd $(1)/etc/xupnpd; ln -s ../../usr/share/xupnpd/config ./; ln -s ../../usr/share/xupnpd/xupnpd.lua ./)
68 $(INSTALL_DIR) $(1)/usr/share/xupnpd/localmedia
69 endef
70
71 $(eval $(call BuildPackage,xupnpd))