| 1 | Name: libvpx |
|---|
| 2 | Version: 0.9.5 |
|---|
| 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: http://webm.googlecode.com/files/%{name}-v%{version}.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 -n %{name}-v%{version} |
|---|
| 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 | %if "%{vpxtarget}" == "generic-gnu" |
|---|
| 80 | %global generic_target 1 |
|---|
| 81 | %else |
|---|
| 82 | %global generic_target 0 |
|---|
| 83 | %endif |
|---|
| 84 | |
|---|
| 85 | ./configure \ |
|---|
| 86 | --target=%{vpxtarget} \ |
|---|
| 87 | --enable-pic \ |
|---|
| 88 | %if ! %{generic_target} |
|---|
| 89 | --enable-shared \ |
|---|
| 90 | %endif |
|---|
| 91 | --prefix=%{_prefix} \ |
|---|
| 92 | --libdir=%{_libdir} \ |
|---|
| 93 | --disable-install-docs \ |
|---|
| 94 | --disable-install-srcs |
|---|
| 95 | |
|---|
| 96 | # fix up optflags |
|---|
| 97 | sed -i "s|-O3|%{optflags}|g" libs-%{vpxtarget}.mk |
|---|
| 98 | sed -i "s|-O3|%{optflags}|g" examples-%{vpxtarget}.mk |
|---|
| 99 | sed -i "s|-O3|%{optflags}|g" docs-%{vpxtarget}.mk |
|---|
| 100 | |
|---|
| 101 | %{__make} %{?_smp_mflags} verbose=true target=libs |
|---|
| 102 | |
|---|
| 103 | %if %{generic_target} |
|---|
| 104 | mkdir -p tmp |
|---|
| 105 | pushd tmp |
|---|
| 106 | ar x ../libvpx_g.a |
|---|
| 107 | popd |
|---|
| 108 | gcc -shared -fPIC -pthread -lm \ |
|---|
| 109 | -Wl,--no-undefined \ |
|---|
| 110 | -Wl,-soname,libvpx.so.0 \ |
|---|
| 111 | -Wl,--version-script,%{SOURCE2} \ |
|---|
| 112 | -Wl,-z,noexecstack \ |
|---|
| 113 | -o libvpx.so.%{version} tmp/*.o |
|---|
| 114 | rm -rf tmp |
|---|
| 115 | %endif |
|---|
| 116 | |
|---|
| 117 | ln -sf libvpx.so.%{version} libvpx.so |
|---|
| 118 | |
|---|
| 119 | mv libvpx.a libvpx.a.tmp |
|---|
| 120 | mv libvpx_g.a libvpx_g.a.tmp |
|---|
| 121 | |
|---|
| 122 | make %{?_smp_mflags} verbose=true target=examples |
|---|
| 123 | |
|---|
| 124 | mv libvpx.a.tmp libvpx.a |
|---|
| 125 | mv libvpx_g.a.tmp libvpx_g.a |
|---|
| 126 | |
|---|
| 127 | %install |
|---|
| 128 | %{__rm} -rf $RPM_BUILD_ROOT |
|---|
| 129 | %{__make} DIST_DIR=$RPM_BUILD_ROOT%{_prefix} dist |
|---|
| 130 | |
|---|
| 131 | # Install the pkg-config file |
|---|
| 132 | mkdir -p %{buildroot}%{_libdir}/pkgconfig/ |
|---|
| 133 | install -m0644 %{SOURCE1} %{buildroot}%{_libdir}/pkgconfig/ |
|---|
| 134 | # Fill in the variables |
|---|
| 135 | sed -i "s|@PREFIX@|%{_prefix}|g" %{buildroot}%{_libdir}/pkgconfig/libvpx.pc |
|---|
| 136 | sed -i "s|@LIBDIR@|%{_libdir}|g" %{buildroot}%{_libdir}/pkgconfig/libvpx.pc |
|---|
| 137 | sed -i "s|@INCLUDEDIR@|%{_includedir}|g" %{buildroot}%{_libdir}/pkgconfig/libvpx.pc |
|---|
| 138 | |
|---|
| 139 | %if %{generic_target} |
|---|
| 140 | install -p libvpx.so.%{version} %{buildroot}%{_libdir} |
|---|
| 141 | pushd %{buildroot}%{_libdir} |
|---|
| 142 | ln -sf libvpx.so.%{version} libvpx.so |
|---|
| 143 | ln -sf libvpx.so.%{version} libvpx.so.0 |
|---|
| 144 | ln -sf libvpx.so.%{version} libvpx.so.0.9 |
|---|
| 145 | popd |
|---|
| 146 | %endif |
|---|
| 147 | |
|---|
| 148 | pushd %{buildroot} |
|---|
| 149 | # Rename a few examples |
|---|
| 150 | mv usr/bin/postproc usr/bin/vp8_postproc |
|---|
| 151 | mv usr/bin/simple_decoder usr/bin/vp8_simple_decoder |
|---|
| 152 | mv usr/bin/simple_encoder usr/bin/vp8_simple_encoder |
|---|
| 153 | mv usr/bin/twopass_encoder usr/bin/vp8_twopass_encoder |
|---|
| 154 | # Fix the binary permissions |
|---|
| 155 | chmod 755 usr/bin/* |
|---|
| 156 | popd |
|---|
| 157 | |
|---|
| 158 | rm -f $RPM_BUILD_ROOT%{_prefix}/md5sums.txt |
|---|
| 159 | rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.a |
|---|
| 160 | rm -f $RPM_BUILD_ROOT%{_prefix}/{CHANGELOG,README} |
|---|
| 161 | rm -rf $RPM_BUILD_ROOT%{_prefix}/build |
|---|
| 162 | |
|---|
| 163 | |
|---|
| 164 | %clean |
|---|
| 165 | rm -rf $RPM_BUILD_ROOT |
|---|
| 166 | |
|---|
| 167 | |
|---|
| 168 | %post -p /sbin/ldconfig |
|---|
| 169 | |
|---|
| 170 | %postun -p /sbin/ldconfig |
|---|
| 171 | |
|---|
| 172 | |
|---|
| 173 | %files |
|---|
| 174 | %defattr(-,root,root,-) |
|---|
| 175 | %doc AUTHORS LICENSE README CHANGELOG |
|---|
| 176 | %{_libdir}/*.so.* |
|---|
| 177 | |
|---|
| 178 | %files devel |
|---|
| 179 | %defattr(-,root,root,-) |
|---|
| 180 | %{_libdir}/*.so |
|---|
| 181 | %{_libdir}/pkgconfig/*.pc |
|---|
| 182 | %{_includedir}/vpx/*.h |
|---|
| 183 | |
|---|
| 184 | %files utils |
|---|
| 185 | %defattr(-,root,root,-) |
|---|
| 186 | %{_bindir}/* |
|---|
| 187 | |
|---|
| 188 | |
|---|
| 189 | %changelog |
|---|
| 190 | * Mon Dec 27 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.9.5-1 |
|---|
| 191 | - new upstream release |
|---|
| 192 | |
|---|
| 193 | * Sun Sep 26 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9.1-2 |
|---|
| 194 | - rebuild with rpm-4.8.1 for pkg-config file |
|---|
| 195 | |
|---|
| 196 | * Sun Jul 11 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.9.1-1 |
|---|
| 197 | - new upstream release |
|---|
| 198 | |
|---|
| 199 | * Mon May 24 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.9.0-1 |
|---|
| 200 | - initial build for Vine Linux |
|---|