ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
* [sisyphus] сборка ffmpeg
@ 2015-12-05 20:44 Шенцев Алексей
  2015-12-06  0:13 ` Ilya Mashkin
  0 siblings, 1 reply; 9+ messages in thread
From: Шенцев Алексей @ 2015-12-05 20:44 UTC (permalink / raw)
  To: ALT Linux Sisyphus discussions

[-- Attachment #1: Type: text/plain, Size: 394 bytes --]

Всем привет!
Понадобился для одной проги ffmpeg.
Взял

http://packages.altlinux.org/ru/t6/srpms/ffmpeg/spec

внёс в него нужные изменения и при сборке получил:

ошибка: Пакет уже существует: %package -n ffmpeg

В чём косяк?

-- 
С уважением,
Шенцев Алексей.


[-- Attachment #2: ffmpeg.spec --]
[-- Type: text/x-rpm-spec, Size: 8774 bytes --]

%define set_disable() %{expand:%%force_disable %{1}} %{expand:%%undefine _enable_%{1}}
%define set_enable() %{expand:%%force_enable %{1}} %{expand:%%undefine _disable_%{1}}
%define subst_enable_with() %{expand:%%{?_enable_%{1}:--enable-%{2}} } %{expand:%%{?_disable_%{1}:--disable-%{2}} }

%def_enable gpl
%def_enable version3
%def_enable libxvid
%def_enable libx264
%def_enable postproc
%def_enable libmp3lame
%def_enable libvorbis
%def_disable libfaac
%def_disable nonfree
%def_enable libgsm
%def_enable libdc1394
%def_enable shared
%def_enable static
%def_enable pthreads
%def_enable zlib
%def_enable mmx
%def_disable memalign_hack
%def_enable ffserver
%def_enable ffplay
%def_enable libschroedinger
%def_disable avisynth
%def_disable libnut
%def_enable libtheora
%def_enable debug
%def_enable bzlib
%def_enable vdpau
%def_enable libopencore_amrwb
%def_enable libopencore_amrnb
%def_enable libvpx
%def_enable libv4l2
%def_enable librtmp

%if_disabled gpl
%set_disable libxvid
%set_disable libx264
%set_disable postproc
%endif

%if_disabled version3
%set_disable libopencore_amrwb
%set_disable libopencore_amrnb
%endif

%if_disabled nonfree
%set_disable libfaac
%endif

%if_enabled mmx
%set_verify_elf_method textrel=relaxed
%endif

Name: ffmpeg
Version: 2.8.3
Release: alt1
Epoch: 1

Summary: Hyper fast MPEG1/MPEG4/H263/RV and AC3/MPEG audio encoder (compat package)
License: %{!?_enable_gpl:L}GPL%{?_enable_version3:3}
Group: Video
Url: http://ffmpeg.mplayerhq.hu

#Source0: %name-%version-%release.tar
Source0: %name-%version.tar.bz2

BuildRequires: libfreetype-devel texi2html
BuildRequires: libX11-devel libXext-devel libXvMC-devel libXfixes-devel
BuildRequires: yasm
BuildRequires: libalsa-devel
BuildRequires: libva-devel
BuildRequires: perl-podlators

%{?_enable_ffplay:BuildRequires: libSDL-devel}
%{?_enable_libmp3lame:BuildRequires: liblame-devel}
%{?_enable_libvorbis:BuildRequires: libvorbis-devel}
%{?_enable_libfaac:BuildRequires: libfaac-devel}
%{?_enable_libgsm:BuildRequires: libgsm-devel}
%{?_enable_libxvid:BuildRequires: libxvid-devel}
%{?_enable_libx264:BuildRequires: libx264-devel >= 0.0-alt54}
%{?_enable_libdc1394:BuildRequires: libdc1394-devel libraw1394-devel}
%{?_enable_libdirac:BuildRequires: libdirac-devel >= 0.9.1-alt1 libstdc++-devel gcc4.1-c++}
%{?_enable_libschroedinger:BuildRequires: libschroedinger-devel}
%{?_enable_libnut:BuildRequires: libnut-devel}
%{?_enable_libtheora:BuildRequires: libtheora-devel}
%{?_enable_bzlib:BuildRequires: bzlib-devel}
%{?_enable_vdpau:BuildRequires: libvdpau-devel}
%{?_enable_libopencore_amrwb:BuildRequires: libopencore-amrwb-devel}
%{?_enable_libopencore_amrnb:BuildRequires: libopencore-amrnb-devel}
%{?_enable_libvpx:BuildRequires: libvpx-devel}
%{?_enable_libv4l2:BuildRequires: libv4l-devel}
%{?_enable_librtmp:BuildRequires: librtmp-devel}

%package -n %name
Summary: ffmpeg files.
Group: Video

Provides: ffmpeg = %epoch:%version-%release
Provides: ffplay = %epoch:%version-%release
Provides: ffserver = %epoch:%version-%release

Obsoletes: ffmpeg < %epoch:%version-%release
Obsoletes: ffplay < %epoch:%version-%release
Obsoletes: ffserver < %epoch:%version-%release

%description -n %name
%name is a hyper fast realtime audio/video encoder, a streaming
server and a generic audio and video file converter.

It can grab from a standard Video4Linux video source and convert it
into several file formats based on DCT/motion compensation encoding.
Sound is compressed in MPEG audio layer 2 or using an AC3 compatible
stream.

%package -n lib%name
Summary: Shared libraries to run ffmpeg.
Group: System/Libraries

Provides: libavcodec = %epoch:%version-%release
Provides: libavdevice = %epoch:%version-%release
Provides: libavfilter = %epoch:%version-%release
Provides: libavformat = %epoch:%version-%release
Provides: libavutil = %epoch:%version-%release
Provides: libpostproc = %epoch:%version-%release
Provides: libswresample = %epoch:%version-%release
Provides: libswscale = %epoch:%version-%release

Obsoletes: libavcodec < %epoch:%version-%release
Obsoletes: libavdevice < %epoch:%version-%release
Obsoletes: libavfilter < %epoch:%version-%release
Obsoletes: libavformat < %epoch:%version-%release
Obsoletes: libavutil < %epoch:%version-%release
Obsoletes: libpostproc < %epoch:%version-%release
Obsoletes: libswresample < %epoch:%version-%release
Obsoletes: libswscale < %epoch:%version-%release

%description -n lib%name
This package contains ffmpeg shared libraries.

%description -n doc
This package contains documentation for ffmpeg project.

%package -n doc
Summary: Documentation files for ffmpeg project.
Group: Video
BuildArch: noarch
Provides: %name-doc = %epoch:%version-%release
Obsoletes: %name-doc

%description -n devel
This package contains headers files for ffmpeg project.

%package -n devel
Summary: headers files for ffmpeg project.
Group: Development/Other
BuildArch: noarch
Provides: %name-devel = %epoch:%version-%release
Obsoletes: %name-devel < %epoch:%version-%release
Requires: %name = %version-%release

%prep
%setup
sed -i 's/UNKNOWN/%version/' version.sh

%build
# we have -O3 by default with --enable-opts
%add_optflags -frename-registers
%ifarch x86_64
%add_optflags %optflags_shared
%else
%ifarch %ix86
%add_optflags %{?_enable_mmx:-DRUNTIME_CPUDETECT}
%endif
%endif
./configure \
    --prefix=%_prefix \
    --libdir=%_libdir \
    --shlibdir=%_libdir \
    --mandir=%_mandir \
    %{subst_enable gpl} \
    %{subst_enable postproc} \
    %{subst_enable pthreads} \
    %{subst_enable shared} \
    %{subst_enable libvorbis} \
    %{subst_enable libfaac} \
    %{subst_enable libxvid} \
    %{subst_enable libx264} \
    %{subst_enable libmp3lame} \
    %{subst_enable libgsm} \
    %{subst_enable libdc1394} \
    %{subst_enable zlib} \
    %{subst_enable_with mpegaudio_hp mpegaudio-hp} \
    %{subst_enable mmx} \
    %{subst_enable iwmmxt} \
    %{subst_enable_with memalign_hack memalign-hack} \
    %{subst_enable ffserver} \
    %{subst_enable ffplay} \
    %{subst_enable libdirac} \
    %{subst_enable libschroedinger} \
    --enable-avfilter \
    %{subst_enable avisynth} \
    %{subst_enable libnut} \
    %{subst_enable libtheora} \
    %{subst_enable version3} \
    %{subst_enable_with libopencore_amrwb libopencore-amrwb} \
    %{subst_enable_with libopencore_amrnb libopencore-amrnb} \
    --enable-hardcoded-tables \
    --enable-runtime-cpudetect \
    --enable-x11grab \
    --enable-bzlib \
    --disable-ffprobe \
    %{subst_enable libvpx} \
    %{subst_enable libv4l2} \
    %{subst_enable nonfree} \
    %{subst_enable librtmp} \
%if_enabled debug
    --enable-debug \
    --disable-stripping \
%else
    --disable-debug \
%endif
    --extra-cflags="%optflags" \
    --extra-version='%release\ \(r%svnrev\)'

%make

%install
%make_install \
		INCDIR="%buildroot%_includedir" \
		DESTDIR="%buildroot" \
		MANDIR="%buildroot%_mandir" install

%{?_enable_ffserver:install -pD -m640 doc/ffserver.conf %buildroot%_sysconfdir/ffserver.conf}

# compatibility for older clients..
install -d -m 0755 %buildroot%_includedir/%name
for l in codec format util; do
    for f in %buildroot%_includedir/libav$l/*; do
		ln -sf ../libav$l/$(basename "$f") %buildroot%_includedir/%name/
    done
done

for f in %buildroot%_includedir/libswscale/*; do
    ln -sf ../libswscale/$(basename "$f") %buildroot%_includedir/%name/
done

%if_enabled postproc
install -d -m 0755 %buildroot%_includedir/postproc
for f in %buildroot%_includedir/libpostproc/*; do
    ln -sf ../libpostproc/$(basename "$f") %buildroot%_includedir/postproc/
    ln -sf ../libpostproc/$(basename "$f") %buildroot%_includedir/%name/
done
%endif

bzip2 --best --force --keep -- Changelog

%files

%_sysconfdir/*
%_bindir/*
%_datadir/%name/*

#    /etc/ffserver.conf
#    /usr/bin/ffmpeg
#    /usr/bin/ffplay
#    /usr/bin/ffserver

%files -n doc

%doc %name/*
%_man1dir/*
%_man3dir/*
%_datadir/%name/examples/*

%files -n libffmpeg

#%_libdir/libavcodec.so.*
#%_libdir/libavdevice.so.*
#%_libdir/libavfilter.so.*
#%_libdir/libavformat.so.*
#%_libdir/libavutil.so.*
#%_libdir/libpostproc.so.*
#%_libdir/libswresample.so.*
#%_libdir/libswscale.so.*

%_libdir/*
%_libdirpkgconfig/*

%files -n devel
%_includedir/%name/*
%_includedir/libavcodec/*
%_includedir/libavdevice/*
%_includedir/libavformat/*
%_includedir/libavformat/*
%_includedir/libavutil/*
%_includedir/libpostproec/*
%_includedir/libswresample/*
%_includedir/libswscale/*
%_includedir/postproc/*

%changelog
* Wed Dec 26 2012 Igor Vlasenko <viy@altlinux.ru> 1:0.6-alt5.M60T.1
- rebuild with libvpx

* Wed May 02 2012 Andrey Cherepanov <cas@altlinux.org> 1:0.6-alt5.M60P.2
- Add provides/obsoletes

* Mon Apr 30 2012 Andrey Cherepanov <cas@altlinux.org> 1:0.6-alt5.M60P.1
- Build compat packages for old version of ffmpeg

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-12-07 21:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-05 20:44 [sisyphus] сборка ffmpeg Шенцев Алексей
2015-12-06  0:13 ` Ilya Mashkin
2015-12-06  1:25   ` Шенцев Алексей
2015-12-06  1:54     ` Ilya Mashkin
2015-12-07 13:52       ` Michael Shigorin
2015-12-07 15:07         ` Евгений Терешков
2015-12-07 16:22         ` Шенцев Алексей
2015-12-07 20:21           ` ruslandh
2015-12-07 21:24             ` Michael Shigorin

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git