Makefile 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #
  2. # Copyright (C) 2010-2014 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=minidlna
  9. PKG_VERSION:=1.1.5
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=@SF/minidlna
  13. PKG_MD5SUM:=1970e553a1eb8a3e7e302e2ce292cbc4
  14. PKG_LICENSE:=GPL-2.0 BSD-3-Clause
  15. PKG_LICENSE_FILES:=COPYING LICENCE.miniupnpd
  16. PKG_MAINTAINER:=Knyazkov Dmitry <medavedik@gmail.com>
  17. PKG_BUILD_PARALLEL:=0
  18. PKG_BUILD_DEPENDS:=util-linux
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/nls.mk
  21. define Package/minidlna
  22. SECTION:=multimedia
  23. CATEGORY:=Multimedia
  24. TITLE:=UPnP A/V & DLNA Media Server
  25. URL:=http://minidlna.sourceforge.net/
  26. DEPENDS:= +libpthread +libexif +libjpeg +libsqlite3 +libffmpeg \
  27. +libid3tag +libflac +libvorbis +libuuid \
  28. $(ICONV_DEPENDS) $(INTL_DEPENDS)
  29. endef
  30. define Package/minidlna/description
  31. MiniDLNA (aka ReadyDLNA) is server software with the aim of
  32. being fully compliant with DLNA/UPnP-AV clients.
  33. endef
  34. define Package/minidlna/conffiles
  35. /etc/config/minidlna
  36. endef
  37. TARGET_CPPFLAGS += \
  38. -I$(STAGING_DIR)/usr/include \
  39. -I$(STAGING_DIR)/usr/include/FLAC \
  40. -I$(STAGING_DIR)/usr/include/libexif \
  41. -I$(STAGING_DIR)/usr/include/uuid \
  42. -I$(STAGING_DIR)/usr/include/vorbis \
  43. -I$(ICONV_PREFIX)/include \
  44. -I$(INTL_PREFIX)/include \
  45. -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 \
  46. TARGET_LDFLAGS += \
  47. -L$(ICONV_PREFIX)/lib \
  48. -L$(INTL_PREFIX)/lib \
  49. -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
  50. MAKE_FLAGS +=\
  51. CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
  52. LDFLAGS="$(TARGET_LDFLAGS)" \
  53. ICONV_LIBS="-liconv $(if $(INTL_FULL),-lintl)" \
  54. CONFIGURE_ARGS +=\
  55. --with-libiconv-prefix="$(ICONV_PREFIX)" \
  56. --with-libintl-prefix="$(INTL_PREFIX)" \
  57. --with-os-name="OpenWrt Linux" \
  58. --with-os-version="$(LINUX_VERSION)" \
  59. --with-os-url="http://openwrt.org/" \
  60. --with-db-path="/var/run/minidlna" \
  61. --with-log-path="/var/log" \
  62. define Package/minidlna/install
  63. $(INSTALL_DIR) $(1)/usr/bin
  64. $(INSTALL_BIN) $(PKG_BUILD_DIR)/minidlnad $(1)/usr/bin/minidlna
  65. $(INSTALL_DIR) $(1)/etc/init.d
  66. $(INSTALL_BIN) ./files/minidlna.init $(1)/etc/init.d/minidlna
  67. $(INSTALL_DIR) $(1)/etc/config
  68. $(INSTALL_CONF) ./files/minidlna.config $(1)/etc/config/minidlna
  69. endef
  70. $(eval $(call BuildPackage,minidlna))