| 1 | # -*- rpm-spec -*- |
|---|
| 2 | # |
|---|
| 3 | # mediastreamer2 -- A media streaming library for telephony applications |
|---|
| 4 | # |
|---|
| 5 | |
|---|
| 6 | %ifarch %ix86 |
|---|
| 7 | %define mediastreamer2_cpu pentium4 |
|---|
| 8 | %endif |
|---|
| 9 | |
|---|
| 10 | Summary: Audio/Video real-time streaming |
|---|
| 11 | Name: mediastreamer |
|---|
| 12 | Version: @MEDIASTREAMER_VERSION@ |
|---|
| 13 | Release: 2 |
|---|
| 14 | License: LGPL |
|---|
| 15 | Group: Applications/Communications |
|---|
| 16 | URL: http://linphone.org/mediastreamer2/ |
|---|
| 17 | Source0: %{name}-@MEDIASTREAMER_VERSION@.tar.gz |
|---|
| 18 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot |
|---|
| 19 | %ifarch %ix86 |
|---|
| 20 | BuildArch: i686 |
|---|
| 21 | %endif |
|---|
| 22 | |
|---|
| 23 | %description |
|---|
| 24 | Mediastreamer2 is a GPL licensed library to make audio and video |
|---|
| 25 | real-time streaming and processing. Written in pure C, it is based |
|---|
| 26 | upon the oRTP library. |
|---|
| 27 | |
|---|
| 28 | %package devel |
|---|
| 29 | Summary: Headers, libraries and docs for the mediastreamer2 library |
|---|
| 30 | Group: Development/Libraries |
|---|
| 31 | Requires: %{name} = %{version}-%{release} |
|---|
| 32 | |
|---|
| 33 | %description devel |
|---|
| 34 | Mediastreamer2 is a GPL licensed library to make audio and video |
|---|
| 35 | real-time streaming and processing. Written in pure C, it is based |
|---|
| 36 | upon the ortp library. |
|---|
| 37 | |
|---|
| 38 | This package contains header files and development libraries needed to |
|---|
| 39 | develop programs using the mediastreamer2 library. |
|---|
| 40 | |
|---|
| 41 | %ifarch %ix86 |
|---|
| 42 | %define mediastreamer2_arch_cflags -malign-double -march=i686 -mcpu=%{mediastreamer2_cpu} |
|---|
| 43 | %else |
|---|
| 44 | # Must be non-empty |
|---|
| 45 | %define mediastreamer2_arch_cflags -Wall |
|---|
| 46 | %endif |
|---|
| 47 | %define mediastreamer2_cflags %mediastreamer2_arch_cflags -Wall -g -pipe -pthread -O3 -fomit-frame-pointer -fno-schedule-insns -fschedule-insns2 -fstrict-aliasing |
|---|
| 48 | |
|---|
| 49 | |
|---|
| 50 | %define opt_with() %{expand:%%global with_%{1} %%{?_with_%{1}:1}%%{?!_with_%{1}:0}} |
|---|
| 51 | %define opt_without() %{expand:%%global with_%{1} %%{!?_without_%{1}:1}%%{?_without_%{1}:0}} |
|---|
| 52 | |
|---|
| 53 | %opt_with video - build with video features |
|---|
| 54 | |
|---|
| 55 | %define have_video %{?_with_video:1}%{!?_with_video:0} |
|---|
| 56 | |
|---|
| 57 | %prep |
|---|
| 58 | %setup -q |
|---|
| 59 | |
|---|
| 60 | %build |
|---|
| 61 | options="--enable-shared --enable-gsm --enable-static" |
|---|
| 62 | %if !%{have_video} |
|---|
| 63 | options="$options --disable-video" |
|---|
| 64 | %endif |
|---|
| 65 | |
|---|
| 66 | %configure $options |
|---|
| 67 | |
|---|
| 68 | make -j$RPM_BUILD_NCPUS CFLAGS="%mediastreamer2_cflags" CXXFLAGS="%mediastreamer2_cflags" |
|---|
| 69 | |
|---|
| 70 | %install |
|---|
| 71 | rm -rf $RPM_BUILD_ROOT |
|---|
| 72 | %makeinstall |
|---|
| 73 | |
|---|
| 74 | %clean |
|---|
| 75 | rm -rf $RPM_BUILD_ROOT |
|---|
| 76 | |
|---|
| 77 | %files |
|---|
| 78 | %defattr(-,root,root,-) |
|---|
| 79 | %doc AUTHORS COPYING ChangeLog INSTALL NEWS README |
|---|
| 80 | %{_libdir}/*.so.* |
|---|
| 81 | /usr/share/images/nowebcamCIF.jpg |
|---|
| 82 | %{_libexecdir} |
|---|
| 83 | |
|---|
| 84 | %files devel |
|---|
| 85 | %defattr(-,root,root,-) |
|---|
| 86 | %{_libdir}/*.la |
|---|
| 87 | %{_libdir}/*.a |
|---|
| 88 | %{_libdir}/*.so |
|---|
| 89 | %{_libdir}/pkgconfig/*.pc |
|---|
| 90 | %{_includedir} |
|---|
| 91 | %{_docdir} |
|---|
| 92 | |
|---|
| 93 | %changelog |
|---|
| 94 | * Tue Oct 25 2005 Francois-Xavier Kowalski <fix@hp.com> |
|---|
| 95 | - Add to mediastreamer2 distribution with "make rpm" target |
|---|