|
@@ -0,0 +1,175 @@
|
|
|
|
+Name: libvpx
|
|
|
|
+Version: 0.9.0
|
|
|
|
+Release: 1%{?_dist_release}
|
|
|
|
+Summary: The VP8 Codec SDK
|
|
|
|
+Summary(ja): VP8 コーデックソフトウェア開発キット
|
|
|
|
+
|
|
|
|
+Group: System Environment/Libraries
|
|
|
|
+License: BSD
|
|
|
|
+URL: http://www.webmproject.org/tools/vp8-sdk/
|
|
|
|
+Source0: libvpx-0.9.0.tar.bz2
|
|
|
|
+Source1: libvpx.pc
|
|
|
|
+Source2: libvpx.ver
|
|
|
|
+Patch0: libvpx-0.9.0-no-explicit-dep-on-static-lib.patch
|
|
|
|
+
|
|
|
|
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
|
|
|
+%ifarch %{ix86} x86_64
|
|
|
|
+BuildRequires: yasm
|
|
|
|
+%endif
|
|
|
|
+
|
|
|
|
+Vendor: Project Vine
|
|
|
|
+Distribution: Vine Linux
|
|
|
|
+Packager: daisuke
|
|
|
|
+
|
|
|
|
+%description
|
|
|
|
+The WebM VP8 Codec SDK allows you to integrate your applications with
|
|
|
|
+the VP8 video codec, a high quality, royalty free, open source codec
|
|
|
|
+deployed on millions of computers and devices worldwide.
|
|
|
|
+
|
|
|
|
+%description -l ja
|
|
|
|
+WebM VP8 コーデック SDK は、VP8 ビデオコーデックをアプリケーションに
|
|
|
|
+統合するための開発きっとです。VP8ビデオコーデックは高品質でロイヤリティ
|
|
|
|
+フリーかつオープンソースのコーデックで、世界中の多くのコンピュータや
|
|
|
|
+デバイスで利用されています。
|
|
|
|
+
|
|
|
|
+%package devel
|
|
|
|
+Summary: Development files for %{name}
|
|
|
|
+Summary(ja): %{name} の開発ファイル
|
|
|
|
+Group: Development/Libraries
|
|
|
|
+Requires: %{name} = %{version}-%{release}
|
|
|
|
+
|
|
|
|
+%description devel
|
|
|
|
+The %{name}-devel package contains development files for
|
|
|
|
+%{name}.
|
|
|
|
+
|
|
|
|
+%description devel -l ja
|
|
|
|
+%{name}-devel パッケージは %{name} の開発用ファイルを含んでいます。
|
|
|
|
+
|
|
|
|
+%package utils
|
|
|
|
+Summary: example programs for %{name}
|
|
|
|
+Summary(ja): %{name} のサンプルプログラム
|
|
|
|
+Group: Applications/Multimedia
|
|
|
|
+Requires: %{name} = %{version}-%{release}
|
|
|
|
+
|
|
|
|
+%description utils
|
|
|
|
+The %{name}-utils package contains example programs that
|
|
|
|
+use %{name}.
|
|
|
|
+
|
|
|
|
+%description utils -l ja
|
|
|
|
+%{name}-utils パッケージは、%{name} を使用したサンプル
|
|
|
|
+アプリケーションを含んでいます。
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+%prep
|
|
|
|
+%setup -q
|
|
|
|
+%patch0 -p1
|
|
|
|
+
|
|
|
|
+%build
|
|
|
|
+
|
|
|
|
+%ifarch %{ix86}
|
|
|
|
+%global vpxtarget x86-linux-gcc
|
|
|
|
+%else
|
|
|
|
+%ifarch x86_64
|
|
|
|
+%global vpxtarget x86_64-linux-gcc
|
|
|
|
+%else
|
|
|
|
+%global vpxtarget generic-gnu
|
|
|
|
+%endif
|
|
|
|
+%endif
|
|
|
|
+
|
|
|
|
+./configure \
|
|
|
|
+ --target=%{vpxtarget} \
|
|
|
|
+ --enable-pic \
|
|
|
|
+ --disable-install-docs \
|
|
|
|
+ --disable-install-srcs
|
|
|
|
+
|
|
|
|
+# fix up optflags
|
|
|
|
+sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{optflags} -fPIC|g" libs-%{vpxtarget}.mk
|
|
|
|
+sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{optflags} -fPIC|g" examples-%{vpxtarget}.mk
|
|
|
|
+sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{optflags} -fPIC|g" docs-%{vpxtarget}.mk
|
|
|
|
+
|
|
|
|
+%{__make} %{?_smp_mflags} verbose=true target=libs
|
|
|
|
+
|
|
|
|
+mkdir -p tmp
|
|
|
|
+pushd tmp
|
|
|
|
+ar x ../libvpx_g.a
|
|
|
|
+popd
|
|
|
|
+gcc -shared -fPIC -pthread -lm \
|
|
|
|
+ -Wl,--no-undefined \
|
|
|
|
+ -Wl,-soname,libvpx.so.0 \
|
|
|
|
+ -Wl,--version-script,%{SOURCE2} \
|
|
|
|
+ -Wl,-z,noexecstack \
|
|
|
|
+ -o libvpx.so.0.0.0 tmp/*.o
|
|
|
|
+rm -rf tmp
|
|
|
|
+
|
|
|
|
+ln -sf libvpx.so.0.0.0 libvpx.so
|
|
|
|
+
|
|
|
|
+mv libvpx.a libvpx.a.tmp
|
|
|
|
+mv libvpx_g.a libvpx_g.a.tmp
|
|
|
|
+
|
|
|
|
+make %{?_smp_mflags} verbose=true target=examples
|
|
|
|
+
|
|
|
|
+mv libvpx.a.tmp libvpx.a
|
|
|
|
+mv libvpx_g.a.tmp libvpx_g.a
|
|
|
|
+
|
|
|
|
+%install
|
|
|
|
+%{__rm} -rf $RPM_BUILD_ROOT
|
|
|
|
+mkdir -p $RPM_BUILD_ROOT%{_prefix}
|
|
|
|
+%{__make} DIST_DIR=$RPM_BUILD_ROOT%{_prefix} install
|
|
|
|
+mkdir -p $RPM_BUILD_ROOT%{_libdir}
|
|
|
|
+%{__install} -m755 libvpx.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}
|
|
|
|
+ln -sf libvpx.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/libvpx.so.0
|
|
|
|
+ln -sf libvpx.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/libvpx.so
|
|
|
|
+
|
|
|
|
+# Install the pkg-config file
|
|
|
|
+mkdir -p %{buildroot}%{_libdir}/pkgconfig/
|
|
|
|
+install -m0644 %{SOURCE1} %{buildroot}%{_libdir}/pkgconfig/
|
|
|
|
+# Fill in the variables
|
|
|
|
+sed -i "s|@PREFIX@|%{_prefix}|g" %{buildroot}%{_libdir}/pkgconfig/libvpx.pc
|
|
|
|
+sed -i "s|@LIBDIR@|%{_libdir}|g" %{buildroot}%{_libdir}/pkgconfig/libvpx.pc
|
|
|
|
+sed -i "s|@INCLUDEDIR@|%{_includedir}|g" %{buildroot}%{_libdir}/pkgconfig/libvpx.pc
|
|
|
|
+
|
|
|
|
+pushd %{buildroot}
|
|
|
|
+# Rename a few examples
|
|
|
|
+mv usr/bin/simple_decoder usr/bin/vp8_simple_decoder
|
|
|
|
+mv usr/bin/simple_encoder usr/bin/vp8_simple_encoder
|
|
|
|
+mv usr/bin/twopass_encoder usr/bin/vp8_twopass_encoder
|
|
|
|
+# Move the headers into the subdir
|
|
|
|
+mkdir -p usr/include/vpx/
|
|
|
|
+mv usr/include/*.h usr/include/vpx/
|
|
|
|
+# Fix the binary permissions
|
|
|
|
+chmod 755 usr/bin/*
|
|
|
|
+popd
|
|
|
|
+
|
|
|
|
+rm -f $RPM_BUILD_ROOT%{_prefix}/md5sums.txt
|
|
|
|
+rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.a
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+%clean
|
|
|
|
+rm -rf $RPM_BUILD_ROOT
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+%post -p /sbin/ldconfig
|
|
|
|
+
|
|
|
|
+%postun -p /sbin/ldconfig
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+%files
|
|
|
|
+%defattr(-,root,root,-)
|
|
|
|
+%doc AUTHORS LICENSE README CHANGELOG
|
|
|
|
+%{_libdir}/*.so.*
|
|
|
|
+
|
|
|
|
+%files devel
|
|
|
|
+%defattr(-,root,root,-)
|
|
|
|
+%{_libdir}/*.so
|
|
|
|
+%{_libdir}/pkgconfig/*.pc
|
|
|
|
+%{_includedir}/vpx/*.h
|
|
|
|
+
|
|
|
|
+%files utils
|
|
|
|
+%defattr(-,root,root,-)
|
|
|
|
+%{_bindir}/*
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+%changelog
|
|
|
|
+* Mon May 24 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.9.0-1
|
|
|
|
+- initial build for Vine Linux
|