ffmpeg: fixup mpeg support in libffmpeg-mini
[feed/packages.git] / multimedia / ffmpeg / Makefile
1 #
2 # Copyright (C) 2006-2017 OpenWrt.org
3 # Copyright (C) 2017 Ian Leonard <antonlacon@gmail.com>
4 #
5 # This is free software, licensed under the GNU General Public License v2.
6 # See /LICENSE for more information.
7 #
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=ffmpeg
12 PKG_VERSION:=3.2.7
13 PKG_RELEASE:=2
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
16 PKG_SOURCE_URL:=https://ffmpeg.org/releases/
17 PKG_HASH:=28e75fc32485a88035a7ebf0a956a1e5c7e93b440dd4bbd6bc30c7268cf34fe9
18 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>, \
19 Ian Leonard <antonlacon@gmail.com>
20
21 PKG_LICENSE:=LGPL-2.1+ GPL-2+ LGPL-3
22 PKG_LICENSE_FILES:=COPYING.GPLv2 COPYING.GPLv3 COPYING.LGPLv2.1 COPYING.LGPLv3
23
24 FFMPEG_CUSTOM_ENCODERS:= \
25 ac3 \
26 jpegls \
27 mpeg1video \
28 mpeg2video \
29 mpeg4 \
30 pcm_s16be \
31 pcm_s16le \
32 png \
33 vorbis \
34 zlib \
35
36 FFMPEG_CUSTOM_DECODERS:= \
37 aac \
38 ac3 \
39 alac \
40 amrnb \
41 amrwb \
42 ape \
43 atrac3 \
44 flac \
45 gif \
46 h264 \
47 hevc \
48 jpegls \
49 mp2 \
50 mp3 \
51 mpeg1video \
52 mpeg2video \
53 mpeg4 \
54 mpegvideo \
55 mpc7 \
56 mpc8 \
57 pcm_s16be \
58 pcm_s16le \
59 png \
60 vc1 \
61 vorbis \
62 wavpack \
63 wmav1 \
64 wmav2 \
65 zlib \
66
67 FFMPEG_CUSTOM_MUXERS:= \
68 ac3 \
69 ffm \
70 h264 \
71 hevc \
72 mp3 \
73 mp4 \
74 mpeg1video \
75 mpeg2video \
76 mpegts \
77 ogg \
78 rtp \
79
80 FFMPEG_CUSTOM_DEMUXERS:= \
81 aac \
82 ac3 \
83 amr \
84 ape \
85 avi \
86 flac \
87 ffm \
88 h264 \
89 hevc \
90 matroska \
91 mov \
92 mp3 \
93 mpegps \
94 mpegts \
95 mpegvideo \
96 mpc \
97 mpc8 \
98 ogg \
99 rm \
100 rtsp \
101 rtp \
102 sdp \
103 v4l2 \
104 vc1 \
105 wav \
106 wv \
107
108 FFMPEG_CUSTOM_PARSERS:= \
109 aac \
110 flac \
111 ac3 \
112 h264 \
113 hevc \
114 mpegaudio \
115 mpeg4video \
116 mpegvideo \
117 vc1 \
118
119 FFMPEG_CUSTOM_PROTOCOLS:= \
120 file http icecast pipe rtp tcp udp
121
122 FFMPEG_MINI_DECODERS:= \
123 aac \
124 ac3 \
125 flac \
126 h264 \
127 hevc \
128 jpegls \
129 mp3 \
130 mpeg1video \
131 mpeg2video \
132 mpeg4 \
133 mpegvideo \
134 opus \
135 png \
136 vc1 \
137 vorbis \
138 wmav1 \
139 wmav2 \
140
141 FFMPEG_MINI_DEMUXERS:= \
142 avi \
143 flac \
144 matroska \
145 mov \
146 mp3 \
147 mpegps \
148 mpegts \
149 ogg \
150
151 FFMPEG_MINI_PROTOCOLS:= \
152 file
153
154 FFMPEG_AUDIO_DECODERS:= \
155 aac \
156 aac_latm \
157 ac3 \
158 adpcm_* \
159 alac \
160 amrnb \
161 amrwb \
162 ape \
163 atrac3 \
164 flac \
165 mp2 \
166 mp3* \
167 mpc7 \
168 mpc8 \
169 opus \
170 pcm_* \
171 vorbis \
172 wavpack \
173 wmav1 \
174 wmav2 \
175 wmalossless \
176 wmapro \
177 zlib \
178
179 FFMPEG_AUDIO_DEMUXERS:= \
180 aac \
181 ac3 \
182 aiff \
183 amr \
184 ape \
185 avi \
186 flac \
187 ffm \
188 matroska \
189 mp3 \
190 mov \
191 mpc \
192 mpc8 \
193 mpegts \
194 ogg \
195 rm \
196 rtsp \
197 rtp \
198 sdp \
199 wav \
200 wv \
201
202 FFMPEG_AUDIO_PROTOCOLS:= \
203 file http icecast rtp tcp udp
204
205
206 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
207
208 PKG_CONFIG_DEPENDS:= \
209 $(patsubst %,CONFIG_FFMPEG_CUSTOM_ENCODER_%,$(FFMPEG_CUSTOM_ENCODERS)) \
210 $(patsubst %,CONFIG_FFMPEG_CUSTOM_DECODER_%,$(FFMPEG_CUSTOM_DECODERS)) \
211 $(patsubst %,CONFIG_FFMPEG_CUSTOM_MUXER_%,$(FFMPEG_CUSTOM_DEMUXERS)) \
212 $(patsubst %,CONFIG_FFMPEG_CUSTOM_DEMUXER_%,$(FFMPEG_CUSTOM_DEMUXERS)) \
213 $(patsubst %,CONFIG_FFMPEG_CUSTOM_PARSER_%,$(FFMPEG_CUSTOM_PARSERS)) \
214 $(patsubst %,CONFIG_FFMPEG_CUSTOM_PROTOCOL_%,$(FFMPEG_CUSTOM_PROTOCOLS))
215
216 include $(INCLUDE_DIR)/package.mk
217
218 define Package/ffmpeg/Default
219 TITLE:=FFmpeg
220 URL:=https://ffmpeg.org/
221 DEPENDS+= +libpthread
222 endef
223
224 define Package/ffmpeg/Default/description
225 FFmpeg is a a software package that can record, convert and stream digital
226 audio and video in numerous formats.
227 endef
228
229
230 define Package/ffmpeg
231 $(call Package/ffmpeg/Default)
232 SECTION:=multimedia
233 CATEGORY:=Multimedia
234 TITLE+= program
235 DEPENDS+= +libffmpeg-full
236 VARIANT:=full
237 endef
238
239 define Package/ffmpeg/description
240 $(call Package/ffmpeg/Default/description)
241 .
242 This package contains the FFmpeg command line tool.
243 endef
244
245
246 define Package/ffprobe
247 $(call Package/ffmpeg/Default)
248 SECTION:=multimedia
249 CATEGORY:=Multimedia
250 TITLE+= CLI media identifier
251 DEPENDS+= +libffmpeg-full
252 VARIANT:=full
253 endef
254
255 define Package/ffprobe/description
256 $(call Package/ffmpeg/Default/description)
257 .
258 This package contains the FFprobe command line tool.
259 endef
260
261
262 define Package/ffserver
263 $(call Package/ffserver/Default)
264 SECTION:=multimedia
265 CATEGORY:=Multimedia
266 TITLE+= streaming server
267 DEPENDS+= +libffmpeg-full
268 VARIANT:=full
269 endef
270
271 define Package/ffserver/description
272 $(call Package/ffmpeg/Default/description)
273 .
274 This package contains the FFmpeg streaming server.
275 endef
276
277 define Package/libffmpeg/Default
278 $(call Package/ffmpeg/Default)
279 SECTION:=libs
280 CATEGORY:=Libraries
281 TITLE+= libraries
282 DEPENDS+= +libpthread +zlib +libbz2
283 PROVIDES:= libffmpeg
284 endef
285
286
287 define Package/libffmpeg-custom
288 $(call Package/libffmpeg/Default)
289 TITLE+= (custom)
290 DEPENDS+= +FFMPEG_CUSTOM_SELECT_libopus:libopus \
291 +PACKAGE_libx264:libx264 +PACKAGE_lame-lib:lame-lib \
292 +FFMPEG_CUSTOM_SELECT_libshine:shine \
293 +PACKAGE_fdk-aac:fdk-aac
294 VARIANT:=custom
295 MENU:=1
296 endef
297
298 define Package/libffmpeg-custom/config
299 source "$(SOURCE)/Config.in"
300 endef
301
302 define Package/libffmpeg-custom/description
303 $(call Package/ffmpeg/Default/description)
304 .
305 This package contains customized FFmpeg shared libraries.
306 endef
307
308
309 define Package/libffmpeg-audio-dec
310 $(call Package/libffmpeg/Default)
311 TITLE+= (audio)
312 DEPENDS+= @BUILD_PATENTED
313 VARIANT:=audio-dec
314 endef
315
316 define Package/libffmpeg-audio-dec/description
317 $(call Package/ffmpeg/Default/description)
318 .
319 This package contains FFmpeg shared libraries for audio decoding
320 endef
321
322
323 define Package/libffmpeg-full
324 $(call Package/libffmpeg/Default)
325 TITLE+= (full)
326 DEPENDS+= @BUILD_PATENTED +alsa-lib +PACKAGE_libopus:libopus
327 ifeq ($(CONFIG_SOFT_FLOAT),y)
328 DEPENDS+= +PACKAGE_shine:shine
329 else
330 DEPENDS+= +PACKAGE_lame-lib:lame-lib +PACKAGE_libx264:libx264
331 endif
332 VARIANT:=full
333 endef
334
335
336 define Package/libffmpeg-full/description
337 $(call Package/ffmpeg/Default/description)
338 .
339 This package contains full-featured FFmpeg shared libraries.
340 endef
341
342
343 define Package/libffmpeg-mini
344 $(call Package/libffmpeg/Default)
345 TITLE+= (mini)
346 DEPENDS+= @BUILD_PATENTED
347 VARIANT:=mini
348 endef
349
350 define Package/libffmpeg-mini/description
351 $(call Package/ffmpeg/Default/description)
352 .
353 This package contains minimal-featured FFmpeg shared libraries.
354 endef
355
356
357 FFMPEG_CONFIGURE:= \
358 CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \
359 LDFLAGS="$(TARGET_LDFLAGS)" \
360 ./configure \
361 --enable-cross-compile \
362 --cross-prefix="$(TARGET_CROSS)" \
363 --arch="$(ARCH)" \
364 --target-os=linux \
365 --prefix="/usr" \
366 --pkg-config="pkg-config" \
367 --enable-shared \
368 --enable-static \
369 --enable-pthreads \
370 --enable-zlib \
371 --disable-doc \
372 --disable-debug \
373 \
374 --disable-lzma \
375 --disable-vaapi \
376 --disable-vdpau \
377 --disable-outdevs
378
379 ifeq ($(CONFIG_SOFT_FLOAT),y)
380 FFMPEG_CONFIGURE+= \
381 --disable-altivec \
382 --disable-vsx \
383 --disable-power8 \
384 --disable-armv5te \
385 --disable-armv6 \
386 --disable-armv6t2 \
387 --disable-inline-asm \
388 --disable-mipsdsp \
389 --disable-mipsdspr2 \
390 --disable-mipsfpu \
391 --disable-msa \
392 --disable-mmi \
393 --disable-fast-unaligned \
394 --disable-runtime-cpudetect
395
396 else ifneq ($(findstring arm,$(CONFIG_ARCH)),)
397 FFMPEG_CONFIGURE+= \
398 --disable-runtime-cpudetect
399 # XXX: GitHub issue 3320 ppc cpu with fpu but no altivec (WNDR4700)
400 else ifneq ($(findstring powerpc,$(CONFIG_ARCH)),)
401 FFMPEG_CONFIGURE+= \
402 --disable-altivec
403 endif
404
405 # selectively disable optimizations according to arch/cpu type
406 ifneq ($(findstring arm,$(CONFIG_ARCH)),)
407 FFMPEG_CONFIGURE+= --enable-lto
408
409 ifneq ($(findstring vfp,$(CONFIG_TARGET_OPTIMIZATION)),)
410 FFMPEG_CONFIGURE+= --enable-vfp
411 else
412 FFMPEG_CONFIGURE+= --disable-vfp
413 endif
414 ifneq ($(findstring neon,$(CONFIG_TARGET_OPTIMIZATION)),)
415 FFMPEG_CONFIGURE+= \
416 --enable-neon \
417 --enable-vfp
418 else
419 FFMPEG_CONFIGURE+= --disable-neon
420 endif
421
422 endif
423
424 ifeq ($(ARCH),x86_64)
425 FFMPEG_CONFIGURE+= --enable-lto
426 endif
427
428 ifneq ($(CONFIG_YASM),y)
429 FFMPEG_CONFIGURE+= --disable-yasm
430
431 endif
432
433 ifeq ($(BUILD_VARIANT),full)
434 FFMPEG_CONFIGURE+= \
435 --enable-avresample \
436 $(if $(CONFIG_PACKAGE_libopus),--enable-libopus)
437 ifeq ($(CONFIG_SOFT_FLOAT),y)
438 FFMPEG_CONFIGURE+= \
439 --enable-small \
440 \
441 $(if $(CONFIG_PACKAGE_shine),--enable-libshine)
442 else
443 ifeq ($(ARCH),x86_64)
444 FFMPEG_CONFIGURE+= --enable-hardcoded-tables
445 else
446 FFMPEG_CONFIGURE+= --enable-small
447 endif
448 FFMPEG_CONFIGURE+= \
449 --enable-gpl \
450 \
451 $(if $(CONFIG_PACKAGE_lame-lib),--enable-libmp3lame) \
452 $(if $(CONFIG_PACKAGE_libx264),--enable-libx264)
453 endif
454 endif
455
456 ifeq ($(BUILD_VARIANT),custom)
457
458 FFMPEG_ENABLE= \
459 $(foreach c, $(2), \
460 $(if $($(3)_$(c)),--enable-$(1)="$(c)") \
461 )
462
463 ifeq ($(CONFIG_FFMPEG_CUSTOM_LARGE),y)
464 FFMPEG_CONFIGURE+= \
465 --enable-hardcoded-tables
466 else
467 FFMPEG_CONFIGURE+= \
468 --enable-small
469 endif
470
471 ifeq ($(CONFIG_FFMPEG_CUSTOM_GPL),y)
472 FFMPEG_CONFIGURE+= --enable-gpl
473 endif
474
475 ifeq ($(CONFIG_FFMPEG_CUSTOM_GPLV3),y)
476 FFMPEG_CONFIGURE+= --enable-version3
477 endif
478
479 ifeq ($(CONFIG_FFMPEG_CUSTOM_NONFREE),y)
480 FFMPEG_CONFIGURE+= --enable-nonfree
481 endif
482
483 FFMPEG_CONFIGURE+= \
484 --disable-programs \
485 --disable-avfilter \
486 --disable-postproc \
487 --disable-swresample \
488 --disable-swscale \
489 --disable-everything \
490 $(call FFMPEG_ENABLE,encoder,$(FFMPEG_CUSTOM_ENCODERS),CONFIG_FFMPEG_CUSTOM_ENCODER) \
491 $(call FFMPEG_ENABLE,decoder,$(FFMPEG_CUSTOM_DECODERS),CONFIG_FFMPEG_CUSTOM_DECODER) \
492 $(call FFMPEG_ENABLE,muxer,$(FFMPEG_CUSTOM_MUXERS),CONFIG_FFMPEG_CUSTOM_MUXER) \
493 $(call FFMPEG_ENABLE,demuxer,$(FFMPEG_CUSTOM_DEMUXERS),CONFIG_FFMPEG_CUSTOM_DEMUXER) \
494 $(call FFMPEG_ENABLE,parser,$(FFMPEG_CUSTOM_PARSERS),CONFIG_FFMPEG_CUSTOM_PARSER) \
495 $(call FFMPEG_ENABLE,protocol,$(FFMPEG_CUSTOM_PROTOCOLS),CONFIG_FFMPEG_CUSTOM_PROTOCOL) \
496
497 ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_adpcm),y)
498 FFMPEG_CONFIGURE+= \
499 --enable-decoder=adpcm_ima_wav \
500 --enable-decoder=adpcm_ima_qt \
501 --enable-decoder=adpcm_ms
502 endif
503
504 ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libfdk-aac),y)
505 FFMPEG_CONFIGURE+= \
506 --enable-libfdk-aac --enable-encoder=libfdk_aac
507 endif
508
509 ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libmp3lame),y)
510 FFMPEG_CONFIGURE+= \
511 --enable-libmp3lame --enable-encoder=libmp3lame
512 endif
513
514 ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libopus),y)
515 FFMPEG_CONFIGURE+= \
516 --enable-libopus --enable-decoder=libopus --enable-encoder=libopus
517 endif
518
519 ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libshine),y)
520 FFMPEG_CONFIGURE+= \
521 --enable-libshine --enable-encoder=libshine
522 endif
523
524 ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libx264),y)
525 FFMPEG_CONFIGURE+= \
526 --enable-libx264 --enable-encoder=libx264
527 endif
528
529 endif
530
531 ifeq ($(BUILD_VARIANT),audio-dec)
532
533 FFMPEG_ENABLE= \
534 $(foreach c, $(2), \
535 --enable-$(1)="$(c)" \
536 )
537
538 FFMPEG_CONFIGURE+= \
539 --enable-small \
540 --enable-gpl \
541 \
542 --disable-programs \
543 --disable-avfilter \
544 --disable-postproc \
545 --disable-swresample \
546 --disable-swscale \
547 --disable-everything \
548 $(call FFMPEG_ENABLE,decoder,$(FFMPEG_AUDIO_DECODERS)) \
549 $(call FFMPEG_ENABLE,demuxer,$(FFMPEG_AUDIO_DEMUXERS)) \
550 $(call FFMPEG_ENABLE,protocol,$(FFMPEG_AUDIO_PROTOCOLS)) \
551 --disable-decoder=pcm_bluray,pcm_dvd \
552
553 endif
554
555 ifeq ($(BUILD_VARIANT),mini)
556
557 FFMPEG_ENABLE= \
558 $(foreach c, $(2), \
559 --enable-$(1)="$(c)" \
560 )
561
562 FFMPEG_CONFIGURE+= \
563 --enable-small \
564 \
565 --disable-programs \
566 --disable-avdevice \
567 --disable-avfilter \
568 --disable-postproc \
569 --disable-swresample \
570 --disable-swscale \
571 --disable-everything \
572 $(call FFMPEG_ENABLE,decoder,$(FFMPEG_MINI_DECODERS)) \
573 $(call FFMPEG_ENABLE,demuxer,$(FFMPEG_MINI_DEMUXERS)) \
574 $(call FFMPEG_ENABLE,protocol,$(FFMPEG_MINI_PROTOCOLS))
575 endif
576
577 ifneq ($(CONFIG_TARGET_x86),)
578 TARGET_CFLAGS+= -fomit-frame-pointer
579 endif
580
581 define Build/Configure
582 ( cd $(PKG_BUILD_DIR); $(FFMPEG_CONFIGURE) )
583 endef
584
585 define Build/Compile
586 $(MAKE) -C $(PKG_BUILD_DIR) \
587 DESTDIR="$(PKG_INSTALL_DIR)" \
588 all install
589 endef
590
591 define Build/InstallDev/custom
592 $(INSTALL_DIR) $(1)/usr/include
593 $(CP) $(PKG_INSTALL_DIR)/usr/include/lib{avcodec,avdevice,avformat,avutil} $(1)/usr/include/
594 $(INSTALL_DIR) $(1)/usr/lib
595 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avformat,avutil}.{a,so*} $(1)/usr/lib/
596 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
597 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lib{avcodec,avdevice,avformat,avutil}.pc $(1)/usr/lib/pkgconfig/
598 endef
599
600 # Soft float is LGPL (no libpostproc); Hard float is GPL (yes libpostproc)
601 define Build/InstallDev/full
602 $(INSTALL_DIR) $(1)/usr/include
603 $(INSTALL_DIR) $(1)/usr/lib
604 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
605 $(CP) $(PKG_INSTALL_DIR)/usr/include/lib{avcodec,avdevice,avfilter,avformat,avresample,avutil,swresample,swscale} $(1)/usr/include/
606 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avfilter,avformat,avresample,avutil,swresample,swscale}.{a,so*} $(1)/usr/lib/
607 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lib{avcodec,avdevice,avfilter,avformat,avresample,avutil,swresample,swscale}.pc $(1)/usr/lib/pkgconfig/
608 ifneq ($(CONFIG_SOFT_FLOAT),y)
609 $(CP) $(PKG_INSTALL_DIR)/usr/include/libpostproc $(1)/usr/include/
610 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpostproc.{a,so*} $(1)/usr/lib/
611 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpostproc.pc $(1)/usr/lib/pkgconfig/
612 endif
613 endef
614
615 define Build/InstallDev/mini
616 $(INSTALL_DIR) $(1)/usr/include
617 $(CP) $(PKG_INSTALL_DIR)/usr/include/lib{avcodec,avformat,avutil} $(1)/usr/include/
618 $(INSTALL_DIR) $(1)/usr/lib
619 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avformat,avutil}.{a,so*} $(1)/usr/lib/
620 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
621 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lib{avcodec,avformat,avutil}.pc $(1)/usr/lib/pkgconfig/
622 endef
623
624 Build/InstallDev/audio-dec = $(Build/InstallDev/custom)
625
626 # XXX: attempt at installing "best" dev files available
627 ifeq ($(BUILD_VARIANT),custom)
628 # XXX: only install "custom" dev files if -full & -mini are not selected
629 ifeq ($(CONFIG_PACKAGE_libffmpeg-full)$(CONFIG_PACKAGE_libffmpeg-mini),)
630 Build/InstallDev = $(Build/InstallDev/custom)
631 endif
632 endif
633 ifeq ($(BUILD_VARIANT),audio-dec)
634 # XXX: only install "audio-dec" dev files if -full & -mini are not selected
635 ifeq ($(CONFIG_PACKAGE_libffmpeg-full)$(CONFIG_PACKAGE_libffmpeg-mini),)
636 Build/InstallDev = $(Build/InstallDev/audio-dec)
637 endif
638 endif
639 ifeq ($(BUILD_VARIANT),full)
640 # XXX: always install "full" dev files if -full is selected
641 Build/InstallDev = $(Build/InstallDev/full)
642 endif
643 ifeq ($(BUILD_VARIANT),mini)
644 # XXX: only install "mini" dev files if -full is not selected
645 ifeq ($(CONFIG_PACKAGE_libffmpeg-full),)
646 Build/InstallDev = $(Build/InstallDev/mini)
647 endif
648 endif
649
650 define Package/ffmpeg/install
651 $(INSTALL_DIR) $(1)/usr/bin
652 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ffmpeg $(1)/usr/bin/
653 endef
654
655 define Package/ffprobe/install
656 $(INSTALL_DIR) $(1)/usr/bin
657 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ffprobe $(1)/usr/bin/
658 endef
659
660 define Package/ffserver/install
661 $(INSTALL_DIR) $(1)/usr/bin
662 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ffserver $(1)/usr/bin/
663 endef
664
665 define Package/libffmpeg-custom/install
666 $(INSTALL_DIR) $(1)/usr/lib
667 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avformat,avutil}.so.* $(1)/usr/lib/
668 endef
669
670 # Soft float is LGPL (no libpostproc); Hard float is GPL (yes libpostproc)
671 define Package/libffmpeg-full/install
672 $(INSTALL_DIR) $(1)/usr/lib
673 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avfilter,avformat,avresample,avutil,swresample,swscale}.so.* $(1)/usr/lib/
674 ifneq ($(CONFIG_SOFT_FLOAT),y)
675 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpostproc.so.* $(1)/usr/lib/
676 endif
677 endef
678
679 define Package/libffmpeg-mini/install
680 $(INSTALL_DIR) $(1)/usr/lib
681 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avformat,avutil}.so.* $(1)/usr/lib/
682 endef
683
684 Package/libffmpeg-audio-dec/install = $(Package/libffmpeg-custom/install)
685
686 $(eval $(call BuildPackage,ffmpeg))
687 $(eval $(call BuildPackage,ffprobe))
688 $(eval $(call BuildPackage,ffserver))
689 $(eval $(call BuildPackage,libffmpeg-audio-dec))
690 $(eval $(call BuildPackage,libffmpeg-full))
691 $(eval $(call BuildPackage,libffmpeg-mini))
692 ifneq ($(CONFIG_ALL),y)
693 $(eval $(call BuildPackage,libffmpeg-custom))
694 endif