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.

81 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.5.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:=693a99b295bc79d842f036a6d04996d4676ac0791d65f3a1f7aab4badf9fb5ef
  14. PKG_MAINTAINER:=
  15. PKG_LICENSE:=GPL-2.0-or-later
  16. PKG_LICENSE_FILES:=LICENSE.md
  17. PKG_BUILD_DEPENDS:=pugixml spdlog
  18. PKG_BUILD_PARALLEL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/cmake.mk
  21. include $(INCLUDE_DIR)/nls.mk
  22. define Package/gerbera
  23. SECTION:=multimedia
  24. CATEGORY:=Multimedia
  25. DEPENDS:=+file +libupnp +libsqlite3 +libexif +libuuid +libfmt $(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/gerbera/config.xml
  35. endef
  36. CMAKE_OPTIONS += \
  37. -DCXX_FILESYSTEM_NO_LINK_NEEDED=$(if $(CONFIG_GCC_USE_VERSION_9),ON,OFF) \
  38. -DCXX_FILESYSTEM_STDCPPFS_NEEDED=$(if $(CONFIG_GCC_USE_VERSION_8),OFF,ON) \
  39. -DICONV_INCLUDE_DIR=$(ICONV_PREFIX)/include \
  40. -DICONV_LIBRARIES=$(ICONV_PREFIX)/lib/libiconv.a \
  41. -DWITH_MAGIC=ON \
  42. -DWITH_MYSQL=OFF \
  43. -DWITH_CURL=OFF \
  44. -DWITH_INOTIFY=ON \
  45. -DWITH_JS=OFF \
  46. -DWITH_TAGLIB=OFF \
  47. -DWITH_AVCODEC=OFF \
  48. -DWITH_FFMPEGTHUMBNAILER=OFF \
  49. -DWITH_EXIF=ON \
  50. -DWITH_EXIV2=OFF \
  51. -DWITH_MATROSKA=OFF \
  52. -DWITH_SYSTEMD=OFF \
  53. -DWITH_LASTFM=OFF \
  54. -DWITH_DEBUG=OFF \
  55. -DWITH_TESTS=OFF
  56. TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
  57. TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
  58. define Package/gerbera/install
  59. $(INSTALL_DIR) $(1)/usr/bin
  60. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gerbera $(1)/usr/bin
  61. $(INSTALL_DIR) $(1)/usr/share
  62. $(CP) $(PKG_INSTALL_DIR)/usr/share/gerbera $(1)/usr/share
  63. $(INSTALL_DIR) $(1)/etc/config
  64. $(INSTALL_CONF) ./files/gerbera.config $(1)/etc/config/gerbera
  65. $(INSTALL_DIR) $(1)/etc/init.d
  66. $(INSTALL_BIN) ./files/gerbera.init $(1)/etc/init.d/gerbera
  67. endef
  68. $(eval $(call BuildPackage,gerbera))