source: projects/specs/trunk/lib/libv/libvpx/libvpx-vl.spec @ 11504

Revision 11504, 6.3 KB checked in by tomop, 6 years ago (diff)

libvpx-1.7.0-1

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