source: projects/specs/branches/6/lib/libv/libvpx/libvpx-vl.spec @ 2403

Revision 2403, 5.0 KB checked in by daisuke, 13 years ago (diff)

libvpx: update to 0.9.5

Line 
1Name:           libvpx
2Version:        0.9.5
3Release:        1%{?_dist_release}
4Summary:        The VP8 Codec SDK
5Summary(ja):    VP8 コーデックソフトウェア開発キット
6
7Group:          System Environment/Libraries
8License:        BSD
9URL:            http://www.webmproject.org/tools/vp8-sdk/
10Source0:        http://webm.googlecode.com/files/%{name}-v%{version}.tar.bz2
11Source1:        libvpx.pc
12Source2:        libvpx.ver
13Patch0:         libvpx-0.9.0-no-explicit-dep-on-static-lib.patch
14
15BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
16%ifarch %{ix86} x86_64
17BuildRequires:  yasm
18%endif
19
20Vendor: Project Vine
21Distribution: Vine Linux
22Packager: daisuke
23
24%description
25The WebM VP8 Codec SDK allows you to integrate your applications with
26the VP8 video codec, a high quality, royalty free, open source codec
27deployed on millions of computers and devices worldwide.
28
29%description -l ja
30WebM VP8 コーデック SDK は、VP8 ビデオコーデックをアプリケーションに
31統合するための開発きっとです。VP8ビデオコーデックは高品質でロイヤリティ
32フリーかつオープンソースのコーデックで、世界中の多くのコンピュータや
33デバイスで利用されています。
34
35%package devel
36Summary:        Development files for %{name}
37Summary(ja):    %{name} の開発ファイル
38Group:          Development/Libraries
39Requires:       %{name} = %{version}-%{release}
40
41%description devel
42The %{name}-devel package contains development files for
43%{name}.
44
45%description devel -l ja
46%{name}-devel パッケージは %{name} の開発用ファイルを含んでいます。
47
48%package utils
49Summary:        example programs for %{name}
50Summary(ja):    %{name} のサンプルプログラム
51Group:          Applications/Multimedia
52Requires:       %{name} = %{version}-%{release}
53
54%description utils
55The %{name}-utils package contains example programs that
56use %{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
97sed -i "s|-O3|%{optflags}|g" libs-%{vpxtarget}.mk
98sed -i "s|-O3|%{optflags}|g" examples-%{vpxtarget}.mk
99sed -i "s|-O3|%{optflags}|g" docs-%{vpxtarget}.mk
100
101%{__make} %{?_smp_mflags} verbose=true target=libs
102
103%if %{generic_target}
104mkdir -p tmp
105pushd tmp
106ar x ../libvpx_g.a
107popd
108gcc -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
114rm -rf tmp
115%endif
116
117ln -sf libvpx.so.%{version} libvpx.so
118
119mv libvpx.a libvpx.a.tmp
120mv libvpx_g.a libvpx_g.a.tmp
121
122make %{?_smp_mflags} verbose=true target=examples
123
124mv libvpx.a.tmp libvpx.a
125mv 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
132mkdir -p %{buildroot}%{_libdir}/pkgconfig/
133install -m0644 %{SOURCE1} %{buildroot}%{_libdir}/pkgconfig/
134# Fill in the variables
135sed -i "s|@PREFIX@|%{_prefix}|g" %{buildroot}%{_libdir}/pkgconfig/libvpx.pc
136sed -i "s|@LIBDIR@|%{_libdir}|g" %{buildroot}%{_libdir}/pkgconfig/libvpx.pc
137sed -i "s|@INCLUDEDIR@|%{_includedir}|g" %{buildroot}%{_libdir}/pkgconfig/libvpx.pc
138
139%if %{generic_target}
140install -p libvpx.so.%{version} %{buildroot}%{_libdir}
141pushd %{buildroot}%{_libdir}
142ln -sf libvpx.so.%{version} libvpx.so
143ln -sf libvpx.so.%{version} libvpx.so.0
144ln -sf libvpx.so.%{version} libvpx.so.0.9
145popd
146%endif
147
148pushd %{buildroot}
149# Rename a few examples
150mv usr/bin/postproc usr/bin/vp8_postproc
151mv usr/bin/simple_decoder usr/bin/vp8_simple_decoder
152mv usr/bin/simple_encoder usr/bin/vp8_simple_encoder
153mv usr/bin/twopass_encoder usr/bin/vp8_twopass_encoder
154# Fix the binary permissions
155chmod 755 usr/bin/*
156popd
157
158rm -f $RPM_BUILD_ROOT%{_prefix}/md5sums.txt
159rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.a
160rm -f $RPM_BUILD_ROOT%{_prefix}/{CHANGELOG,README}
161rm -rf $RPM_BUILD_ROOT%{_prefix}/build
162
163
164%clean
165rm -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
Note: See TracBrowser for help on using the repository browser.