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.1 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.1
  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:=9bb119ee422c8e7a053c309256215a8899dfd6707f6b93496e6facea7978ac7c
  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. -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,--as-needed
  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))