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.

85 lines
2.2 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.9.1
  10. PKG_RELEASE:=$(AUTORELEASE)
  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:=5d323c6cb4150e3454b8c6e0012f41648441799ba44cb59436b124b54d3fc82b
  14. PKG_MAINTAINER:=
  15. PKG_LICENSE:=GPL-2.0-or-later
  16. PKG_LICENSE_FILES:=LICENSE.md
  17. PKG_BUILD_DEPENDS:=libmatroska pugixml spdlog
  18. PKG_CONFIG_DEPENDS:=CONFIG_BUILD_PATENTED
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/nls.mk
  21. include $(INCLUDE_DIR)/cmake.mk
  22. define Package/gerbera
  23. SECTION:=multimedia
  24. CATEGORY:=Multimedia
  25. DEPENDS:=+file +libnpupnp +libsqlite3 +libexif +libuuid +libfmt +libatomic +taglib +BUILD_PATENTED:libffmpeg $(ICONV_DEPENDS)
  26. TITLE:=A free media server
  27. URL:=https://gerbera.io
  28. USERID:=gerbera:gerbera
  29. endef
  30. define Package/gerbera/description
  31. Gerbera - UPnP Media Server based on Mediatomb.
  32. endef
  33. define Package/gerbera/conffiles
  34. /etc/config/gerbera
  35. endef
  36. CMAKE_OPTIONS += \
  37. -DCMAKE_LINK_WHAT_YOU_USE=ON \
  38. -DIconv_INCLUDE_DIR=$(ICONV_PREFIX)/include \
  39. -DIconv_LIBRARY=$(ICONV_PREFIX)/lib/libiconv.a \
  40. -DWITH_MAGIC=ON \
  41. -DWITH_MYSQL=OFF \
  42. -DWITH_CURL=ON \
  43. -DWITH_INOTIFY=ON \
  44. -DWITH_JS=OFF \
  45. -DWITH_TAGLIB=ON \
  46. -DWITH_AVCODEC=$(if $(CONFIG_BUILD_PATENTED),ON,OFF) \
  47. -DWITH_FFMPEGTHUMBNAILER=OFF \
  48. -DWITH_EXIF=ON \
  49. -DWITH_EXIV2=OFF \
  50. -DWITH_MATROSKA=ON \
  51. -DWITH_SYSTEMD=OFF \
  52. -DWITH_LASTFM=OFF \
  53. -DWITH_DEBUG=OFF \
  54. -DWITH_TESTS=OFF \
  55. -DWITH_NPUPNP=ON
  56. TARGET_CFLAGS += \
  57. -ffunction-sections \
  58. -fdata-sections \
  59. -flto
  60. TARGET_LDFLAGS += -Wl,--gc-sections
  61. define Package/gerbera/install
  62. $(INSTALL_DIR) $(1)/usr/bin
  63. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gerbera $(1)/usr/bin
  64. $(INSTALL_DIR) $(1)/usr/share
  65. $(CP) $(PKG_INSTALL_DIR)/usr/share/gerbera $(1)/usr/share
  66. $(INSTALL_DIR) $(1)/etc/config
  67. $(INSTALL_CONF) ./files/gerbera.config $(1)/etc/config/gerbera
  68. $(INSTALL_DIR) $(1)/etc/init.d
  69. $(INSTALL_BIN) ./files/gerbera.init $(1)/etc/init.d/gerbera
  70. endef
  71. $(eval $(call BuildPackage,gerbera))