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.

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