2 # Copyright (C) 2006-2009 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-export-snapshot-
$(PKG_VERSION
).
tar.bz2
15 PKG_SOURCE_URL
:=http
://downloads.openwrt.org
/sources
/
16 PKG_MD5SUM
:=63aeb859941b96ed3ef7b0c7a643bf4d
18 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-export-2008-04-19
77 file http pipe rtp tcp udp
79 PKG_CONFIG_DEPENDS
:= \
80 $(patsubst %,CONFIG_FFMPEG_ENCODER_
%,$(FFMPEG_ENCODERS
)) \
81 $(patsubst %,CONFIG_FFMPEG_DECODER_
%,$(FFMPEG_DECODERS
)) \
82 $(patsubst %,CONFIG_FFMPEG_MUXER_
%,$(FFMPEG_DEMUXERS
)) \
83 $(patsubst %,CONFIG_FFMPEG_DEMUXER_
%,$(FFMPEG_DEMUXERS
)) \
84 $(patsubst %,CONFIG_FFMPEG_PARSER_
%,$(FFMPEG_PARSERS
)) \
85 $(patsubst %,CONFIG_FFMPEG_PROTOCOL_
%,$(FFMPEG_PROTOCOLS
))
87 include $(INCLUDE_DIR
)/package.mk
89 define Package
/ffmpeg
/Default
91 URL
:=http
://ffmpeg.mplayerhq.hu
/
94 define Package
/ffmpeg
/Default
/description
95 FFmpeg is a a software package that can record
, convert and stream digital
96 audio and video in numerous formats.
100 $(call Package
/ffmpeg
/Default
)
104 DEPENDS
+= +libpthread
+libffmpeg
107 define Package
/ffmpeg
/description
108 $(call Package
/ffmpeg
/Default
/description
)
110 This package contains the FFmpeg command line tool.
113 define Package
/ffserver
114 $(call Package
/ffserver
/Default
)
117 TITLE
+= streaming server
118 DEPENDS
+= +libpthread
+libffmpeg
+@FFMPEG_FFSERVER_SUPPORT
121 define Package
/ffserver
/description
122 $(call Package
/ffmpeg
/Default
/description
)
124 This package contains the FFmpeg streaming server.
127 define Package
/libffmpeg
128 $(call Package
/ffmpeg
/Default
)
132 DEPENDS
+= +libpthread
+libfaad2
+zlib
136 define Package
/libffmpeg
/config
137 source
"$(SOURCE)/Config.in"
140 define Package
/libffmeg
/description
141 $(call Package
/ffmpeg
/Default
/description
)
143 This package contains FFmpeg shared libraries.
146 define Package
/libpostproc
150 URL
:=http
://ffmpeg.mplayerhq.hu
/
156 $(if
$(CONFIG_FFMPEG_
$(1)_
$(c
)),--enable-
$(2)="$(c)") \
159 FFMPEG_CONFIGURE_ENCODERS
:=$(call FILTER_CONFIG
,ENCODER
,encoder
,$(FFMPEG_ENCODERS
))
160 FFMPEG_CONFIGURE_DECODERS
:=$(call FILTER_CONFIG
,DECODER
,decoder
,$(FFMPEG_DECODERS
))
161 FFMPEG_CONFIGURE_MUXERS
:=$(call FILTER_CONFIG
,MUXER
,muxer
,$(FFMPEG_MUXERS
))
162 FFMPEG_CONFIGURE_DEMUXERS
:=$(call FILTER_CONFIG
,DEMUXER
,demuxer
,$(FFMPEG_DEMUXERS
))
163 FFMPEG_CONFIGURE_PARSERS
:=$(call FILTER_CONFIG
,PARSER
,parser
,$(FFMPEG_PARSERS
))
164 FFMPEG_CONFIGURE_PROTOCOLS
:=$(call FILTER_CONFIG
,PROTOCOL
,protocol
,$(FFMPEG_PROTOCOLS
))
166 # XXX: add --disable-mmx & --disable-mmx2 to fix build failure on x86
167 # libpostproc/postprocess_template.c:2195: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
168 # libpostproc/postprocess_template.c:3124: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
169 # libpostproc/postprocess_template.c:3207: error: can't find a register in class 'GENERAL_REGS' while reloading 'asm'
171 define Build
/Configure
172 # this is *NOT* GNU configure
173 ( cd
$(PKG_BUILD_DIR
); \
174 CFLAGS
="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \
175 LDFLAGS
="$(TARGET_LDFLAGS)" \
177 --enable-cross-compile \
178 --cross-prefix
="$(TARGET_CROSS)" \
191 --disable-optimizations \
193 --disable-stripping \
199 $(FFMPEG_CONFIGURE_ENCODERS
) \
201 $(FFMPEG_CONFIGURE_DECODERS
) \
203 $(FFMPEG_CONFIGURE_MUXERS
) \
205 $(FFMPEG_CONFIGURE_DEMUXERS
) \
207 $(FFMPEG_CONFIGURE_PARSERS
) \
209 --disable-protocols \
210 $(FFMPEG_CONFIGURE_PROTOCOLS
) \
215 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
216 DESTDIR
="$(PKG_INSTALL_DIR)" \
220 define Build
/InstallDev
221 $(INSTALL_DIR
) $(1)/usr
/include
222 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/libav
{codec
,device
,format
,util
} $(1)/usr
/include/
223 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/libpostproc
$(1)/usr
/include/
224 $(INSTALL_DIR
) $(1)/usr
/lib
225 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libav
{codec
,device
,format
,util
}.
{a
,so
*} $(1)/usr
/lib
/
226 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpostproc.
{a
,so
*} $(1)/usr
/lib
/
227 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
228 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/libav
{codec
,device
,format
,util
}.
pc $(1)/usr
/lib
/pkgconfig
/
229 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/libpostproc.
pc $(1)/usr
/lib
/pkgconfig
/
232 define Package
/ffmpeg
/install
233 $(INSTALL_DIR
) $(1)/usr
/bin
234 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/ffmpeg
$(1)/usr
/bin
/
237 define Package
/ffserver
/install
238 $(INSTALL_DIR
) $(1)/usr
/bin
239 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/ffserver
$(1)/usr
/bin
/
242 define Package
/libffmpeg
/install
243 $(INSTALL_DIR
) $(1)/usr
/lib
244 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libav
{codec
,device
,format
,util
}.so.
* $(1)/usr
/lib
/
247 define Package
/libpostproc
/install
248 $(INSTALL_DIR
) $(1)/usr
/lib
249 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libpostproc.so.
* $(1)/usr
/lib
/
252 $(eval
$(call BuildPackage
,ffmpeg
))
253 $(eval
$(call BuildPackage
,ffserver
))
254 $(eval
$(call BuildPackage
,libffmpeg
))
255 $(eval
$(call BuildPackage
,libpostproc
))