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