Spec files, patches for RH7.3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi,

Enclosed are SPEC files and patches against nvrec-20020617 to support
compilation in RH 7.3. I've compiled it successfully using gcc-3.1-6 and
family from Rawhide for i686 targets.

I've modified the compilation process to look for an installed
ffmpeg-devel RPM package instead of depending on a local copy. I'm not
sure if it's a better way of handling dependencies, but I figure that it'd
be easier to upgrade ffmpeg versions this way. However, recompilation of
nvrec must be done if ffmpeg-devel is upgraded as it is linked statically
against the libraries. (I'm not familiar with dynamic linking and
building).

The spec files were derived from versions obtained via a search on
www.rpmfind.net. Attributions are maintained in the Changelog.
Most of the package dependencies can also be found from www.rpmfind.net.
I try to choose packages that are neutral (i.e., not too many
distro-specific dependencies), but very often you'll need to get the
source rpm and hack away the distro-specific stuff (This is especially
true for the PLD and Mandrake distro packages).

Hopefully it'll  be of use to someone. Getting nvrec into a proper RPM
package is a challenge, due to the large number of dependencies. I didn't
start out trying to do this, but I'm not very happy with 'make install'
either since it'll be difficult to cleanup my system later, so here's
the fruit of this labor. In the process I've had to read up on RPM spec
file formats, GNU automake/conf/etc.... definitely not for the faint of
heart (I'm all for taking advantage of someone else's hard work :) ).
There's probably lots of issues with the patches as well, but it works on
my system, most of the build warnings can be ignored as long as
compilation doesn't abort. YMMV.

T.C.

----
Wan Tat Chee (Lecturer)
School of Computer Science, Univ. Science Malaysia,
11800 Minden, Penang, Malaysia.          Ofc Ph: +604 657-7888 x 3617
Internet: tcwan@xxxxxxxxx            Web: http://nrg.cs.usm.my/~tcwan
GPG Key : http://nrg.cs.usm.my/~tcwan/tcw_gpg.asc
F'print :  FB0F CED7 85A5 ECF9 DEF0  50E8 A550 A0D2 8638 B1EB
# $Revision: 1.6 $, $Date: 2002/05/21 23:12:37 $
%define	ffmpegversion	0.4.5
Summary:	New Video Recorder
Name:		nvrec
Version:	20020617
Release:	1
License:	GPL
Group:		X11/Applications/Multimedia
Source0:	http://nvrec.sf.net/%{name}-%{version}.tar.gz
#Source1:	http://prdownloads.sourceforge.net/ffmpeg/ffmpeg-%{ffmpegversion}.tar.gz
Patch0:		%{name}-%{version}-bootstrap.patch
Patch1:		%{name}-%{version}-configure-in.patch
URL:		http://nvrec.sf.net/
Obsoletes:	NVrec
Requires:	divx4linux >= 20020418
Requires:	avifile >= 0.7.7
Requires:	ffmpeg >= 0.4.5
Requires:	rte
Requires:	libquicktime >= 0.9.0
Requires:	lame-libs >= 3.92
BuildRequires:  lame-libs-static >= 3.92
BuildRequires:	divx4linux >= 20020418
BuildRequires:	avifile-devel >= 0.7.7
BuildRequires:	ffmpeg-devel
BuildRequires:	rte
BuildRequires:	libquicktime-devel
BuildRequires:	libquicktime-progs
BuildRequires:	autoconf253
BuildRequires:	automake15
BuildRequires:	libtool
BuildRoot:	%{_tmppath}/%{name}-%{version}-root-%(id -u -n)

%define		_prefix		/usr/X11R6
%define		_qt_libdir	/usr/lib/libquicktime

%description
NewVideoRecorder is a high quality video capture toolkit for Linux.
It includes deep buffering of audio and video to reduce frame dropping,
a smooth dropping algorithm to keep the video smooth if dropping is
required, and dynamic stretching of the audio stream to exactly match
the video stream. It can use v4l1 and v4l2 devices as video sources,
and OSS devices as an audio source. It can produce QuickTime, AVI,
NuppelVideo 0.4 files, and MPEG-1 files.

%prep
%setup
%patch0 -p1
%patch1 -p1
mv configure.in configure.ac
./bootstrap

%build

%configure
make

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install
mkdir -p %{buildroot}%{_sysconfdir}
install -m 644 etc/* %{buildroot}%{_sysconfdir}


%clean
rm -rf $RPM_BUILD_ROOT

%post   -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/*
%attr(755,root,root) %{_sysconfdir}/*
%attr(755,root,root) %{_qt_libdir}/*
%doc AUTHORS COPYING INSTALL README CREDITS ChangeLog KNOWN_BUGS

%changelog
* Wed Jun 19 2002 TC Wan <tcwan@xxxxxxxxx>
- Update to 20020617 release

* Tue Jun 18 2002 TC Wan <tcwan@xxxxxxxxx>
- Recompile using gcc-3.1-6

* Sat Jun 15 2002 TC Wan <tcwan@xxxxxxxxx>
- Cleanup for 20020530 release, removed PLD specific stuff
- Include dependencies on prebuilt ffmpeg and other RPM packages, etc.

* Thu Jun 6 2002 PLD Team <feedback@xxxxxxxxxx>
All persons listed below can be reached at <cvs_login>@pld.org.pl

$Log: NVrec.spec,v $
Revision 1.6  2002/05/21 23:12:37  kloczek
perl -pi -e "s/^automake -a -c -f --foreing/\%\{__automake\}/; \
             s/^automake -a -c -f/\%\{__automake\}/; \
	     s/^autoconf/\%\{__autoconf\}/"

Revision 1.5  2002/02/22 23:28:37  kloczek
- removed all Group fields translations (oure rpm now can handle translating
  Group field using gettext).

Revision 1.4  2002/01/18 02:12:12  kloczek
perl -pi -e "s/pld-list\@pld.org.pl/feedback\@pld.org.pl/"

Revision 1.3  2001/09/26 13:49:55  qboosh
- BuildRequires: autoconf, automake, libtool
- added URLs, proper description (from freshmeat), pl translations
- release 2

Revision 1.2  2001/08/31 12:44:13  pascalek
- release++ for avifile from BuildRequires

Revision 1.1  2001/08/31 12:35:51  pascalek
- initial revision
- some SIGSEGV - possible one of that from KNOW_BUGS


--- nvrec-20020617/configure.in.orig	Wed Jun 19 15:50:20 2002
+++ nvrec-20020617/configure.in	Wed Jun 19 15:53:12 2002
@@ -18,7 +18,7 @@
 AC_PROG_CC
 AC_PROG_CXX
 AC_PROG_INSTALL
-AC_PROG_RANLIB
+AC_PROG_LIBTOOL
 AC_PROG_MAKE_SET
 
 AC_OPT_CFLAGS(-pthread -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Wall)
@@ -133,10 +133,12 @@
 	    enable_ffmpeg=yes)
 AC_MSG_CHECKING(for ffmpeg)
 if test x$enable_ffmpeg = xyes ; then
-  if test -f ../ffmpeg/libav/libav.a ; then
-    HAVE_FFMPEG=yes
-    FFMPEG_CFLAGS="-I../ffmpeg/libav -I../ffmpeg/libavcodec"
-    FFMPEG_LIBS="../ffmpeg/libav/libav.a ../ffmpeg/libavcodec/libavcodec.a"
+  AC_CHECK_LIB(avcodec, avcodec_init, HAVE_FFMPEG=yes, HAVE_FFMPEG=no,-lm)
+  AC_CHECK_HEADER(ffmpeg/config.h, :, HAVE_FFMPEG=no)
+  if eval "test x$HAVE_FFMPEG = xyes"; then
+    FFMPEG_CFLAGS="-I/usr/include/ffmpeg/libav -I/usr/include/ffmpeg/libavcodec ${MIN_CFLAGS}"
+
+    FFMPEG_LIBS="-lav -lavcodec"
     AC_MSG_RESULT(yes)
   else
     if test -f ffmpeg/libav/libavformat.a ; then
--- nvrec-20020617/bootstrap.orig	Wed Jun 19 15:23:27 2002
+++ nvrec-20020617/bootstrap	Thu Jun 20 11:52:49 2002
@@ -1,6 +1,7 @@
 #!/bin/sh
-aclocal
-autoheader
-automake --add-missing --copy
-autoconf
+libtoolize --copy --force
+aclocal-1.5
+autoheader-2.53
+automake-1.5 --add-missing --copy
+autoconf-2.53
 
Name: ffmpeg
Version: 0.4.5
Release: 6
Copyright: GPL
Group: Applications/Multimedia
Url: http://ffmpeg.sourceforge.net/
Source: http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Patch0: %{name}-libinstall.patch
Patch1: %{name}-fix-avsync.patch
Patch2: %{name}-fix-qloss.patch
Distribution: N/A
Packager: Dag Wieers <dag@xxxxxxxxxx>
Summary: Linux DVD player
BuildRoot: %{_tmppath}/%{name}-%{version}
Prefix: %{_prefix}

%description
FFmpeg is the first complete and free Internet Live Audio and Video
Broadcasting solution. FFMpeg aims at being the command line tool to
handle audio and video. It is a "three-in-one" solution.

FFmpeg includes a soft VCR capable of encoding in many different
formats simultaneously, a streaming server for Netcasting multimedia
and is available under the GNU General Public License.

FFmpeg generates streaming files, in many popular formats
simultaneously, faster than any other solution.

%package devel
Summary: Static Libraries and Header files for ffmpeg
Group: Development/Libraries
Requires: %{name} = %{version}

%description devel
Static Libraries and Header files for ffmpeg

%prep
%setup -n %{name}
%patch0 -p1
%patch1 -p0
%patch2 -p0

%build
%configure
make

%install
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_libdir}
mkdir -p %{buildroot}%{_includedir}/ffmpeg
mkdir -p %{buildroot}%{_includedir}/ffmpeg/libav
mkdir -p %{buildroot}%{_includedir}/ffmpeg/libavcodec
%makeinstall

%clean
rm -rf %{buildroot}

%files
%doc Changelog INSTALL README doc/*
%{_bindir}/*

%files devel
%{_includedir}/ffmpeg/*
%{_libdir}/*

%changelog
* Tue Jun 18 2002 TC Wan <tcwan@xxxxxxxxx>
- Recompiled with gcc-3.1-6

* Wed Jun 12 2002 TC Wan <tcwan@xxxxxxxxx>
- Split output into binary and devel packages
- Added fix-avsync and fix-qloss patches from NVRec homepage

* Sun Aug 19 2001 Dag Wieers <dag@xxxxxxxxxx>
- Initial package
--- ffmpeg/Makefile.orig	Mon Jun 10 13:01:33 2002
+++ ffmpeg/Makefile	Mon Jun 10 13:10:09 2002
@@ -11,6 +11,10 @@
 endif
 
 PROG= ffmpeg ffserver
+LIB= libavcodec/libavcodec.a libav/libav.a
+INCL_COMMON= bswap.h config.h
+INCL_LIBAV= libav/avformat.h libav/avio.h 
+INCL_LIBAVCODEC= libavcodec/avcodec.h libavcodec/common.h libavcodec/fastmemcpy.h 
 
 all: lib $(PROG)
 
@@ -29,6 +33,10 @@
 
 install: all
 	install -s -m 755 $(PROG) $(prefix)/bin
+	install -m 644 $(LIB) $(prefix)/lib
+	install -m 644 $(INCL_COMMON) $(prefix)/include/ffmpeg
+	install -m 644 $(INCL_LIBAV) $(prefix)/include/ffmpeg/libav
+	install -m 644 $(INCL_LIBAVCODEC) $(prefix)/include/ffmpeg/libavcodec
 
 clean: 
 	$(MAKE) -C libavcodec clean

[Index of Archives]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [Linux USB]

Powered by Linux