ffmpeg: update to 3.2.7
[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:=1
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 mpegts \
148 mpegvideo \
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_PARSERS:= \
203 aac \
204 aac_latm \
205 ac3 \
206 flac \
207 mpegaudio \
208 opus \
209
210 FFMPEG_AUDIO_PROTOCOLS:= \
211 file http icecast rtp tcp udp
212
213
214 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
215
216 PKG_CONFIG_DEPENDS:= \
217 $(patsubst %,CONFIG_FFMPEG_CUSTOM_ENCODER_%,$(FFMPEG_CUSTOM_ENCODERS)) \
218 $(patsubst %,CONFIG_FFMPEG_CUSTOM_DECODER_%,$(FFMPEG_CUSTOM_DECODERS)) \
219 $(patsubst %,CONFIG_FFMPEG_CUSTOM_MUXER_%,$(FFMPEG_CUSTOM_DEMUXERS)) \
220 $(patsubst %,CONFIG_FFMPEG_CUSTOM_DEMUXER_%,$(FFMPEG_CUSTOM_DEMUXERS)) \
221 $(patsubst %,CONFIG_FFMPEG_CUSTOM_PARSER_%,$(FFMPEG_CUSTOM_PARSERS)) \
222 $(patsubst %,CONFIG_FFMPEG_CUSTOM_PROTOCOL_%,$(FFMPEG_CUSTOM_PROTOCOLS))
223
224 include $(INCLUDE_DIR)/package.mk
225
226 define Package/ffmpeg/Default
227 TITLE:=FFmpeg
228 URL:=https://ffmpeg.org/
229 DEPENDS+= +libpthread
230 endef
231
232 define Package/ffmpeg/Default/description
233 FFmpeg is a a software package that can record, convert and stream digital
234 audio and video in numerous formats.
235 endef
236
237
238 define Package/ffmpeg
239 $(call Package/ffmpeg/Default)
240 SECTION:=multimedia
241 CATEGORY:=Multimedia
242 TITLE+= program
243 DEPENDS+= +libffmpeg-full
244 VARIANT:=full
245 endef
246
247 define Package/ffmpeg/description
248 $(call Package/ffmpeg/Default/description)
249 .
250 This package contains the FFmpeg command line tool.
251 endef
252
253
254 define Package/ffprobe
255 $(call Package/ffmpeg/Default)
256 SECTION:=multimedia
257 CATEGORY:=Multimedia
258 TITLE+= CLI media identifier
259 DEPENDS+= +libffmpeg-full
260 VARIANT:=full
261 endef
262
263 define Package/ffprobe/description
264 $(call Package/ffmpeg/Default/description)
265 .
266 This package contains the FFprobe command line tool.
267 endef
268
269
270 define Package/ffserver
271 $(call Package/ffserver/Default)
272 SECTION:=multimedia
273 CATEGORY:=Multimedia
274 TITLE+= streaming server
275 DEPENDS+= +libffmpeg-full
276 VARIANT:=full
277 endef
278
279 define Package/ffserver/description
280 $(call Package/ffmpeg/Default/description)
281 .
282 This package contains the FFmpeg streaming server.
283 endef
284
285 define Package/libffmpeg/Default
286 $(call Package/ffmpeg/Default)
287 SECTION:=libs
288 CATEGORY:=Libraries
289 TITLE+= libraries
290 DEPENDS+= +libpthread +zlib +libbz2
291 PROVIDES:= libffmpeg
292 endef
293
294
295 define Package/libffmpeg-custom
296 $(call Package/libffmpeg/Default)
297 TITLE+= (custom)
298 DEPENDS+= +FFMPEG_CUSTOM_SELECT_libopus:libopus \
299 +PACKAGE_libx264:libx264 +PACKAGE_lame-lib:lame-lib \
300 +FFMPEG_CUSTOM_SELECT_libshine:shine \
301 +PACKAGE_fdk-aac:fdk-aac
302 VARIANT:=custom
303 MENU:=1
304 endef
305
306 define Package/libffmpeg-custom/config
307 source "$(SOURCE)/Config.in"
308 endef
309
310 define Package/libffmpeg-custom/description
311 $(call Package/ffmpeg/Default/description)
312 .
313 This package contains customized FFmpeg shared libraries.
314 endef
315
316
317 define Package/libffmpeg-audio-dec
318 $(call Package/libffmpeg/Default)
319 TITLE+= (audio)
320 DEPENDS+= @BUILD_PATENTED
321 VARIANT:=audio-dec
322 endef
323
324 define Package/libffmpeg-audio-dec/description
325 $(call Package/ffmpeg/Default/description)
326 .
327 This package contains FFmpeg shared libraries for audio decoding
328 endef
329
330
331 define Package/libffmpeg-full
332 $(call Package/libffmpeg/Default)
333 TITLE+= (full)
334 DEPENDS+= @BUILD_PATENTED +alsa-lib +PACKAGE_libopus:libopus
335 ifeq ($(CONFIG_SOFT_FLOAT),y)
336 DEPENDS+= +PACKAGE_shine:shine
337 else
338 DEPENDS+= +PACKAGE_lame-lib:lame-lib +PACKAGE_libx264:libx264
339 endif
340 VARIANT:=full
341 endef
342
343
344 define Package/libffmpeg-full/description
345 $(call Package/ffmpeg/Default/description)
346 .
347 This package contains full-featured FFmpeg shared libraries.
348 endef
349
350
351 define Package/libffmpeg-mini
352 $(call Package/libffmpeg/Default)
353 TITLE+= (mini)
354 DEPENDS+= @BUILD_PATENTED
355 VARIANT:=mini
356 endef
357
358 define Package/libffmpeg-mini/description
359 $(call Package/ffmpeg/Default/description)
360 .
361 This package contains minimal-featured FFmpeg shared libraries.
362 endef
363
364
365 FFMPEG_CONFIGURE:= \
366 CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \
367 LDFLAGS="$(TARGET_LDFLAGS)" \
368 ./configure \
369 --enable-cross-compile \
370 --cross-prefix="$(TARGET_CROSS)" \
371 --arch="$(ARCH)" \
372 --target-os=linux \
373 --prefix="/usr" \
374 --pkg-config="pkg-config" \
375 --enable-shared \
376 --enable-static \
377 --enable-pthreads \
378 --enable-zlib \
379 --disable-doc \
380 --disable-debug \
381 \
382 --disable-lzma \
383 --disable-vaapi \
384 --disable-vdpau \
385 --disable-outdevs
386
387 ifeq ($(CONFIG_SOFT_FLOAT),y)
388 FFMPEG_CONFIGURE+= \
389 --disable-altivec \
390 --disable-vsx \
391 --disable-power8 \
392 --disable-armv5te \
393 --disable-armv6 \
394 --disable-armv6t2 \
395 --disable-inline-asm \
396 --disable-mipsdsp \
397 --disable-mipsdspr2 \
398 --disable-mipsfpu \
399 --disable-msa \
400 --disable-mmi \
401 --disable-fast-unaligned \
402 --disable-runtime-cpudetect
403
404 else ifneq ($(findstring arm,$(CONFIG_ARCH)),)
405 FFMPEG_CONFIGURE+= \
406 --disable-runtime-cpudetect
407 # XXX: GitHub issue 3320 ppc cpu with fpu but no altivec (WNDR4700)
408 else ifneq ($(findstring powerpc,$(CONFIG_ARCH)),)
409 FFMPEG_CONFIGURE+= \
410 --disable-altivec
411 endif
412
413 # selectively disable optimizations according to arch/cpu type
414 ifneq ($(findstring arm,$(CONFIG_ARCH)),)
415 ifneq ($(findstring vfp,$(CONFIG_TARGET_OPTIMIZATION)),)
416 FFMPEG_CONFIGURE+= --enable-vfp
417 else
418 FFMPEG_CONFIGURE+= --disable-vfp
419 endif
420 ifneq ($(findstring neon,$(CONFIG_TARGET_OPTIMIZATION)),)
421 FFMPEG_CONFIGURE+= \
422 --enable-neon \
423 --enable-vfp
424 else
425 FFMPEG_CONFIGURE+= --disable-neon
426 endif
427
428 endif
429
430 ifneq ($(CONFIG_YASM),y)
431 FFMPEG_CONFIGURE+= --disable-yasm
432
433 endif
434
435 ifeq ($(BUILD_VARIANT),full)
436 FFMPEG_CONFIGURE+= \
437 --enable-avresample \
438 $(if $(CONFIG_PACKAGE_libopus),--enable-libopus)
439 ifeq ($(CONFIG_SOFT_FLOAT),y)
440 FFMPEG_CONFIGURE+= \
441 --enable-small \
442 \
443 $(if $(CONFIG_PACKAGE_shine),--enable-libshine)
444 else
445 ifeq ($(ARCH),x86_64)
446 FFMPEG_CONFIGURE+= --enable-hardcoded-tables
447 else
448 FFMPEG_CONFIGURE+= --enable-small
449 endif
450 FFMPEG_CONFIGURE+= \
451 --enable-gpl \
452 \
453 $(if $(CONFIG_PACKAGE_lame-lib),--enable-libmp3lame) \
454 $(if $(CONFIG_PACKAGE_libx264),--enable-libx264)
455 endif
456 endif
457
458 ifeq ($(BUILD_VARIANT),custom)
459
460 FFMPEG_ENABLE= \
461 $(foreach c, $(2), \
462 $(if $($(3)_$(c)),--enable-$(1)="$(c)") \
463 )
464
465 ifeq ($(CONFIG_FFMPEG_CUSTOM_LARGE),y)
466 FFMPEG_CONFIGURE+= \
467 --enable-hardcoded-tables
468 else
469 FFMPEG_CONFIGURE+= \
470 --enable-small
471 endif
472
473 ifeq ($(CONFIG_FFMPEG_CUSTOM_GPL),y)
474 FFMPEG_CONFIGURE+= --enable-gpl
475 endif
476
477 ifeq ($(CONFIG_FFMPEG_CUSTOM_GPLV3),y)
478 FFMPEG_CONFIGURE+= --enable-version3
479 endif
480
481 ifeq ($(CONFIG_FFMPEG_CUSTOM_NONFREE),y)
482 FFMPEG_CONFIGURE+= --enable-nonfree
483 endif
484
485 FFMPEG_CONFIGURE+= \
486 --disable-programs \
487 --disable-avfilter \
488 --disable-postproc \
489 --disable-swresample \
490 --disable-swscale \
491 --disable-everything \
492 $(call FFMPEG_ENABLE,encoder,$(FFMPEG_CUSTOM_ENCODERS),CONFIG_FFMPEG_CUSTOM_ENCODER) \
493 $(call FFMPEG_ENABLE,decoder,$(FFMPEG_CUSTOM_DECODERS),CONFIG_FFMPEG_CUSTOM_DECODER) \
494 $(call FFMPEG_ENABLE,muxer,$(FFMPEG_CUSTOM_MUXERS),CONFIG_FFMPEG_CUSTOM_MUXER) \
495 $(call FFMPEG_ENABLE,demuxer,$(FFMPEG_CUSTOM_DEMUXERS),CONFIG_FFMPEG_CUSTOM_DEMUXER) \
496 $(call FFMPEG_ENABLE,parser,$(FFMPEG_CUSTOM_PARSERS),CONFIG_FFMPEG_CUSTOM_PARSER) \
497 $(call FFMPEG_ENABLE,protocol,$(FFMPEG_CUSTOM_PROTOCOLS),CONFIG_FFMPEG_CUSTOM_PROTOCOL) \
498
499 ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_adpcm),y)
500 FFMPEG_CONFIGURE+= \
501 --enable-decoder=adpcm_ima_wav \
502 --enable-decoder=adpcm_ima_qt \
503 --enable-decoder=adpcm_ms
504 endif
505
506 ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libfdk-aac),y)
507 FFMPEG_CONFIGURE+= \
508 --enable-libfdk-aac --enable-encoder=libfdk_aac
509 endif
510
511 ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libmp3lame),y)
512 FFMPEG_CONFIGURE+= \
513 --enable-libmp3lame --enable-encoder=libmp3lame
514 endif
515
516 ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libopus),y)
517 FFMPEG_CONFIGURE+= \
518 --enable-libopus --enable-decoder=libopus --enable-encoder=libopus
519 endif
520
521 ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libshine),y)
522 FFMPEG_CONFIGURE+= \
523 --enable-libshine --enable-encoder=libshine
524 endif
525
526 ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libx264),y)
527 FFMPEG_CONFIGURE+= \
528 --enable-libx264 --enable-encoder=libx264
529 endif
530
531 endif
532
533 ifeq ($(BUILD_VARIANT),audio-dec)
534
535 FFMPEG_ENABLE= \
536 $(foreach c, $(2), \
537 --enable-$(1)="$(c)" \
538 )
539
540 FFMPEG_CONFIGURE+= \
541 --enable-small \
542 --enable-gpl \
543 \
544 --disable-programs \
545 --disable-avfilter \
546 --disable-postproc \
547 --disable-swresample \
548 --disable-swscale \
549 --disable-everything \
550 $(call FFMPEG_ENABLE,decoder,$(FFMPEG_AUDIO_DECODERS)) \
551 $(call FFMPEG_ENABLE,demuxer,$(FFMPEG_AUDIO_DEMUXERS)) \
552 $(call FFMPEG_ENABLE,parser,$(FFMPEG_AUDIO_PARSERS)) \
553 $(call FFMPEG_ENABLE,protocol,$(FFMPEG_AUDIO_PROTOCOLS)) \
554 --disable-decoder=pcm_bluray,pcm_dvd \
555
556 endif
557
558 ifeq ($(BUILD_VARIANT),mini)
559
560 FFMPEG_ENABLE= \
561 $(foreach c, $(2), \
562 --enable-$(1)="$(c)" \
563 )
564
565 FFMPEG_CONFIGURE+= \
566 --enable-small \
567 \
568 --disable-programs \
569 --disable-avdevice \
570 --disable-avfilter \
571 --disable-postproc \
572 --disable-swresample \
573 --disable-swscale \
574 --disable-everything \
575 $(call FFMPEG_ENABLE,decoder,$(FFMPEG_MINI_DECODERS)) \
576 $(call FFMPEG_ENABLE,demuxer,$(FFMPEG_MINI_DEMUXERS)) \
577 $(call FFMPEG_ENABLE,protocol,$(FFMPEG_MINI_PROTOCOLS))
578 endif
579
580 ifneq ($(CONFIG_TARGET_x86),)
581 TARGET_CFLAGS+= -fomit-frame-pointer
582 endif
583
584 define Build/Configure
585 ( cd $(PKG_BUILD_DIR); $(FFMPEG_CONFIGURE) )
586 endef
587
588 define Build/Compile
589 $(MAKE) -C $(PKG_BUILD_DIR) \
590 DESTDIR="$(PKG_INSTALL_DIR)" \
591 all install
592 endef
593
594 define Build/InstallDev/custom
595 $(INSTALL_DIR) $(1)/usr/include
596 $(CP) $(PKG_INSTALL_DIR)/usr/include/lib{avcodec,avdevice,avformat,avutil} $(1)/usr/include/
597 $(INSTALL_DIR) $(1)/usr/lib
598 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avformat,avutil}.{a,so*} $(1)/usr/lib/
599 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
600 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lib{avcodec,avdevice,avformat,avutil}.pc $(1)/usr/lib/pkgconfig/
601 endef
602
603 # Soft float is LGPL (no libpostproc); Hard float is GPL (yes libpostproc)
604 define Build/InstallDev/full
605 $(INSTALL_DIR) $(1)/usr/include
606 $(INSTALL_DIR) $(1)/usr/lib
607 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
608 $(CP) $(PKG_INSTALL_DIR)/usr/include/lib{avcodec,avdevice,avfilter,avformat,avresample,avutil,swresample,swscale} $(1)/usr/include/
609 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avfilter,avformat,avresample,avutil,swresample,swscale}.{a,so*} $(1)/usr/lib/
610 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lib{avcodec,avdevice,avfilter,avformat,avresample,avutil,swresample,swscale}.pc $(1)/usr/lib/pkgconfig/
611 ifneq ($(CONFIG_SOFT_FLOAT),y)
612 $(CP) $(PKG_INSTALL_DIR)/usr/include/libpostproc $(1)/usr/include/
613 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpostproc.{a,so*} $(1)/usr/lib/
614 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpostproc.pc $(1)/usr/lib/pkgconfig/
615 endif
616 endef
617
618 define Build/InstallDev/mini
619 $(INSTALL_DIR) $(1)/usr/include
620 $(CP) $(PKG_INSTALL_DIR)/usr/include/lib{avcodec,avformat,avutil} $(1)/usr/include/
621 $(INSTALL_DIR) $(1)/usr/lib
622 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avformat,avutil}.{a,so*} $(1)/usr/lib/
623 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
624 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lib{avcodec,avformat,avutil}.pc $(1)/usr/lib/pkgconfig/
625 endef
626
627 Build/InstallDev/audio-dec = $(Build/InstallDev/custom)
628
629 # XXX: attempt at installing "best" dev files available
630 ifeq ($(BUILD_VARIANT),custom)
631 # XXX: only install "custom" dev files if -full & -mini are not selected
632 ifeq ($(CONFIG_PACKAGE_libffmpeg-full)$(CONFIG_PACKAGE_libffmpeg-mini),)
633 Build/InstallDev = $(Build/InstallDev/custom)
634 endif
635 endif
636 ifeq ($(BUILD_VARIANT),audio-dec)
637 # XXX: only install "audio-dec" dev files if -full & -mini are not selected
638 ifeq ($(CONFIG_PACKAGE_libffmpeg-full)$(CONFIG_PACKAGE_libffmpeg-mini),)
639 Build/InstallDev = $(Build/InstallDev/audio-dec)
640 endif
641 endif
642 ifeq ($(BUILD_VARIANT),full)
643 # XXX: always install "full" dev files if -full is selected
644 Build/InstallDev = $(Build/InstallDev/full)
645 endif
646 ifeq ($(BUILD_VARIANT),mini)
647 # XXX: only install "mini" dev files if -full is not selected
648 ifeq ($(CONFIG_PACKAGE_libffmpeg-full),)
649 Build/InstallDev = $(Build/InstallDev/mini)
650 endif
651 endif
652
653 define Package/ffmpeg/install
654 $(INSTALL_DIR) $(1)/usr/bin
655 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ffmpeg $(1)/usr/bin/
656 endef
657
658 define Package/ffprobe/install
659 $(INSTALL_DIR) $(1)/usr/bin
660 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ffprobe $(1)/usr/bin/
661 endef
662
663 define Package/ffserver/install
664 $(INSTALL_DIR) $(1)/usr/bin
665 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ffserver $(1)/usr/bin/
666 endef
667
668 define Package/libffmpeg-custom/install
669 $(INSTALL_DIR) $(1)/usr/lib
670 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avformat,avutil}.so.* $(1)/usr/lib/
671 endef
672
673 # Soft float is LGPL (no libpostproc); Hard float is GPL (yes libpostproc)
674 define Package/libffmpeg-full/install
675 $(INSTALL_DIR) $(1)/usr/lib
676 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avfilter,avformat,avresample,avutil,swresample,swscale}.so.* $(1)/usr/lib/
677 ifneq ($(CONFIG_SOFT_FLOAT),y)
678 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpostproc.so.* $(1)/usr/lib/
679 endif
680 endef
681
682 define Package/libffmpeg-mini/install
683 $(INSTALL_DIR) $(1)/usr/lib
684 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avformat,avutil}.so.* $(1)/usr/lib/
685 endef
686
687 Package/libffmpeg-audio-dec/install = $(Package/libffmpeg-custom/install)
688
689 $(eval $(call BuildPackage,ffmpeg))
690 $(eval $(call BuildPackage,ffprobe))
691 $(eval $(call BuildPackage,ffserver))
692 $(eval $(call BuildPackage,libffmpeg-audio-dec))
693 $(eval $(call BuildPackage,libffmpeg-full))
694 $(eval $(call BuildPackage,libffmpeg-mini))
695 ifneq ($(CONFIG_ALL),y)
696 $(eval $(call BuildPackage,libffmpeg-custom))
697 endif