| 1 | # Note: Based on http://pkgs.fedoraproject.org/cgit/rpms/libvpx.git/tree/libvpx.spec?id=f7d58329e129a2102939cc28a31afa129b5318ff
|
|---|
| 2 |
|
|---|
| 3 | Name: libvpx
|
|---|
| 4 | Summary: VP8/VP9 Video Codec SDK
|
|---|
| 5 | Version: 1.6.1
|
|---|
| 6 | Release: 1%{?dist}
|
|---|
| 7 | License: BSD
|
|---|
| 8 | Group: System Environment/Libraries
|
|---|
| 9 | URL: http://www.webmproject.org/code/
|
|---|
| 10 | BuildRequires: nasm
|
|---|
| 11 | BuildRequires: doxygen
|
|---|
| 12 |
|
|---|
| 13 | %define svn_url http://svn.netlabs.org/repos/ports/libvpx/trunk
|
|---|
| 14 | %define svn_rev 1963
|
|---|
| 15 |
|
|---|
| 16 | Source: %{name}-%{version}-r%{svn_rev}.zip
|
|---|
| 17 |
|
|---|
| 18 | BuildRequires: gcc make subversion zip
|
|---|
| 19 |
|
|---|
| 20 | %description
|
|---|
| 21 | libvpx provides the VP8/VP9 SDK, which allows you to integrate your applications
|
|---|
| 22 | with the VP8 and VP9 video codecs, high quality, royalty free, open source codecs
|
|---|
| 23 | deployed on millions of computers and devices worldwide.
|
|---|
| 24 |
|
|---|
| 25 | %package devel
|
|---|
| 26 | Summary: Development files for libvpx
|
|---|
| 27 | Group: Development/Libraries
|
|---|
| 28 | Requires: %{name} = %{version}-%{release}
|
|---|
| 29 |
|
|---|
| 30 | %description devel
|
|---|
| 31 | Development libraries and headers for developing software against
|
|---|
| 32 | libvpx.
|
|---|
| 33 |
|
|---|
| 34 | %package devel-doc
|
|---|
| 35 | Summary: Development documentation files for %{name}
|
|---|
| 36 | Group: Documentation
|
|---|
| 37 | BuildArch: noarch
|
|---|
| 38 | Requires: %{name}-devel = %{version}-%{release}
|
|---|
| 39 |
|
|---|
| 40 | %description devel-doc
|
|---|
| 41 | This package contains the documentation files useful for
|
|---|
| 42 | developing applications that use %{name}.
|
|---|
| 43 |
|
|---|
| 44 | %package utils
|
|---|
| 45 | Summary: VP8 utilities and tools
|
|---|
| 46 | Group: Development/Tools
|
|---|
| 47 | Requires: %{name} = %{version}-%{release}
|
|---|
| 48 |
|
|---|
| 49 | %description utils
|
|---|
| 50 | A selection of utilities and tools for VP8, including a sample encoder
|
|---|
| 51 | and decoder.
|
|---|
| 52 |
|
|---|
| 53 | %legacy_runtime_packages
|
|---|
| 54 |
|
|---|
| 55 | %debug_package
|
|---|
| 56 |
|
|---|
| 57 | %prep
|
|---|
| 58 | %if %{?svn_rev:%(sh -c 'if test -f "%{_sourcedir}/%{name}-%{version}-r%{svn_rev}.zip" ; then echo 1 ; else echo 0 ; fi')}%{!?svn_rev):0}
|
|---|
| 59 | %setup -q
|
|---|
| 60 | %else
|
|---|
| 61 | %setup -n "%{name}-%{version}" -Tc
|
|---|
| 62 | svn export %{?svn_rev:-r %{svn_rev}} %{svn_url} . --force
|
|---|
| 63 | rm -f "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip"
|
|---|
| 64 | (cd .. && zip -SrX9 "%{_sourcedir}/%{name}-%{version}%{?svn_rev:-r%{svn_rev}}.zip" "%{name}-%{version}")
|
|---|
| 65 | %endif
|
|---|
| 66 |
|
|---|
| 67 | %build
|
|---|
| 68 | export LDFLAGS="-Zomf -Zmap -Zhigh-mem"
|
|---|
| 69 |
|
|---|
| 70 | ./configure \
|
|---|
| 71 | --extra-cflags="%{optflags}" \
|
|---|
| 72 | --enable-pic --disable-install-srcs \
|
|---|
| 73 | --enable-vp9-decoder --enable-vp9-encoder \
|
|---|
| 74 | --enable-experimental --enable-spatial-svc \
|
|---|
| 75 | --enable-vp9-highbitdepth \
|
|---|
| 76 | --enable-shared \
|
|---|
| 77 | --prefix=%{_prefix} --libdir=%{_libdir} --size-limit=16384x16384 \
|
|---|
| 78 |
|
|---|
| 79 | make %{?_smp_mflags} verbose=true
|
|---|
| 80 |
|
|---|
| 81 | %install
|
|---|
| 82 | rm -rf %{buildroot}
|
|---|
| 83 | make DIST_DIR=%{buildroot}%{_prefix} dist
|
|---|
| 84 |
|
|---|
| 85 | # Simpler to label the dir as %%doc (resides in the build dir).
|
|---|
| 86 | if [ -d %{buildroot}%{_prefix}/docs ]; then
|
|---|
| 87 | rm -rf %{buildroot}%{_prefix}/docs
|
|---|
| 88 | fi
|
|---|
| 89 |
|
|---|
| 90 | (
|
|---|
| 91 | cd %{buildroot}
|
|---|
| 92 |
|
|---|
| 93 | # Stuff we don't need.
|
|---|
| 94 | rm -rf .%{_prefix}/md5sums.txt ./%{_prefix}/lib/libvpx.a ./%{_prefix}/CHANGELOG ./%{_prefix}/README
|
|---|
| 95 | # No, bad google. No treat.
|
|---|
| 96 | mv .%{_bindir}/examples/* ./%{_bindir}
|
|---|
| 97 | mv .%{_bindir}/tools/* ./%{_bindir}
|
|---|
| 98 | rm -rf .%{_bindir}/examples .%{_bindir}/tools
|
|---|
| 99 |
|
|---|
| 100 | # Rename a few examples
|
|---|
| 101 | for f in `find .%{_bindir} -type f ! -name 'vpx*.exe' ! -name 'vp8*.exe' ! -name 'vp9*.exe'` ; do
|
|---|
| 102 | mv $f .%{_bindir}/vpx_${f##*/}
|
|---|
| 103 | done
|
|---|
| 104 | # Fix the binary permissions
|
|---|
| 105 | chmod 755 .%{_bindir}/*
|
|---|
| 106 | )
|
|---|
| 107 |
|
|---|
| 108 | %clean
|
|---|
| 109 | rm -rf $RPM_BUILD_ROOT
|
|---|
| 110 |
|
|---|
| 111 | %files
|
|---|
| 112 | %license LICENSE
|
|---|
| 113 | %doc AUTHORS CHANGELOG README
|
|---|
| 114 | %{_libdir}/libvpx4.dll
|
|---|
| 115 |
|
|---|
| 116 | %files devel
|
|---|
| 117 | %{_includedir}/vpx/
|
|---|
| 118 | %{_libdir}/pkgconfig/vpx.pc
|
|---|
| 119 | %{_libdir}/libvpx*.a
|
|---|
| 120 |
|
|---|
| 121 | %files devel-doc
|
|---|
| 122 | # These are SDK docs, not really useful to an end-user.
|
|---|
| 123 | %doc docs/html/
|
|---|
| 124 |
|
|---|
| 125 | %files utils
|
|---|
| 126 | %{_bindir}/*.exe
|
|---|
| 127 |
|
|---|
| 128 | %changelog
|
|---|
| 129 | * Fri Feb 3 2017 Dmitriy Kuminov <coding@dmik.org> 1.6.1-1
|
|---|
| 130 | - Update to version 1.6.1.
|
|---|
| 131 | - Generate development documentation and provide it in a separate sub-package.
|
|---|
| 132 | - Provide legacy packages with DLLs for old ABI.
|
|---|
| 133 |
|
|---|
| 134 | * Fri Feb 3 2017 Dmitriy Kuminov <coding@dmik.org> 1.4.0-2
|
|---|
| 135 | - Use -Zomf to preserve HLL debug info and significantly reduce DLL size.
|
|---|
| 136 | - Use per-platform optimization flags.
|
|---|
| 137 | - Remove static library and OMF libraries.
|
|---|
| 138 |
|
|---|
| 139 | * Tue Nov 17 2015 Valery Sedletski <_valerius@mail.ru> - 1.4.0 OS/2 initial build
|
|---|
| 140 | - initial OS/2 build
|
|---|