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.

236 lines
5.6 KiB

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