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.

228 lines
5.3 KiB

  1. #
  2. # Copyright (C) 2008-2014 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.2.3
  10. PKG_RELEASE:=2
  11. PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
  12. PKG_LICENSE:=LGPLv2
  13. PKG_LICENSE_FILE:=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:=8155b9c7574ccaa361cc504e8e0e72dc
  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. endef
  133. define Package/gstreamer1-utils/install
  134. $(INSTALL_DIR) $(1)/usr/bin
  135. ( cd $(PKG_INSTALL_DIR); $(CP) \
  136. ./usr/bin/gst-launch* \
  137. ./usr/bin/gst-inspect* \
  138. ./usr/bin/gst-typefind* \
  139. $(1)/usr/bin/ \
  140. )
  141. endef
  142. define Package/libgstreamer1/install
  143. $(INSTALL_DIR) $(1)/usr/lib
  144. ( cd $(PKG_INSTALL_DIR); $(CP) \
  145. ./usr/lib/libgstbase-$(GST_VERSION).so.* \
  146. ./usr/lib/libgstreamer-$(GST_VERSION).so.* \
  147. $(1)/usr/lib/ \
  148. )
  149. $(INSTALL_DIR) $(1)/usr/lib/gstreamer-$(GST_VERSION)
  150. ( cd $(PKG_INSTALL_DIR); $(CP) \
  151. ./usr/lib/gstreamer-$(GST_VERSION)/libgst*.so \
  152. $(1)/usr/lib/gstreamer-$(GST_VERSION)/ \
  153. )
  154. endef
  155. # 1: short name
  156. # 2: description
  157. # 3: dependencies on other gstreamer libraries (short name)
  158. # 4: dependencies on other packages
  159. define GstBuildLibrary
  160. define Package/libgst1$(1)
  161. $(call Package/gstreamer1/Default)
  162. TITLE+= $(2) library (core)
  163. DEPENDS+= +libgstreamer1 $$(foreach p,$(3),+libgst1$$(p)) $(4)
  164. HIDDEN:=1
  165. endef
  166. define Package/libgst1$(1)/description
  167. $(call Package/gstreamer1/description/Default)
  168. .
  169. This package contains the GStreamer $(2) library.
  170. endef
  171. define Package/libgst1$(1)/install
  172. $(INSTALL_DIR) $$(1)/usr/lib
  173. ( cd $(PKG_INSTALL_DIR); $(CP) \
  174. ./usr/lib/libgst$(1)-$(GST_VERSION).so.* \
  175. $$(1)/usr/lib/ \
  176. )
  177. endef
  178. $$(eval $$(call BuildPackage,libgst1$(1)))
  179. endef
  180. $(eval $(call GstBuildLibrary,check,check unit testing))
  181. $(eval $(call GstBuildLibrary,controller,dynamic parameter control))
  182. $(eval $(call GstBuildLibrary,net,network classes))
  183. $(eval $(call BuildPackage,libgstreamer1))
  184. $(eval $(call BuildPackage,gstreamer1-libs))
  185. $(eval $(call BuildPackage,gstreamer1-utils))
  186. $(eval $(call BuildPackage,gstreamer1))