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