New RH 7.3 SPEC files for nvrec-20020710

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



Justin,

I've created new RH 7.3 SPEC files for nvrec-20020710. This is built using
gcc-3.1-7 from RH Rawhide.

They depend on prebuilt ffmpeg and ffmpeg-devel packages (spec and patches
included, built against ffmpeg-0.4.5, obtainable from www.rpmfind.net as
ffmpeg-0.4.5-dag.1.src.rpm), The two patches for fixing avsync and qloss
on the nvrec website are also needed for building ffmpeg.
[I'm retransmitting the ffmpeg spec file and patches in case people want
to retrieve them along with the nvrec spec file]

You can put them up for download on the nvrec website if you like.

The only thing I couldn't figure out is how to make sure that upgrading
via 'rpm -Uvh nvrec*.rpm' would run the %preun script for the old version
before upgrading to the new version. i.e., I don't see the effects of
the %post script for the new version. Can any SPEC file gurus comment?

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:	20020710
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-ac.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 >= 0.4.5
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		_transform	*-redhat-linux

%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
./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
pushd %{_bindir} > /dev/null 2>&1
    ln -sf %{_transform}-divx4rec divx4rec
    ln -sf %{_transform}-divxrec divxrec
    ln -sf %{_transform}-ffmpegrec ffmpegrec
    ln -sf %{_transform}-mccatch mccatch
    ln -sf %{_transform}-mcplay mcplay
    ln -sf %{_transform}-mcstats mcstats
    ln -sf %{_transform}-mcthrow mcthrow
    ln -sf %{_transform}-nuvrec nuvrec
    ln -sf %{_transform}-qt2divx qt2divx
    ln -sf %{_transform}-qtrec qtrec
    ln -sf %{_transform}-timer timer
popd > /dev/null 2>&1

%preun 
pushd %{_bindir} > /dev/null 2>&1
    rm -f divx4rec > /dev/null 2>&1
    rm -f divxrec > /dev/null 2>&1
    rm -f ffmpegrec > /dev/null 2>&1
    rm -f mccatch > /dev/null 2>&1
    rm -f mcplay > /dev/null 2>&1
    rm -f mcstats > /dev/null 2>&1
    rm -f mcthrow > /dev/null 2>&1
    rm -f nuvrec > /dev/null 2>&1
    rm -f qt2divx > /dev/null 2>&1
    rm -f qtrec > /dev/null 2>&1
    rm -f timer > /dev/null 2>&1
popd > /dev/null 2>&1

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

%changelog
* Fri Jul  5 2002 TC Wan <tcwan@xxxxxxxxx>
- Recompile using gcc-3.1-7

* Tue Jun 25 2002 TC Wan <tcwan@xxxxxxxxx>
- Update to 20020624 release, added old names softlinks to real executables

* 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-20020710/configure.ac.orig	Mon Jul 15 13:28:17 2002
+++ nvrec-20020710/configure.ac	Mon Jul 15 13:38:21 2002
@@ -143,18 +143,22 @@
 	    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(av, register_all, HAVE_FFMPEG=yes, HAVE_FFMPEG=no,-lavcodec -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"
+    FFMPEG_LIBS="-lav -lavcodec"
+
     rm -f ffmpegfile_core.c
     ln -s ffmpegfile_core-045.c ffmpegfile_core.c
     AC_MSG_RESULT(yes - 0.4.5)
   else
-    if test -f ../ffmpeg/libav/libavformat.a ; then
-      HAVE_FFMPEG=yes
-      FFMPEG_CFLAGS="-I../ffmpeg/libav -I../ffmpeg/libavcodec"
-      FFMPEG_LIBS="../ffmpeg/libav/libavformat.a ../ffmpeg/libavcodec/libavcodec.a"
+    AC_CHECK_LIB(avformat, register_all, HAVE_FFMPEG=yes, HAVE_FFMPEG=no,-avcodec -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"
+      FFMPEG_LIBS="-lavformat -lavcodec"
+
       rm -f ffmpegfile_core.c
       ln -s ffmpegfile_core-046.c ffmpegfile_core.c
       AC_MSG_RESULT(yes - 0.4.6)
--- nvrec-20020710/bootstrap.orig	Tue Jun 25 14:08:42 2002
+++ nvrec-20020710/bootstrap	Tue Jun 25 14:09:15 2002
@@ -8,8 +8,8 @@
 echo "configure.in, please upgrade to newer versions of autoconf and"
 echo "automake."
 
-aclocal
-autoheader
-automake --add-missing --copy
-autoconf
+aclocal-1.5
+autoheader-2.53
+automake-1.5 --add-missing --copy
+autoconf-2.53
 
Name: ffmpeg
Version: 0.4.5
Release: 7
Copyright: GPL
Group: Applications/Multimedia
Url: http://ffmpeg.sourceforge.net/
Source: http://prdownloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz
Patch0: http://mediabox.loc/%{name}-libinstall.patch
Patch1: http://mediabox.loc/%{name}-fix-avsync.patch
Patch2: http://mediabox.loc/%{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
* Fri Jul  7 2002 TC Wan <tcwan@xxxxxxxxx>
- Recompiled with gcc-3.1-7

* 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