lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

Makefile (15819B)


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