equal
deleted
inserted
replaced
14 Vendor: Sun Microsystems, Inc. |
14 Vendor: Sun Microsystems, Inc. |
15 Summary: Library for H323 spec. |
15 Summary: Library for H323 spec. |
16 URL: http://www.openh323.org/ |
16 URL: http://www.openh323.org/ |
17 Source0: http://www.openh323.org/bin/%{name}-%{version}.tar.bz2 |
17 Source0: http://www.openh323.org/bin/%{name}-%{version}.tar.bz2 |
18 # WTF?? |
18 # WTF?? |
19 Source1: Speex-0.8.1.tar.bz2 |
|
20 Patch1: openh323-01-libname.diff |
19 Patch1: openh323-01-libname.diff |
21 BuildRoot: %{_tmppath}/%{name}-root |
20 BuildRoot: %{_tmppath}/%{name}-root |
22 Docdir: %{_defaultdocdir}/doc |
21 Docdir: %{_defaultdocdir}/doc |
23 Prereq: /sbin/ldconfig |
22 Prereq: /sbin/ldconfig |
24 |
23 |
42 |
41 |
43 %prep |
42 %prep |
44 %setup -q |
43 %setup -q |
45 %patch1 -p1 |
44 %patch1 -p1 |
46 |
45 |
47 bzcat %SOURCE1 | tar xf - |
|
48 ln -s Speex-0.8.1 speex |
|
49 |
|
50 |
|
51 |
46 |
52 %build |
47 %build |
53 %ifos linux |
48 %ifos linux |
54 if [ -x /usr/bin/getconf ]; then |
49 if [ -x /usr/bin/getconf ]; then |
55 CPUS=`getconf _NPROCESSORS_ONLN` |
50 CPUS=`getconf _NPROCESSORS_ONLN` |
58 CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '` |
53 CPUS=`/usr/sbin/psrinfo | grep on-line | wc -l | tr -d ' '` |
59 %endif |
54 %endif |
60 if test "x$CPUS" = "x" -o $CPUS = 0; then |
55 if test "x$CPUS" = "x" -o $CPUS = 0; then |
61 CPUS=1 |
56 CPUS=1 |
62 fi |
57 fi |
63 |
|
64 # First build static Speex libs |
|
65 cd speex |
|
66 ./configure --enable-shared=no --enable-static=yes --with-pic=yes |
|
67 make -j $CPUS |
|
68 cd .. |
|
69 |
58 |
70 (mkdir pwlibdir; cd pwlibdir; |
59 (mkdir pwlibdir; cd pwlibdir; |
71 ln -s %{_datadir}/pwlib/make make |
60 ln -s %{_datadir}/pwlib/make make |
72 ln -s %{_datadir} share |
61 ln -s %{_datadir} share |
73 ln -s %{_includedir} include |
62 ln -s %{_includedir} include |
89 |
78 |
90 %install |
79 %install |
91 mkdir -p $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/openh323,%{_bindir},%{_datadir}/misc} |
80 mkdir -p $RPM_BUILD_ROOT{%{_libdir},%{_includedir}/openh323,%{_bindir},%{_datadir}/misc} |
92 cp -d lib/lib*.so* $RPM_BUILD_ROOT%{_libdir} |
81 cp -d lib/lib*.so* $RPM_BUILD_ROOT%{_libdir} |
93 install include/*.h $RPM_BUILD_ROOT%{_includedir}/openh323 |
82 install include/*.h $RPM_BUILD_ROOT%{_includedir}/openh323 |
94 install speex/libspeex/speex.h speex/libspeex/speex_bits.h speex/libspeex/speex_header.h $RPM_BUILD_ROOT%{_includedir}/openh323 |
|
95 |
83 |
96 sed -e's@\$(OPENH323DIR)/include@&/openh323@' < openh323u.mak \ |
84 sed -e's@\$(OPENH323DIR)/include@&/openh323@' < openh323u.mak \ |
97 > $RPM_BUILD_ROOT%{_datadir}/misc/openh323u.mak |
85 > $RPM_BUILD_ROOT%{_datadir}/misc/openh323u.mak |
98 |
86 |
99 %clean |
87 %clean |