ortp.spec.in 2.18 KB
Newer Older
aymeric's avatar
aymeric committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# -*- rpm-spec -*-
# 
# ortp -- Real-time Transport Protocol Stack
# 
# Default is optimized for Pentium IV but will execute on Pentium II &
# later (i686).

%ifarch %ix86
%define		ortp_cpu	pentium4
%endif

Summary:	Real-time Transport Protocol Stack
Name:		ortp
Version:	@ORTP_PKGCONFIG_VERSION@
15
Release:	%(git describe --tags --abbrev=40 | sed -rn 's/^.*-([0-9]+)-g[a-z0-9]{40}$/\1/p' || echo '1')%{?dist}
aymeric's avatar
aymeric committed
16 17 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
License:	LGPL
Group:		Applications/Communications
URL:		http://linphone.org/ortp/
Source0:	%{name}-@ORTP_PKGCONFIG_VERSION@.tar.gz
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot
%ifarch %ix86
BuildArch:	i686
%endif

%description
oRTP is a LGPL licensed C library implementing the RTP protocol
(rfc1889). It is available for most unix clones (primilarly Linux and
HP-UX), and Microsoft Windows.

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

%description    devel
oRTP is a LGPL licensed C library implementing the RTP protocol
(rfc1889). It is available for most unix clones (primilarly Linux and
HP-UX), and Microsoft Windows.

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

%ifarch %ix86
jehan's avatar
jehan committed
44
%define	ortp_arch_cflags -malign-double -march=i686 -mtune=%{ortp_cpu}
aymeric's avatar
aymeric committed
45 46 47 48 49 50 51 52 53 54 55 56
%else
# Must be non-empty
%define ortp_arch_cflags -Wall
%endif
%define ortp_cflags %ortp_arch_cflags -Wall -g -pipe -pthread -O3 -fomit-frame-pointer -fno-schedule-insns -fschedule-insns2 -fstrict-aliasing

%prep
%setup -q

%build
%configure \
	--enable-shared \
jehan's avatar
jehan committed
57 58
	--enable-static \
	--docdir=%{_docdir}
aymeric's avatar
aymeric committed
59 60 61 62
%{__make} -j$RPM_BUILD_NCPUS CFLAGS="%ortp_cflags" CXXFLAGS="%ortp_cflags"

%install
rm -rf $RPM_BUILD_ROOT
63
make install DESTDIR=$RPM_BUILD_ROOT
aymeric's avatar
aymeric committed
64 65 66 67 68 69 70 71 72 73 74

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog INSTALL NEWS README TODO
%{_libdir}/*.so.*

%files devel
%defattr(-,root,root,-)
jehan's avatar
jehan committed
75
%doc doc/html/*
aymeric's avatar
aymeric committed
76 77 78 79 80
%{_libdir}/*.la
%{_libdir}/*.a
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_includedir}
Simon Morlat's avatar
Simon Morlat committed
81
%{_docdir}
aymeric's avatar
aymeric committed
82 83 84 85

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