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.

233 lines
5.5 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.10.5
  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:=http://gstreamer.freedesktop.org/src/gstreamer/
  18. PKG_HASH:=bc06243600817f637029da29d089d5908d1d266542f68bf6626a10c5f05f1f1d
  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-examples \
  94. --disable-tests \
  95. --disable-valgrind \
  96. --disable-gst-tracer-hooks \
  97. --without-libiconv-prefix \
  98. --without-libintl-prefix \
  99. --without-x \
  100. EXTRA_LDFLAGS+= \
  101. -Wl,-rpath-link=$(STAGING_DIR)/usr/lib \
  102. $(if $(ICONV_FULL),-liconv)
  103. define Build/InstallDev
  104. $(INSTALL_DIR) $(1)/usr/include/gstreamer-$(GST_VERSION)
  105. ( cd $(PKG_INSTALL_DIR); $(CP) \
  106. ./usr/include/gstreamer-$(GST_VERSION)/* \
  107. $(1)/usr/include/gstreamer-$(GST_VERSION)/ \
  108. )
  109. $(INSTALL_DIR) $(1)/usr/lib
  110. ( cd $(PKG_INSTALL_DIR); $(CP) \
  111. ./usr/lib/libgst*-$(GST_VERSION).{a,la,so*} \
  112. $(1)/usr/lib/ \
  113. )
  114. $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
  115. ( cd $(PKG_INSTALL_DIR); $(CP) \
  116. ./usr/lib/gstreamer-$(GST_VERSION)/libgst*.{la,so} \
  117. $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
  118. )
  119. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  120. ( cd $(PKG_INSTALL_DIR); $(CP) \
  121. ./usr/lib/pkgconfig/gstreamer*-$(GST_VERSION).pc \
  122. $(1)/usr/lib/pkgconfig/ \
  123. )
  124. $(INSTALL_DIR) $(2)/share/aclocal
  125. ( cd $(PKG_INSTALL_DIR); $(CP) \
  126. ./usr/share/aclocal/* \
  127. $(2)/share/aclocal/ \
  128. )
  129. endef
  130. define Package/gstreamer1/install
  131. true
  132. endef
  133. define Package/gstreamer1-libs/install
  134. true
  135. endef
  136. define Package/gstreamer1-utils/install
  137. $(INSTALL_DIR) $(1)/usr/bin
  138. ( cd $(PKG_INSTALL_DIR); $(CP) \
  139. ./usr/bin/gst-launch* \
  140. ./usr/bin/gst-inspect* \
  141. ./usr/bin/gst-typefind* \
  142. $(1)/usr/bin/ \
  143. )
  144. endef
  145. define Package/libgstreamer1/install
  146. $(INSTALL_DIR) $(1)/usr/lib
  147. ( cd $(PKG_INSTALL_DIR); $(CP) \
  148. ./usr/lib/libgstbase-$(GST_VERSION).so.* \
  149. ./usr/lib/libgstreamer-$(GST_VERSION).so.* \
  150. $(1)/usr/lib/ \
  151. )
  152. $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
  153. ( cd $(PKG_INSTALL_DIR); $(CP) \
  154. ./usr/lib/gstreamer-$(GST_VERSION)/libgst*.so \
  155. $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
  156. )
  157. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gstreamer-$(GST_VERSION)/gst-plugin-scanner \
  158. $(1)/usr/lib/gstreamer-$(GST_VERSION)
  159. endef
  160. # 1: short name
  161. # 2: description
  162. # 3: dependencies on other gstreamer libraries (short name)
  163. # 4: dependencies on other packages
  164. define GstBuildLibrary
  165. define Package/libgst1$(1)
  166. $(call Package/gstreamer1/Default)
  167. TITLE+= $(2) library (core)
  168. DEPENDS+= +libgstreamer1 $$(foreach p,$(3),+libgst1$$(p)) $(4)
  169. HIDDEN:=1
  170. endef
  171. define Package/libgst1$(1)/description
  172. $(call Package/gstreamer1/description/Default)
  173. .
  174. This package contains the GStreamer $(2) library.
  175. endef
  176. define Package/libgst1$(1)/install
  177. $(INSTALL_DIR) $$(1)/usr/lib
  178. ( cd $(PKG_INSTALL_DIR); $(CP) \
  179. ./usr/lib/libgst$(1)-$(GST_VERSION).so.* \
  180. $$(1)/usr/lib/ \
  181. )
  182. endef
  183. $$(eval $$(call BuildPackage,libgst1$(1)))
  184. endef
  185. $(eval $(call GstBuildLibrary,check,check unit testing))
  186. $(eval $(call GstBuildLibrary,controller,dynamic parameter control))
  187. $(eval $(call GstBuildLibrary,net,network classes))
  188. $(eval $(call BuildPackage,libgstreamer1))
  189. $(eval $(call BuildPackage,gstreamer1-libs))
  190. $(eval $(call BuildPackage,gstreamer1-utils))
  191. $(eval $(call BuildPackage,gstreamer1))