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.

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