]> git.pld-linux.org Git - packages/libvpx.git/blobdiff - libvpx.spec
- rel 3; x86_64 asm optimized now; nicer way of linking shared lib; export only requi...
[packages/libvpx.git] / libvpx.spec
index 7a47f756aaafe7c8915bb16701dd0d1125724f0b..c9e70e51e514868b47c5fb98aedf1ab7acfc3913 100644 (file)
@@ -1,23 +1,23 @@
+#
+# Conditional build:
 %bcond_without asm
 
-%ifarch %{x8664}
-# buggy, non PIC asm code
-%undefine with_asm
-%endif
-
 Summary:       VP8, a high-quality video codec
 Name:          libvpx
 Version:       0.9.0
-Release:       2
+Release:       3
 License:       BSD
 Group:         Libraries
 Source0:       http://webm.googlecode.com/files/%{name}-%{version}.tar.bz2
 # Source0-md5: 9eb8e818d2f3263623c258fe66924082
+Source1:       %{name}.ver
 Patch0:                %{name}-0.9.0-no-explicit-dep-on-static-lib.patch
 URL:           http://www.webmproject.org/
+BuildRequires: /usr/bin/php
 BuildRequires: autoconf
 BuildRequires: automake
 BuildRequires: doxygen
+BuildRequires: php-pcre
 %{?with_asm:BuildRequires:     yasm}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -72,13 +72,15 @@ sed -i "s|STRIP=.*|STRIP=|g" {libs,examples,docs}-*.mk
 %{__make} verbose=true target=libs \
        CC="%{__cc}"
 
-%{__cc} %{rpmldflags} -fPIC -o libvpx.so.0.0.0 -shared -Wl,-soname,libvpx.so.0 vpx_codec/src/*.o vpx_mem/*.o \
-       vpx_scale/generic/*.o vp8/common/*.o vp8/common/generic/*.o vp8/*.o vp8/encoder/*.o \
-       vp8/encoder/generic/*.o vp8/decoder/*.o vp8/decoder/generic/*.o vpx_config.c.o \
-%if %{with asm}
-       vp8/common/x*/*.o vp8/encoder/x*/*.o vp8/decoder/x*/*.o vpx_ports/*.o \
-%endif
-       -lm -lpthread
+mkdir tmp
+cd tmp
+ar x ../libvpx_g.a
+cd ..
+%{__cc} %{rpmldflags} -fPIC -shared \
+       -Wl,--no-undefined -Wl,-soname,libvpx.so.0 -Wl,--version-script,%{SOURCE1} -Wl,-z,noexecstack \
+       -o libvpx.so.0.0.0 tmp/*.o \
+       -pthread -lm
+rm -rf tmp
 
 # Temporarily dance the static libs out of the way
 mv libvpx.a libNOTvpx.a
@@ -97,7 +99,6 @@ mv libNOTvpx_g.a libvpx_g.a
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
 install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/vpx,%{_libdir}}
 
 install -d outdir
@@ -106,15 +107,14 @@ install -d outdir
 
 mv outdir/bin/{simple_decoder,vp8_simple_decoder}
 mv outdir/bin/{twopass_encoder,vp8_twopass_encoder}
-install -m755 outdir/bin/* $RPM_BUILD_ROOT%{_bindir}
+install -p outdir/bin/* $RPM_BUILD_ROOT%{_bindir}
 
 ln -s libvpx.so.0.0.0 build/libvpx.so.0.0
 ln -s libvpx.so.0.0.0 build/libvpx.so.0
-install -m755 -p build/libvpx.so* $RPM_BUILD_ROOT%{_libdir}
-
-install outdir/include/*.h $RPM_BUILD_ROOT%{_includedir}/vpx
+install -p build/libvpx.so* $RPM_BUILD_ROOT%{_libdir}
 
-install outdir/lib/*.a $RPM_BUILD_ROOT%{_libdir}
+cp -a outdir/include/*.h $RPM_BUILD_ROOT%{_includedir}/vpx
+cp -a outdir/lib/*.a $RPM_BUILD_ROOT%{_libdir}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
This page took 0.091189 seconds and 4 git commands to generate.