mediastreamer2.spec.in 2.46 KB
Newer Older
aymeric's avatar
aymeric committed
1 2
# -*- rpm-spec -*-
# 
Simon Morlat's avatar
Simon Morlat committed
3
# mediastreamer2 -- A media streaming library for telephony applications
aymeric's avatar
aymeric committed
4 5 6 7 8 9 10
# 

%ifarch %ix86
%define		mediastreamer2_cpu	pentium4
%endif

Summary:	Audio/Video real-time streaming
11 12
Name:		mediastreamer
Version:	@MEDIASTREAMER_VERSION@
aymeric's avatar
aymeric committed
13 14 15 16
Release:	1
License:	LGPL
Group:		Applications/Communications
URL:		http://linphone.org/mediastreamer2/
17
Source0:	%{name}-@MEDIASTREAMER_VERSION@.tar.gz
aymeric's avatar
aymeric committed
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot
%ifarch %ix86
BuildArch:	i686
%endif

%description
Mediastreamer2 is a GPL licensed library to make audio and video
real-time streaming and processing. Written in pure C, it is based
upon the oRTP library.

%package        devel
Summary:        Headers, libraries and docs for the mediastreamer2 library
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}

%description    devel
Mediastreamer2 is a GPL licensed library to make audio and video
real-time streaming and processing. Written in pure C, it is based
upon the ortp library.

This package contains header files and development libraries needed to
develop programs using the mediastreamer2 library.

%ifarch %ix86
%define	mediastreamer2_arch_cflags -malign-double -march=i686 -mcpu=%{mediastreamer2_cpu}
%else
# Must be non-empty
%define mediastreamer2_arch_cflags -Wall
%endif
%define mediastreamer2_cflags %mediastreamer2_arch_cflags -Wall -g -pipe -pthread -O3 -fomit-frame-pointer -fno-schedule-insns -fschedule-insns2 -fstrict-aliasing

Simon Morlat's avatar
Simon Morlat committed
49 50 51 52 53 54 55 56

%define opt_with() %{expand:%%global with_%{1} %%{?_with_%{1}:1}%%{?!_with_%{1}:0}}
%define opt_without() %{expand:%%global with_%{1} %%{!?_without_%{1}:1}%%{?_without_%{1}:0}}

%opt_with video       - build with video features

%define have_video %{?_with_video:1}%{!?_with_video:0}

aymeric's avatar
aymeric committed
57 58 59 60
%prep
%setup -q

%build
Simon Morlat's avatar
Simon Morlat committed
61 62 63 64 65 66 67
options="--enable-shared --enable-static"
%if !%{have_video}
options="$options --disable-video"
%endif

%configure $options
	
aymeric's avatar
aymeric committed
68 69 70 71 72 73 74 75 76 77 78
make -j$RPM_BUILD_NCPUS CFLAGS="%mediastreamer2_cflags" CXXFLAGS="%mediastreamer2_cflags"

%install
rm -rf $RPM_BUILD_ROOT
%makeinstall

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
Simon Morlat's avatar
Simon Morlat committed
79
%doc AUTHORS COPYING ChangeLog INSTALL NEWS README
aymeric's avatar
aymeric committed
80
%{_libdir}/*.so.*
Simon Morlat's avatar
Simon Morlat committed
81 82
/usr/share/images/nowebcamCIF.jpg
%{_libexecdir}
aymeric's avatar
aymeric committed
83 84 85 86 87 88 89 90

%files devel
%defattr(-,root,root,-)
%{_libdir}/*.la
%{_libdir}/*.a
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_includedir}
Simon Morlat's avatar
Simon Morlat committed
91
%{_docdir}
aymeric's avatar
aymeric committed
92 93 94 95

%changelog
* Tue Oct 25 2005 Francois-Xavier Kowalski <fix@hp.com>
- Add to mediastreamer2 distribution with "make rpm" target