You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
2.3 KiB

  1. #
  2. # Copyright (C) 2011-2020 Entware
  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:=gerbera
  9. PKG_VERSION:=1.6.0
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://codeload.github.com/gerbera/gerbera/tar.gz/v$(PKG_VERSION)?
  13. PKG_HASH:=3a4956ec5fea1101e8daa32d9cfb985db908a49e2ac6137a1b2bf509e2684a6c
  14. PKG_MAINTAINER:=
  15. PKG_LICENSE:=GPL-2.0-or-later
  16. PKG_LICENSE_FILES:=LICENSE.md
  17. PKG_BUILD_DEPENDS:=libmatroska pugixml spdlog taglib
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_CONFIG_DEPENDS:=CONFIG_BUILD_PATENTED
  20. include $(INCLUDE_DIR)/package.mk
  21. include $(INCLUDE_DIR)/cmake.mk
  22. include $(INCLUDE_DIR)/nls.mk
  23. define Package/gerbera
  24. SECTION:=multimedia
  25. CATEGORY:=Multimedia
  26. DEPENDS:=+file +libnpupnp +libsqlite3 +libexif +libuuid +libfmt +BUILD_PATENTED:libffmpeg $(ICONV_DEPENDS)
  27. TITLE:=A free media server
  28. URL:=https://gerbera.io
  29. USERID:=gerbera:gerbera
  30. endef
  31. define Package/gerbera/description
  32. Gerbera - UPnP Media Server based on Mediatomb.
  33. endef
  34. define Package/gerbera/conffiles
  35. /etc/config/gerbera
  36. endef
  37. CMAKE_OPTIONS += \
  38. -DCXX_FILESYSTEM_NO_LINK_NEEDED=$(if $(CONFIG_GCC_USE_VERSION_9),ON,OFF) \
  39. -DCXX_FILESYSTEM_STDCPPFS_NEEDED=$(if $(CONFIG_GCC_USE_VERSION_8),OFF,ON) \
  40. -DIconv_INCLUDE_DIR=$(ICONV_PREFIX)/include \
  41. -DIconv_LIBRARY=$(ICONV_PREFIX)/lib/libiconv.a \
  42. -DWITH_MAGIC=ON \
  43. -DWITH_MYSQL=OFF \
  44. -DWITH_CURL=OFF \
  45. -DWITH_INOTIFY=ON \
  46. -DWITH_JS=OFF \
  47. -DWITH_TAGLIB=ON \
  48. -DWITH_AVCODEC=$(if $(CONFIG_BUILD_PATENTED),ON,OFF) \
  49. -DWITH_FFMPEGTHUMBNAILER=OFF \
  50. -DWITH_EXIF=ON \
  51. -DWITH_EXIV2=OFF \
  52. -DWITH_MATROSKA=ON \
  53. -DWITH_SYSTEMD=OFF \
  54. -DWITH_LASTFM=OFF \
  55. -DWITH_DEBUG=OFF \
  56. -DWITH_TESTS=OFF \
  57. -DWITH_NPUPNP=ON
  58. TARGET_CFLAGS += \
  59. -ffunction-sections \
  60. -fdata-sections \
  61. -flto \
  62. -I$(STAGING_DIR)/usr/include/npupnp/upnp
  63. TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
  64. define Package/gerbera/install
  65. $(INSTALL_DIR) $(1)/usr/bin
  66. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gerbera $(1)/usr/bin
  67. $(INSTALL_DIR) $(1)/usr/share
  68. $(CP) $(PKG_INSTALL_DIR)/usr/share/gerbera $(1)/usr/share
  69. $(INSTALL_DIR) $(1)/etc/config
  70. $(INSTALL_CONF) ./files/gerbera.config $(1)/etc/config/gerbera
  71. $(INSTALL_DIR) $(1)/etc/init.d
  72. $(INSTALL_BIN) ./files/gerbera.init $(1)/etc/init.d/gerbera
  73. endef
  74. $(eval $(call BuildPackage,gerbera))