[1075] | 1 | Name: libvpx |
---|
| 2 | Version: 0.9.0 |
---|
| 3 | Release: 1%{?_dist_release} |
---|
| 4 | Summary: The VP8 Codec SDK |
---|
| 5 | Summary(ja): VP8 コーデックソフトウェア開発キット |
---|
| 6 | |
---|
| 7 | Group: System Environment/Libraries |
---|
| 8 | License: BSD |
---|
| 9 | URL: http://www.webmproject.org/tools/vp8-sdk/ |
---|
| 10 | Source0: libvpx-0.9.0.tar.bz2 |
---|
| 11 | Source1: libvpx.pc |
---|
| 12 | Source2: libvpx.ver |
---|
| 13 | Patch0: libvpx-0.9.0-no-explicit-dep-on-static-lib.patch |
---|
| 14 | |
---|
| 15 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
---|
| 16 | %ifarch %{ix86} x86_64 |
---|
| 17 | BuildRequires: yasm |
---|
| 18 | %endif |
---|
| 19 | |
---|
| 20 | Vendor: Project Vine |
---|
| 21 | Distribution: Vine Linux |
---|
| 22 | Packager: daisuke |
---|
| 23 | |
---|
| 24 | %description |
---|
| 25 | The WebM VP8 Codec SDK allows you to integrate your applications with |
---|
| 26 | the VP8 video codec, a high quality, royalty free, open source codec |
---|
| 27 | deployed on millions of computers and devices worldwide. |
---|
| 28 | |
---|
| 29 | %description -l ja |
---|
| 30 | WebM VP8 コーデック SDK は、VP8 ビデオコーデックをアプリケーションに |
---|
| 31 | 統合するための開発きっとです。VP8ビデオコーデックは高品質でロイヤリティ |
---|
| 32 | フリーかつオープンソースのコーデックで、世界中の多くのコンピュータや |
---|
| 33 | デバイスで利用されています。 |
---|
| 34 | |
---|
| 35 | %package devel |
---|
| 36 | Summary: Development files for %{name} |
---|
| 37 | Summary(ja): %{name} の開発ファイル |
---|
| 38 | Group: Development/Libraries |
---|
| 39 | Requires: %{name} = %{version}-%{release} |
---|
| 40 | |
---|
| 41 | %description devel |
---|
| 42 | The %{name}-devel package contains development files for |
---|
| 43 | %{name}. |
---|
| 44 | |
---|
| 45 | %description devel -l ja |
---|
| 46 | %{name}-devel パッケージは %{name} の開発用ファイルを含んでいます。 |
---|
| 47 | |
---|
| 48 | %package utils |
---|
| 49 | Summary: example programs for %{name} |
---|
| 50 | Summary(ja): %{name} のサンプルプログラム |
---|
| 51 | Group: Applications/Multimedia |
---|
| 52 | Requires: %{name} = %{version}-%{release} |
---|
| 53 | |
---|
| 54 | %description utils |
---|
| 55 | The %{name}-utils package contains example programs that |
---|
| 56 | use %{name}. |
---|
| 57 | |
---|
| 58 | %description utils -l ja |
---|
| 59 | %{name}-utils パッケージは、%{name} を使用したサンプル |
---|
| 60 | アプリケーションを含んでいます。 |
---|
| 61 | |
---|
| 62 | |
---|
| 63 | %prep |
---|
| 64 | %setup -q |
---|
| 65 | %patch0 -p1 |
---|
| 66 | |
---|
| 67 | %build |
---|
| 68 | |
---|
| 69 | %ifarch %{ix86} |
---|
| 70 | %global vpxtarget x86-linux-gcc |
---|
| 71 | %else |
---|
| 72 | %ifarch x86_64 |
---|
| 73 | %global vpxtarget x86_64-linux-gcc |
---|
| 74 | %else |
---|
| 75 | %global vpxtarget generic-gnu |
---|
| 76 | %endif |
---|
| 77 | %endif |
---|
| 78 | |
---|
| 79 | ./configure \ |
---|
| 80 | --target=%{vpxtarget} \ |
---|
| 81 | --enable-pic \ |
---|
| 82 | --disable-install-docs \ |
---|
| 83 | --disable-install-srcs |
---|
| 84 | |
---|
| 85 | # fix up optflags |
---|
| 86 | sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{optflags} -fPIC|g" libs-%{vpxtarget}.mk |
---|
| 87 | sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{optflags} -fPIC|g" examples-%{vpxtarget}.mk |
---|
| 88 | sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{optflags} -fPIC|g" docs-%{vpxtarget}.mk |
---|
| 89 | |
---|
| 90 | %{__make} %{?_smp_mflags} verbose=true target=libs |
---|
| 91 | |
---|
| 92 | mkdir -p tmp |
---|
| 93 | pushd tmp |
---|
| 94 | ar x ../libvpx_g.a |
---|
| 95 | popd |
---|
| 96 | gcc -shared -fPIC -pthread -lm \ |
---|
| 97 | -Wl,--no-undefined \ |
---|
| 98 | -Wl,-soname,libvpx.so.0 \ |
---|
| 99 | -Wl,--version-script,%{SOURCE2} \ |
---|
| 100 | -Wl,-z,noexecstack \ |
---|
| 101 | -o libvpx.so.0.0.0 tmp/*.o |
---|
| 102 | rm -rf tmp |
---|
| 103 | |
---|
| 104 | ln -sf libvpx.so.0.0.0 libvpx.so |
---|
| 105 | |
---|
| 106 | mv libvpx.a libvpx.a.tmp |
---|
| 107 | mv libvpx_g.a libvpx_g.a.tmp |
---|
| 108 | |
---|
| 109 | make %{?_smp_mflags} verbose=true target=examples |
---|
| 110 | |
---|
| 111 | mv libvpx.a.tmp libvpx.a |
---|
| 112 | mv libvpx_g.a.tmp libvpx_g.a |
---|
| 113 | |
---|
| 114 | %install |
---|
| 115 | %{__rm} -rf $RPM_BUILD_ROOT |
---|
| 116 | mkdir -p $RPM_BUILD_ROOT%{_prefix} |
---|
| 117 | %{__make} DIST_DIR=$RPM_BUILD_ROOT%{_prefix} install |
---|
| 118 | mkdir -p $RPM_BUILD_ROOT%{_libdir} |
---|
| 119 | %{__install} -m755 libvpx.so.0.0.0 $RPM_BUILD_ROOT%{_libdir} |
---|
| 120 | ln -sf libvpx.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/libvpx.so.0 |
---|
| 121 | ln -sf libvpx.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/libvpx.so |
---|
| 122 | |
---|
| 123 | # Install the pkg-config file |
---|
| 124 | mkdir -p %{buildroot}%{_libdir}/pkgconfig/ |
---|
| 125 | install -m0644 %{SOURCE1} %{buildroot}%{_libdir}/pkgconfig/ |
---|
| 126 | # Fill in the variables |
---|
| 127 | sed -i "s|@PREFIX@|%{_prefix}|g" %{buildroot}%{_libdir}/pkgconfig/libvpx.pc |
---|
| 128 | sed -i "s|@LIBDIR@|%{_libdir}|g" %{buildroot}%{_libdir}/pkgconfig/libvpx.pc |
---|
| 129 | sed -i "s|@INCLUDEDIR@|%{_includedir}|g" %{buildroot}%{_libdir}/pkgconfig/libvpx.pc |
---|
| 130 | |
---|
| 131 | pushd %{buildroot} |
---|
| 132 | # Rename a few examples |
---|
| 133 | mv usr/bin/simple_decoder usr/bin/vp8_simple_decoder |
---|
| 134 | mv usr/bin/simple_encoder usr/bin/vp8_simple_encoder |
---|
| 135 | mv usr/bin/twopass_encoder usr/bin/vp8_twopass_encoder |
---|
| 136 | # Move the headers into the subdir |
---|
| 137 | mkdir -p usr/include/vpx/ |
---|
| 138 | mv usr/include/*.h usr/include/vpx/ |
---|
| 139 | # Fix the binary permissions |
---|
| 140 | chmod 755 usr/bin/* |
---|
| 141 | popd |
---|
| 142 | |
---|
| 143 | rm -f $RPM_BUILD_ROOT%{_prefix}/md5sums.txt |
---|
| 144 | rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.a |
---|
| 145 | |
---|
| 146 | |
---|
| 147 | |
---|
| 148 | %clean |
---|
| 149 | rm -rf $RPM_BUILD_ROOT |
---|
| 150 | |
---|
| 151 | |
---|
| 152 | %post -p /sbin/ldconfig |
---|
| 153 | |
---|
| 154 | %postun -p /sbin/ldconfig |
---|
| 155 | |
---|
| 156 | |
---|
| 157 | %files |
---|
| 158 | %defattr(-,root,root,-) |
---|
| 159 | %doc AUTHORS LICENSE README CHANGELOG |
---|
| 160 | %{_libdir}/*.so.* |
---|
| 161 | |
---|
| 162 | %files devel |
---|
| 163 | %defattr(-,root,root,-) |
---|
| 164 | %{_libdir}/*.so |
---|
| 165 | %{_libdir}/pkgconfig/*.pc |
---|
| 166 | %{_includedir}/vpx/*.h |
---|
| 167 | |
---|
| 168 | %files utils |
---|
| 169 | %defattr(-,root,root,-) |
---|
| 170 | %{_bindir}/* |
---|
| 171 | |
---|
| 172 | |
---|
| 173 | %changelog |
---|
| 174 | * Mon May 24 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.9.0-1 |
---|
| 175 | - initial build for Vine Linux |
---|