noddos: Noddos v0.5.0 with mDNS / DNS-SD support
[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:=2
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 --enable-avresample \
461 $(if $(CONFIG_PACKAGE_libopus),--enable-libopus)
462 ifeq ($(CONFIG_SOFT_FLOAT),y)
463 FFMPEG_CONFIGURE+= \
464 --enable-small \
465 \
466 $(if $(CONFIG_PACKAGE_shine),--enable-libshine)
467 else
468 FFMPEG_CONFIGURE+= \
469 --enable-small \
470 --enable-gpl \
471 \
472 $(if $(CONFIG_PACKAGE_lame-lib),--enable-libmp3lame) \
473 $(if $(CONFIG_PACKAGE_libx264),--enable-libx264)
474 endif
475 endif
476
477 ifeq ($(BUILD_VARIANT),custom)
478
479 FFMPEG_ENABLE= \
480 $(foreach c, $(2), \
481 $(if $($(3)_$(c)),--enable-$(1)="$(c)") \
482 )
483
484 ifeq ($(CONFIG_FFMPEG_CUSTOM_LARGE),y)
485 FFMPEG_CONFIGURE+= \
486 --enable-hardcoded-tables
487 else
488 FFMPEG_CONFIGURE+= \
489 --enable-small
490 endif
491
492 ifeq ($(CONFIG_FFMPEG_CUSTOM_GPL),y)
493 FFMPEG_CONFIGURE+= --enable-gpl
494 endif
495
496 ifeq ($(CONFIG_FFMPEG_CUSTOM_GPLV3),y)
497 FFMPEG_CONFIGURE+= --enable-version3
498 endif
499
500 ifeq ($(CONFIG_FFMPEG_CUSTOM_NONFREE),y)
501 FFMPEG_CONFIGURE+= --enable-nonfree
502 endif
503
504 FFMPEG_CONFIGURE+= \
505 --disable-programs \
506 --disable-avfilter \
507 --disable-postproc \
508 --disable-swresample \
509 --disable-swscale \
510 --disable-everything \
511 $(call FFMPEG_ENABLE,encoder,$(FFMPEG_CUSTOM_ENCODERS),CONFIG_FFMPEG_CUSTOM_ENCODER) \
512 $(call FFMPEG_ENABLE,decoder,$(FFMPEG_CUSTOM_DECODERS),CONFIG_FFMPEG_CUSTOM_DECODER) \
513 $(call FFMPEG_ENABLE,muxer,$(FFMPEG_CUSTOM_MUXERS),CONFIG_FFMPEG_CUSTOM_MUXER) \
514 $(call FFMPEG_ENABLE,demuxer,$(FFMPEG_CUSTOM_DEMUXERS),CONFIG_FFMPEG_CUSTOM_DEMUXER) \
515 $(call FFMPEG_ENABLE,parser,$(FFMPEG_CUSTOM_PARSERS),CONFIG_FFMPEG_CUSTOM_PARSER) \
516 $(call FFMPEG_ENABLE,protocol,$(FFMPEG_CUSTOM_PROTOCOLS),CONFIG_FFMPEG_CUSTOM_PROTOCOL) \
517
518 ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_adpcm),y)
519 FFMPEG_CONFIGURE+= \
520 --enable-decoder=adpcm_ima_wav \
521 --enable-decoder=adpcm_ima_qt \
522 --enable-decoder=adpcm_ms
523 endif
524
525 ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libfdk-aac),y)
526 FFMPEG_CONFIGURE+= \
527 --enable-libfdk-aac --enable-encoder=libfdk_aac
528 endif
529
530 ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libmp3lame),y)
531 FFMPEG_CONFIGURE+= \
532 --enable-libmp3lame --enable-encoder=libmp3lame
533 endif
534
535 ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libopus),y)
536 FFMPEG_CONFIGURE+= \
537 --enable-libopus --enable-decoder=libopus --enable-encoder=libopus
538 endif
539
540 ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libshine),y)
541 FFMPEG_CONFIGURE+= \
542 --enable-libshine --enable-encoder=libshine
543 endif
544
545 ifeq ($(CONFIG_FFMPEG_CUSTOM_SELECT_libx264),y)
546 FFMPEG_CONFIGURE+= \
547 --enable-libx264 --enable-encoder=libx264
548 endif
549
550 endif
551
552 ifeq ($(BUILD_VARIANT),audio-dec)
553
554 FFMPEG_ENABLE= \
555 $(foreach c, $(2), \
556 --enable-$(1)="$(c)" \
557 )
558
559 FFMPEG_CONFIGURE+= \
560 --enable-small \
561 --enable-gpl \
562 \
563 --disable-programs \
564 --disable-avfilter \
565 --disable-postproc \
566 --disable-swresample \
567 --disable-swscale \
568 --disable-everything \
569 $(call FFMPEG_ENABLE,decoder,$(FFMPEG_AUDIO_DECODERS)) \
570 $(call FFMPEG_ENABLE,demuxer,$(FFMPEG_AUDIO_DEMUXERS)) \
571 $(call FFMPEG_ENABLE,parser,$(FFMPEG_AUDIO_PARSERS)) \
572 $(call FFMPEG_ENABLE,protocol,$(FFMPEG_AUDIO_PROTOCOLS)) \
573 --disable-decoder=pcm_bluray,pcm_dvd \
574
575 endif
576
577 ifeq ($(BUILD_VARIANT),mini)
578
579 FFMPEG_ENABLE= \
580 $(foreach c, $(2), \
581 --enable-$(1)="$(c)" \
582 )
583
584 FFMPEG_CONFIGURE+= \
585 --enable-small \
586 \
587 --disable-programs \
588 --disable-avdevice \
589 --disable-avfilter \
590 --disable-postproc \
591 --disable-swresample \
592 --disable-swscale \
593 --disable-everything \
594 $(call FFMPEG_ENABLE,decoder,$(FFMPEG_MINI_DECODERS)) \
595 $(call FFMPEG_ENABLE,demuxer,$(FFMPEG_MINI_DEMUXERS)) \
596 $(call FFMPEG_ENABLE,protocol,$(FFMPEG_MINI_PROTOCOLS))
597 endif
598
599 ifneq ($(CONFIG_TARGET_x86),)
600 TARGET_CFLAGS += -fomit-frame-pointer
601 endif
602
603 define Build/Configure
604 ( cd $(PKG_BUILD_DIR); $(FFMPEG_CONFIGURE) )
605 endef
606
607 define Build/Compile
608 $(MAKE) -C $(PKG_BUILD_DIR) \
609 DESTDIR="$(PKG_INSTALL_DIR)" \
610 all install
611 endef
612
613 define Build/InstallDev/custom
614 $(INSTALL_DIR) $(1)/usr/include
615 $(CP) $(PKG_INSTALL_DIR)/usr/include/lib{avcodec,avdevice,avformat,avutil} $(1)/usr/include/
616 $(INSTALL_DIR) $(1)/usr/lib
617 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avformat,avutil}.{a,so*} $(1)/usr/lib/
618 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
619 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lib{avcodec,avdevice,avformat,avutil}.pc $(1)/usr/lib/pkgconfig/
620 endef
621
622 # Soft float is LGPL (no libpostproc); Hard float is GPL (yes libpostproc)
623 define Build/InstallDev/full
624 $(INSTALL_DIR) $(1)/usr/include
625 $(INSTALL_DIR) $(1)/usr/lib
626 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
627 $(CP) $(PKG_INSTALL_DIR)/usr/include/lib{avcodec,avdevice,avfilter,avformat,avresample,avutil,swresample,swscale} $(1)/usr/include/
628 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avfilter,avformat,avresample,avutil,swresample,swscale}.{a,so*} $(1)/usr/lib/
629 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lib{avcodec,avdevice,avfilter,avformat,avresample,avutil,swresample,swscale}.pc $(1)/usr/lib/pkgconfig/
630 ifneq ($(CONFIG_SOFT_FLOAT),y)
631 $(CP) $(PKG_INSTALL_DIR)/usr/include/libpostproc $(1)/usr/include/
632 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpostproc.{a,so*} $(1)/usr/lib/
633 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libpostproc.pc $(1)/usr/lib/pkgconfig/
634 endif
635 endef
636
637 define Build/InstallDev/mini
638 $(INSTALL_DIR) $(1)/usr/include
639 $(CP) $(PKG_INSTALL_DIR)/usr/include/lib{avcodec,avformat,avutil} $(1)/usr/include/
640 $(INSTALL_DIR) $(1)/usr/lib
641 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avformat,avutil}.{a,so*} $(1)/usr/lib/
642 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
643 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/lib{avcodec,avformat,avutil}.pc $(1)/usr/lib/pkgconfig/
644 endef
645
646 Build/InstallDev/audio-dec = $(Build/InstallDev/custom)
647
648 # XXX: attempt at installing "best" dev files available
649 ifeq ($(BUILD_VARIANT),custom)
650 # XXX: only install "custom" dev files if -full & -mini are not selected
651 ifeq ($(CONFIG_PACKAGE_libffmpeg-full)$(CONFIG_PACKAGE_libffmpeg-mini),)
652 Build/InstallDev = $(Build/InstallDev/custom)
653 endif
654 endif
655 ifeq ($(BUILD_VARIANT),audio-dec)
656 # XXX: only install "audio-dec" dev files if -full & -mini are not selected
657 ifeq ($(CONFIG_PACKAGE_libffmpeg-full)$(CONFIG_PACKAGE_libffmpeg-mini),)
658 Build/InstallDev = $(Build/InstallDev/audio-dec)
659 endif
660 endif
661 ifeq ($(BUILD_VARIANT),full)
662 # XXX: always install "full" dev files if -full is selected
663 Build/InstallDev = $(Build/InstallDev/full)
664 endif
665 ifeq ($(BUILD_VARIANT),mini)
666 # XXX: only install "mini" dev files if -full is not selected
667 ifeq ($(CONFIG_PACKAGE_libffmpeg-full),)
668 Build/InstallDev = $(Build/InstallDev/mini)
669 endif
670 endif
671
672 define Package/ffmpeg/install
673 $(INSTALL_DIR) $(1)/usr/bin
674 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ffmpeg $(1)/usr/bin/
675 endef
676
677 define Package/ffprobe/install
678 $(INSTALL_DIR) $(1)/usr/bin
679 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ffprobe $(1)/usr/bin/
680 endef
681
682 define Package/ffserver/install
683 $(INSTALL_DIR) $(1)/usr/bin
684 $(CP) $(PKG_INSTALL_DIR)/usr/bin/ffserver $(1)/usr/bin/
685 endef
686
687 define Package/libffmpeg-custom/install
688 $(INSTALL_DIR) $(1)/usr/lib
689 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avformat,avutil}.so.* $(1)/usr/lib/
690 endef
691
692 # Soft float is LGPL (no libpostproc); Hard float is GPL (yes libpostproc)
693 define Package/libffmpeg-full/install
694 $(INSTALL_DIR) $(1)/usr/lib
695 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avdevice,avfilter,avformat,avresample,avutil,swresample,swscale}.so.* $(1)/usr/lib/
696 ifneq ($(CONFIG_SOFT_FLOAT),y)
697 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpostproc.so.* $(1)/usr/lib/
698 endif
699 endef
700
701 define Package/libffmpeg-mini/install
702 $(INSTALL_DIR) $(1)/usr/lib
703 $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{avcodec,avformat,avutil}.so.* $(1)/usr/lib/
704 endef
705
706 Package/libffmpeg-audio-dec/install = $(Package/libffmpeg-custom/install)
707
708 $(eval $(call BuildPackage,ffmpeg))
709 $(eval $(call BuildPackage,ffprobe))
710 $(eval $(call BuildPackage,ffserver))
711 $(eval $(call BuildPackage,libffmpeg-audio-dec))
712 $(eval $(call BuildPackage,libffmpeg-full))
713 $(eval $(call BuildPackage,libffmpeg-mini))
714 ifneq ($(CONFIG_ALL),y)
715 $(eval $(call BuildPackage,libffmpeg-custom))
716 endif