[11504] | 1 | %global somajor 5 |
---|
| 2 | %global sominor 0 |
---|
| 3 | %global sotiny 0 |
---|
| 4 | %global soversion %{somajor}.%{sominor}.%{sotiny} |
---|
| 5 | |
---|
[1075] | 6 | Name: libvpx |
---|
[11504] | 7 | Version: 1.7.0 |
---|
[2403] | 8 | Release: 1%{?_dist_release} |
---|
[11504] | 9 | Summary: The VP8/VP9 Codec SDK |
---|
| 10 | Summary(ja): VP8/VP9 コーデックソフトウェア開発キット |
---|
[1075] | 11 | |
---|
| 12 | Group: System Environment/Libraries |
---|
| 13 | License: BSD |
---|
[11504] | 14 | URL: http://www.webmproject.org/code/ |
---|
| 15 | Source0: https://github.com/webmproject/libvpx/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz |
---|
| 16 | Source1: vpx_config.h |
---|
[1075] | 17 | Source2: libvpx.ver |
---|
| 18 | |
---|
| 19 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
---|
| 20 | %ifarch %{ix86} x86_64 |
---|
| 21 | BuildRequires: yasm |
---|
| 22 | %endif |
---|
| 23 | |
---|
| 24 | Vendor: Project Vine |
---|
| 25 | Distribution: Vine Linux |
---|
| 26 | Packager: daisuke |
---|
| 27 | |
---|
| 28 | %description |
---|
[11504] | 29 | The WebM VP8/VP9 Codec SDK allows you to integrate your applications with |
---|
| 30 | the VP8/VP9 video codec, a high quality, royalty free, open source codec |
---|
[1075] | 31 | deployed on millions of computers and devices worldwide. |
---|
| 32 | |
---|
| 33 | %description -l ja |
---|
[11504] | 34 | WebM VP8/VP9 コーデック SDK は、VP8/VP9 ビデオコーデックをアプリケーションに |
---|
| 35 | 統合するための開発キットです。VP8/VP9ビデオコーデックは高品質でロイヤリティフリー |
---|
| 36 | かつオープンソースのコーデックで、世界中の多くのコンピュータやデバイスで利用されて |
---|
| 37 | います。 |
---|
[1075] | 38 | |
---|
| 39 | %package devel |
---|
| 40 | Summary: Development files for %{name} |
---|
| 41 | Summary(ja): %{name} の開発ファイル |
---|
| 42 | Group: Development/Libraries |
---|
| 43 | Requires: %{name} = %{version}-%{release} |
---|
| 44 | |
---|
| 45 | %description devel |
---|
| 46 | The %{name}-devel package contains development files for |
---|
| 47 | %{name}. |
---|
| 48 | |
---|
| 49 | %description devel -l ja |
---|
| 50 | %{name}-devel パッケージは %{name} の開発用ファイルを含んでいます。 |
---|
| 51 | |
---|
| 52 | %package utils |
---|
| 53 | Summary: example programs for %{name} |
---|
| 54 | Summary(ja): %{name} のサンプルプログラム |
---|
| 55 | Group: Applications/Multimedia |
---|
| 56 | Requires: %{name} = %{version}-%{release} |
---|
| 57 | |
---|
| 58 | %description utils |
---|
| 59 | The %{name}-utils package contains example programs that |
---|
| 60 | use %{name}. |
---|
| 61 | |
---|
| 62 | %description utils -l ja |
---|
| 63 | %{name}-utils パッケージは、%{name} を使用したサンプル |
---|
| 64 | アプリケーションを含んでいます。 |
---|
| 65 | |
---|
| 66 | |
---|
| 67 | %prep |
---|
[11504] | 68 | %setup -q |
---|
[1075] | 69 | |
---|
| 70 | %build |
---|
| 71 | |
---|
| 72 | %ifarch %{ix86} |
---|
| 73 | %global vpxtarget x86-linux-gcc |
---|
| 74 | %else |
---|
| 75 | %ifarch x86_64 |
---|
| 76 | %global vpxtarget x86_64-linux-gcc |
---|
| 77 | %else |
---|
| 78 | %global vpxtarget generic-gnu |
---|
| 79 | %endif |
---|
| 80 | %endif |
---|
| 81 | |
---|
[1304] | 82 | %if "%{vpxtarget}" == "generic-gnu" |
---|
| 83 | %global generic_target 1 |
---|
| 84 | %else |
---|
| 85 | %global generic_target 0 |
---|
| 86 | %endif |
---|
| 87 | |
---|
[1075] | 88 | ./configure \ |
---|
| 89 | --target=%{vpxtarget} \ |
---|
| 90 | --enable-pic \ |
---|
[11504] | 91 | --enable-experimental --enable-spatial-svc \ |
---|
| 92 | --enable-vp9-highbitdepth \ |
---|
[1304] | 93 | %if ! %{generic_target} |
---|
| 94 | --enable-shared \ |
---|
| 95 | %endif |
---|
| 96 | --prefix=%{_prefix} \ |
---|
| 97 | --libdir=%{_libdir} \ |
---|
[1075] | 98 | --disable-install-docs \ |
---|
[11504] | 99 | --enable-install-srcs \ |
---|
| 100 | --size-limit=16384x16384 |
---|
[1075] | 101 | |
---|
| 102 | # fix up optflags |
---|
[1304] | 103 | sed -i "s|-O3|%{optflags}|g" libs-%{vpxtarget}.mk |
---|
| 104 | sed -i "s|-O3|%{optflags}|g" examples-%{vpxtarget}.mk |
---|
| 105 | sed -i "s|-O3|%{optflags}|g" docs-%{vpxtarget}.mk |
---|
[1075] | 106 | |
---|
[11504] | 107 | %{__make} %{?_smp_mflags} verbose=true |
---|
[1075] | 108 | |
---|
[11504] | 109 | # Manual shared library creation |
---|
| 110 | # We should never need to do this anymore, and if we do, we need to fix the version-script. |
---|
[1304] | 111 | %if %{generic_target} |
---|
[11504] | 112 | mkdir tmp |
---|
| 113 | cd tmp |
---|
[1075] | 114 | ar x ../libvpx_g.a |
---|
[11504] | 115 | cd .. |
---|
| 116 | gcc -fPIC -shared -pthread -lm -Wl,--no-undefined -Wl,-soname,libvpx.so.%{somajor} -Wl,--version-script,%{SOURCE2} -Wl,-z,noexecstack -o libvpx.so.%{soversion} |
---|
| 117 | tmp/*.o |
---|
[1075] | 118 | rm -rf tmp |
---|
[1304] | 119 | %endif |
---|
[1075] | 120 | |
---|
| 121 | %install |
---|
| 122 | %{__rm} -rf $RPM_BUILD_ROOT |
---|
[1304] | 123 | %{__make} DIST_DIR=$RPM_BUILD_ROOT%{_prefix} dist |
---|
[1075] | 124 | |
---|
[11504] | 125 | # Simpler to label the dir as %%doc. |
---|
| 126 | if [ -d %{buildroot}/usr/docs ]; then |
---|
| 127 | mv %{buildroot}/usr/docs doc/ |
---|
| 128 | fi |
---|
| 129 | |
---|
| 130 | # Again, we should never need to do this anymore. |
---|
[1304] | 131 | %if %{generic_target} |
---|
[11504] | 132 | install -p libvpx.so.%{soversion} %{buildroot}%{_libdir} |
---|
[1304] | 133 | pushd %{buildroot}%{_libdir} |
---|
[11504] | 134 | ln -sf libvpx.so.%{soversion} libvpx.so |
---|
| 135 | ln -sf libvpx.so.%{soversion} libvpx.so.%{somajor} |
---|
| 136 | ln -sf libvpx.so.%{soversion} libvpx.so.%{somajor}.%{sominor} |
---|
[1304] | 137 | popd |
---|
| 138 | %endif |
---|
| 139 | |
---|
[1075] | 140 | pushd %{buildroot} |
---|
[11504] | 141 | # Stuff we don't need. |
---|
| 142 | rm -rf usr/build/ usr/md5sums.txt usr/lib*/*.a usr/CHANGELOG usr/README |
---|
| 143 | # No, bad google. No treat. |
---|
| 144 | mv usr/bin/examples/* usr/bin/ |
---|
| 145 | rm -rf usr/bin/examples |
---|
| 146 | |
---|
[1075] | 147 | # Rename a few examples |
---|
[1304] | 148 | mv usr/bin/postproc usr/bin/vp8_postproc |
---|
[1075] | 149 | mv usr/bin/simple_decoder usr/bin/vp8_simple_decoder |
---|
| 150 | mv usr/bin/simple_encoder usr/bin/vp8_simple_encoder |
---|
| 151 | mv usr/bin/twopass_encoder usr/bin/vp8_twopass_encoder |
---|
| 152 | # Fix the binary permissions |
---|
| 153 | chmod 755 usr/bin/* |
---|
| 154 | popd |
---|
| 155 | |
---|
[11504] | 156 | # Get the vpx_config.h file |
---|
| 157 | %ifarch %{arm} |
---|
| 158 | cp -a vpx_config.h %{buildroot}%{_includedir}/vpx/vpx_config-arm.h |
---|
| 159 | %else |
---|
| 160 | # Does ppc64le need its own? |
---|
| 161 | %ifarch ppc64 ppc64le |
---|
| 162 | cp -a vpx_config.h %{buildroot}%{_includedir}/vpx/vpx_config-ppc64.h |
---|
| 163 | %else |
---|
| 164 | %ifarch s390 s390x |
---|
| 165 | cp -a vpx_config.h %{buildroot}%{_includedir}/vpx/vpx_config-s390.h |
---|
| 166 | %else |
---|
| 167 | %ifarch %{ix86} |
---|
| 168 | cp -a vpx_config.h %{buildroot}%{_includedir}/vpx/vpx_config-x86.h |
---|
| 169 | %else |
---|
| 170 | cp -a vpx_config.h %{buildroot}%{_includedir}/vpx/vpx_config-%{_arch}.h |
---|
| 171 | %endif |
---|
| 172 | %endif |
---|
| 173 | %endif |
---|
| 174 | %endif |
---|
[1075] | 175 | |
---|
[11504] | 176 | cp %{SOURCE1} %{buildroot}%{_includedir}/vpx/vpx_config.h |
---|
| 177 | # for timestamp sync |
---|
| 178 | touch -r AUTHORS %{buildroot}%{_includedir}/vpx/vpx_config.h |
---|
[1075] | 179 | |
---|
[11504] | 180 | mv %{buildroot}%{_prefix}/src/vpx_dsp %{buildroot}%{_includedir}/ |
---|
| 181 | mv %{buildroot}%{_prefix}/src/vpx_mem %{buildroot}%{_includedir}/ |
---|
| 182 | mv %{buildroot}%{_prefix}/src/vpx_ports %{buildroot}%{_includedir}/ |
---|
| 183 | mv %{buildroot}%{_prefix}/src/vpx_scale %{buildroot}%{_includedir}/ |
---|
| 184 | |
---|
| 185 | rm -rf %{buildroot}%{_prefix}/src |
---|
| 186 | |
---|
[1075] | 187 | %clean |
---|
| 188 | rm -rf $RPM_BUILD_ROOT |
---|
| 189 | |
---|
| 190 | |
---|
| 191 | %post -p /sbin/ldconfig |
---|
| 192 | |
---|
| 193 | %postun -p /sbin/ldconfig |
---|
| 194 | |
---|
| 195 | |
---|
| 196 | %files |
---|
| 197 | %defattr(-,root,root,-) |
---|
| 198 | %doc AUTHORS LICENSE README CHANGELOG |
---|
| 199 | %{_libdir}/*.so.* |
---|
| 200 | |
---|
| 201 | %files devel |
---|
| 202 | %defattr(-,root,root,-) |
---|
[11504] | 203 | %doc docs/html/ |
---|
| 204 | %{_includedir}/vpx/ |
---|
| 205 | %{_includedir}/vpx_dsp/ |
---|
| 206 | %{_includedir}/vpx_mem/ |
---|
| 207 | %{_includedir}/vpx_ports/ |
---|
| 208 | %{_includedir}/vpx_scale/ |
---|
| 209 | %{_libdir}/pkgconfig/vpx.pc |
---|
| 210 | %{_libdir}/libvpx.so |
---|
[1075] | 211 | |
---|
| 212 | %files utils |
---|
| 213 | %defattr(-,root,root,-) |
---|
| 214 | %{_bindir}/* |
---|
| 215 | |
---|
| 216 | |
---|
| 217 | %changelog |
---|
[11504] | 218 | * Thu Feb 22 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.7.0-1 |
---|
| 219 | - new upstream release. |
---|
| 220 | - updated Source2. |
---|
| 221 | - added Source1. |
---|
| 222 | |
---|
[6901] | 223 | * Mon Oct 08 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.1.0-1 |
---|
| 224 | - new upstream release |
---|
| 225 | - remove Patch0 (libvpx-0.9.0-no-explicit-dep-on-static-lib.patch) |
---|
| 226 | - remove Source1 (libvpx.pc) |
---|
| 227 | |
---|
[5296] | 228 | * Sun Oct 16 2011 Munehiro Yamamoto <munepi@vinelinux.org> 0.9.6-1 |
---|
| 229 | - new upstream release |
---|
| 230 | |
---|
[2403] | 231 | * Mon Dec 27 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.9.5-1 |
---|
| 232 | - new upstream release |
---|
| 233 | |
---|
[1901] | 234 | * Sun Sep 26 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.9.1-2 |
---|
| 235 | - rebuild with rpm-4.8.1 for pkg-config file |
---|
| 236 | |
---|
[1304] | 237 | * Sun Jul 11 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.9.1-1 |
---|
| 238 | - new upstream release |
---|
| 239 | |
---|
[1075] | 240 | * Mon May 24 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.9.0-1 |
---|
| 241 | - initial build for Vine Linux |
---|