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.

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