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.

239 lines
5.7 KiB

  1. #
  2. # Copyright (C) 2008-2016 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:=gstreamer1
  9. PKG_VERSION:=1.15.2
  10. PKG_RELEASE:=1
  11. PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org> \
  12. Ted Hess <thess@kitschensync.net>
  13. PKG_LICENSE:=LGPLv2
  14. PKG_LICENSE_FILES:=COPYING
  15. PKG_BUILD_DIR:=$(BUILD_DIR)/gstreamer-$(PKG_VERSION)
  16. PKG_SOURCE:=gstreamer-$(PKG_VERSION).tar.xz
  17. PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gstreamer
  18. PKG_HASH:=27a3211eb5c3f6929c5f123ffecaac0ea6e9ed6b93be879c033a7d5af13ad7e6
  19. PKG_FIXUP:=autoreconf
  20. PKG_REMOVE_FILES:=autogen.sh aclocal.m4
  21. PKG_INSTALL:=1
  22. include $(INCLUDE_DIR)/package.mk
  23. include $(INCLUDE_DIR)/nls.mk
  24. define Package/gstreamer1/Default
  25. CATEGORY:=Multimedia
  26. SECTION:=multimedia
  27. TITLE:=GStreamer
  28. URL:=http://gstreamer.freedesktop.org/
  29. DEPENDS:= $(ICONV_DEPENDS) $(INTL_DEPENDS)
  30. endef
  31. define Package/gstreamer1/description/Default
  32. GStreamer open source multimedia framework
  33. endef
  34. GSTREAMER_CORE_LIBS:= \
  35. libgstreamer1 \
  36. libgst1check \
  37. libgst1controller \
  38. libgst1net
  39. define Package/gstreamer1
  40. $(call Package/gstreamer1/Default)
  41. TITLE+= (All libraries)
  42. DEPENDS:= $(foreach lib,$(GSTREAMER_CORE_LIBS),+$(lib))
  43. HIDDEN:=1
  44. endef
  45. define Package/gstreamer1-libs/description
  46. $(call Package/gstreamer1/description/Default)
  47. .
  48. This meta package contains only dependencies on the other GStreamer
  49. componenents.
  50. endef
  51. define Package/gstreamer1-libs
  52. $(call Package/gstreamer1/Default)
  53. TITLE+= core libraries
  54. DEPENDS+=+ALL:gstreamer1
  55. endef
  56. define Package/gstreamer1-libs/config
  57. menu "Select GStreamer libraries"
  58. depends on PACKAGE_gstreamer1-libs
  59. config gstreamer1-all
  60. bool "Include all GStreamer1 core libraries"
  61. select PACKAGE_gstreamer1
  62. comment "Libraries"
  63. $(foreach lib,$(GSTREAMER_CORE_LIBS), \
  64. config PACKAGE_$(lib)
  65. prompt "GStreamer core library $(lib)"
  66. )
  67. endmenu
  68. endef
  69. define Package/gstreamer1-utils
  70. $(call Package/gstreamer1/Default)
  71. TITLE+= utilities
  72. DEPENDS+= +libgstreamer1 +gstreamer1-libs
  73. endef
  74. define Package/gstreamer1-utils/description
  75. $(call Package/gstreamer1/description/Default)
  76. .
  77. This package contains the GStreamer utilities.
  78. endef
  79. define Package/libgstreamer1
  80. $(call Package/gstreamer1/Default)
  81. TITLE+= library (core)
  82. DEPENDS+= +glib2 +libpthread +libxml2
  83. HIDDEN:=1
  84. endef
  85. define Package/libgstreamer1/description
  86. $(call Package/gstreamer1/description/Default)
  87. .
  88. This package contains the GStreamer core library.
  89. endef
  90. GST_VERSION:=1.0
  91. CONFIGURE_ARGS += \
  92. --enable-static \
  93. --disable-benchmarks \
  94. --disable-examples \
  95. --disable-failing-tests \
  96. --disable-fatal-warnings \
  97. --disable-introspection \
  98. --disable-gst-tracer-hooks \
  99. --disable-gtk-doc-html \
  100. --disable-tests \
  101. --disable-valgrind \
  102. --without-dw \
  103. --without-libiconv-prefix \
  104. --without-libintl-prefix \
  105. --without-unwind
  106. EXTRA_LDFLAGS+= \
  107. -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
  108. $(if $(ICONV_FULL),-liconv)
  109. define Build/InstallDev
  110. $(INSTALL_DIR) $(1)/usr/include/gstreamer-$(GST_VERSION)
  111. ( cd $(PKG_INSTALL_DIR); $(CP) \
  112. ./usr/include/gstreamer-$(GST_VERSION)/* \
  113. $(1)/usr/include/gstreamer-$(GST_VERSION)/ \
  114. )
  115. $(INSTALL_DIR) $(1)/usr/lib
  116. ( cd $(PKG_INSTALL_DIR); $(CP) \
  117. ./usr/lib/libgst*-$(GST_VERSION).{a,la,so*} \
  118. $(1)/usr/lib/ \
  119. )
  120. $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
  121. ( cd $(PKG_INSTALL_DIR); $(CP) \
  122. ./usr/lib/gstreamer-$(GST_VERSION)/libgst*.{la,so} \
  123. $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
  124. )
  125. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  126. ( cd $(PKG_INSTALL_DIR); $(CP) \
  127. ./usr/lib/pkgconfig/gstreamer*-$(GST_VERSION).pc \
  128. $(1)/usr/lib/pkgconfig/ \
  129. )
  130. $(INSTALL_DIR) $(2)/share/aclocal
  131. ( cd $(PKG_INSTALL_DIR); $(CP) \
  132. ./usr/share/aclocal/* \
  133. $(2)/share/aclocal/ \
  134. )
  135. endef
  136. define Package/gstreamer1/install
  137. true
  138. endef
  139. define Package/gstreamer1-libs/install
  140. true
  141. endef
  142. define Package/gstreamer1-utils/install
  143. $(INSTALL_DIR) $(1)/usr/bin
  144. ( cd $(PKG_INSTALL_DIR); $(CP) \
  145. ./usr/bin/gst-launch* \
  146. ./usr/bin/gst-inspect* \
  147. ./usr/bin/gst-typefind* \
  148. $(1)/usr/bin/ \
  149. )
  150. endef
  151. define Package/libgstreamer1/install
  152. $(INSTALL_DIR) $(1)/usr/lib
  153. ( cd $(PKG_INSTALL_DIR); $(CP) \
  154. ./usr/lib/libgstbase-$(GST_VERSION).so.* \
  155. ./usr/lib/libgstreamer-$(GST_VERSION).so.* \
  156. $(1)/usr/lib/ \
  157. )
  158. $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
  159. ( cd $(PKG_INSTALL_DIR); $(CP) \
  160. ./usr/lib/gstreamer-$(GST_VERSION)/libgst*.so \
  161. $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
  162. )
  163. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gstreamer-$(GST_VERSION)/gst-plugin-scanner \
  164. $(1)/usr/lib/gstreamer-$(GST_VERSION)
  165. endef
  166. # 1: short name
  167. # 2: description
  168. # 3: dependencies on other gstreamer libraries (short name)
  169. # 4: dependencies on other packages
  170. define GstBuildLibrary
  171. define Package/libgst1$(1)
  172. $(call Package/gstreamer1/Default)
  173. TITLE+= $(2) library (core)
  174. DEPENDS+= +libgstreamer1 $$(foreach p,$(3),+libgst1$$(p)) $(4)
  175. HIDDEN:=1
  176. endef
  177. define Package/libgst1$(1)/description
  178. $(call Package/gstreamer1/description/Default)
  179. .
  180. This package contains the GStreamer $(2) library.
  181. endef
  182. define Package/libgst1$(1)/install
  183. $(INSTALL_DIR) $$(1)/usr/lib
  184. ( cd $(PKG_INSTALL_DIR); $(CP) \
  185. ./usr/lib/libgst$(1)-$(GST_VERSION).so.* \
  186. $$(1)/usr/lib/ \
  187. )
  188. endef
  189. $$(eval $$(call BuildPackage,libgst1$(1)))
  190. endef
  191. $(eval $(call GstBuildLibrary,check,check unit testing))
  192. $(eval $(call GstBuildLibrary,controller,dynamic parameter control))
  193. $(eval $(call GstBuildLibrary,net,network classes))
  194. $(eval $(call BuildPackage,libgstreamer1))
  195. $(eval $(call BuildPackage,gstreamer1-libs))
  196. $(eval $(call BuildPackage,gstreamer1-utils))
  197. $(eval $(call BuildPackage,gstreamer1))