[vlc-devel] Re: Fedora Test Version RPM

Torsten Spindler spindler at hbt.arch.ethz.ch
Mon Sep 20 13:17:03 CEST 2004


On Mon, 2004-09-20 at 12:29, Jason Luka wrote:
> A: I believe xosd and one other RPM have trouble with backwards 
> compatibility with RH9 and would have to be recompiled specifically for 
> RH9.  Due to the glibc and xfree86 change, vlc would have to be 
> recompiled specifically for RH9.  Obviously, I can't do that because I 
> just don't have enough machines to keep that many versions of Linux 
> around.  

Building the RPMs is no problem here, I can do that. Usually I grab the
FC2 or whatever source RPM and build on RHEL3 or RH9. While the RH9
installations will be replaced 'til end of this year, the RHEL3 installs
will stay for quite a while.


> As far as the spec file, it should work properly as soon as the 
> %define mozver variable is changed.  I believe the number should 1.4 for 
> RH9.  Run 'ls /usr/lib/mozilla*' and look for a directory named 
> 'mozilla-#.#' 

There were some more problems with the 0.7.2 spec on RH9 and RHEL3.
Especially as I wanted my home made spec to be user buildable the
mozilla part was first hard to do, but it works quite good now. I think
I sent this info to vlc-devel before, but here it is in short taken from
the spec I use for vlc-trunk build:

+++

%prep
rm -rf %{buildroot}
%setup -q -n %{name}-trunk
mkdirhier %{buildroot}/%{_libdir}/mozilla-%{mozver}/plugins/
 
%build
cp %{_libdir}/mozilla/plugins/mozplugger.so
%{buildroot}/%{_libdir}/mozilla-%{mozver}/plugins/mozplugger.so
 
# TS automatically use correct xpidl and idl directories
export XPIDL=%{_libdir}/mozilla-%mozver/xpidl
export XPIDL_INCL=-I/usr/share/idl/mozilla-%mozver/
 ./bootstrap
 
%configure \

...

Exec=vlc
Terminal=0
Type=Application
EOF
 
cp -a %{buildroot}%{_libdir}/mozilla/*
%{buildroot}%{_libdir}/mozilla-%{mozver}
-f
rm -rf %{buildroot}%{_libdir}/mozilla
 
mkdir -p %{buildroot}%{_datadir}/applications

+++

The complete spec is at
http://fett.ethz.ch/~spindler/vlc-trunk.fc2.spec.


>  As far as a yum repository, I never put one together, so 
> I wouldn't quite know what to do yet.

It's quite easy: copy all rpms you want in a directory that is called
appropriately, like fedora/core/vlc/2/i386 or rhel/vlc/3/i386 or
redhat/vlc/9/i386. On that directory call yum-arch, for my home made vlc
rpms I do 
yum-arch /var/data/yum-repository/rhel/caad.hbt.arch.ethz.ch/3/i386
This writes some headers in the headers directory in the directory
specified as arguments. On the client I add to /etc/yum.conf

[caad-rpms]
name=CAAD.HBT.ARCH.ETHZ.CH $releasever $basearch - CAAD Custom Updates
baseurl=http://HOSTNAME/yum/fedora/core/caad.hbt.arch.ethz.ch/$releasever/$basearch/

and run yum update and yum install vlc. Setting up an apt repository
works likewise. 


> I cleaned up the spec file using the recommended enable lines, keeping 
> --enable-pp and --enable-gpl with the ffmpeg line.  I don't know about 
> recent versions of ffmpeg, but previously I always had trouble without 
> enable-pp.  Also changed the line to --with-ffmpeg=/usr.  In additional 
> to what was recommended I also kept --enable-xvid, -dv, -sdl, -xosd, 
> -slp, and -plugins.  I'll work on a new ffmpeg RPM and try to hack 
> together a livedotcom RPM.

I attach the ffmpeg spec I use to build ffmpeg from cvs. Maybe it's
somewhat useful for you. It is based on the freshrpms spec from Matthias
Saou.

Bye,
Torsten
-------------- next part --------------
%define date 2004-08-31
%define sqdate %(echo %{date} | tr -d '-')

Summary: Hyper fast MPEG1/MPEG4/H263/RV and AC3/MPEG audio encoder.
Name: ffmpeg
Version: 0.4.9.pre1
Release: 1%{?date:.%{sqdate}}.fc2.ts
License: GPL
Group: System Environment/Libraries
Source: http://ffmpeg.sourceforge.net/cvs/%{name}-%{?date:cvs-%{date}}%{!?date:%{version}}.tar.gz
URL: http://ffmpeg.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-root
Requires: imlib2, SDL, freetype, zlib
%{!?_without_lame:Requires: lame}
%{!?_without_vorbis:Requires: libogg, libvorbis}
%{!?_without_faad:Requires: faad2}
%{!?_without_faac:Requires: faac}
BuildRequires: imlib2-devel, SDL-devel, freetype-devel, zlib-devel, tetex
%{!?_without_lame:BuildRequires: lame-devel}
%{!?_without_vorbis:BuildRequires: libogg-devel, libvorbis-devel}
%{!?_without_faad:BuildRequires: faad2-devel}
%{!?_without_faac:BuildRequires: faac-devel}
%{!?_without_a52dec:BuildRequires: a52dec-devel}
Provides: libavcodec.so, libavformat.so

%description
FFmpeg is a very fast video and audio converter. It can also grab from a
live audio/video source.
The command line interface is designed to be intuitive, in the sense that
ffmpeg tries to figure out all the parameters, when possible. You have
usually to give only the target bitrate you want. FFmpeg can also convert
from any sample rate to any other, and resize video on the fly with a high
quality polyphase filter.

Available rpmbuild rebuild options :
--without : lame vorbis faad a52dec altivec


%package devel
Summary: Header files and static library for the ffmpeg codec library.
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}

%description devel
FFmpeg is a very fast video and audio converter. It can also grab from a
live audio/video source.
The command line interface is designed to be intuitive, in the sense that
ffmpeg tries to figure out all the parameters, when possible. You have
usually to give only the target bitrate you want. FFmpeg can also convert
from any sample rate to any other, and resize video on the fly with a high
quality polyphase filter.

Install this package if you want to compile apps with ffmpeg support.


%prep
%setup -q -n %{name}
# -%{?date:cvs-%{date}}%{!?date:%{version}}


%build
%configure \
    --enable-shared \
    --enable-pp \
    --enable-gpl \
%ifarch %{ix86}
     --disable-mmx \
%endif
%ifarch ppc
    %{?_without_altivec: --disable-altivec} \
%endif
    %{!?_without_lame: --enable-mp3lame} \
    %{!?_without_vorbis: --enable-vorbis} \
    %{!?_without_faad: --enable-faad} \
    %{!?_without_faac: --enable-faac} \
    %{!?_without_a52dec: --enable-a52}
make %{?_smp_mflags}

%install
rm -rf %{buildroot}
%makeinstall

# Make installlib is broken in 0.4.6-8, so we do it by hand
install -m 644 libavcodec/libavcodec.a %{buildroot}%{_libdir}/
install -m 644 libavformat/libavformat.a %{buildroot}%{_libdir}/

# Create compat symlink
mkdir %{buildroot}%{_libdir}/{libavcodec,libavformat}
ln -s ../libavcodec.a %{buildroot}%{_libdir}/libavcodec/libavcodec.a
ln -s ../libavformat.a %{buildroot}%{_libdir}/libavformat/libavformat.a

# Remove from the included docs
rm -f doc/Makefile doc/*.1

%clean
rm -rf %{buildroot}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig


%files
%defattr(-, root, root)
%doc COPYING CREDITS Changelog README doc/
%{_bindir}/*
%{_libdir}/libavcodec-*.so
%{_libdir}/libavcodec.so
%{_libdir}/libavformat-*.so
%{_libdir}/libavformat.so
%{_libdir}/vhook
%{_mandir}/man1/ffmpeg.1.gz
%{_mandir}/man1/ffplay.1.gz
%{_mandir}/man1/ffserver.1.gz

%files devel
%defattr(-, root, root)
%{_includedir}/%{name}
%{_libdir}/libavcodec
%{_libdir}/libavcodec.a
%{_libdir}/libavformat
%{_libdir}/libavformat.a


%changelog
* Tue Sep 7 2004 Torsten Spindler
- added tetex as build requirements, needed for manpages
* Sat Jul 24 2004 Torsten Spindler
- added manpages again
* Thu May 13 2004 Torsten Spindler - 0.4.8-3.fr
- Enable gpl
- removed man1
* Sat Feb 21 2004 Matthias Saou <http://freshrpms.net/> - 0.4.8-2.fr
- Add faac support.
- Enable pp.
- Remove unneeded explicit main a52dec dependency.

* Fri Nov  7 2003 Matthias Saou <http://freshrpms.net/> - 0.4.8-1.fr
- Update to 0.4.8.
- Steal some changes back from Troy Engel : Disabling mmx to make the build
  succeed and added man pages.
- Re-enabled auto provides but added explicit libavcodec.so and libavformat.so.
- Rebuild for Fedora Core 1.

* Mon Aug 25 2003 Matthias Saou <matthias.saou at est.une.marmotte.net>
- Update to 0.4.7.

* Fri Aug  8 2003 Matthias Saou <matthias.saou at est.une.marmotte.net>
- Update to todays's snapshot.

* Tue Jul  1 2003 Matthias Saou <matthias.saou at est.une.marmotte.net>
- Update to a CVS snapshot as videolan-client 0.6.0 needs it.
- Enable faad, imlib2 and SDL support.
- Force OPTFLAGS to remove -mcpu, -march and -pipe that all prevent building!

* Mon Mar 31 2003 Matthias Saou <matthias.saou at est.une.marmotte.net>
- Rebuilt for Red Hat Linux 9.
- Hardcode provides in order to get it right :-/

* Tue Feb 25 2002 Matthias Saou <matthias.saou at est.une.marmotte.net>
- Moved libavcodec.so to the main package to fix dependency problems.

* Wed Feb 19 2002 Matthias Saou <matthias.saou at est.une.marmotte.net>
- Major spec file updates, based on a very nice Mandrake spec.
- Revert to the 0.4.6 release as CVS snapshots don't build.

* Tue Feb  4 2002 Matthias Saou <matthias.saou at est.une.marmotte.net>
- Initial RPM release.



More information about the vlc-devel mailing list