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

Revision 1075, 4.5 KB checked in by daisuke, 14 years ago (diff)

libvpx: new package, 0.9.0

Line 
1Name:           libvpx
2Version:        0.9.0
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:        libvpx-0.9.0.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
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./configure \
80 --target=%{vpxtarget} \
81 --enable-pic \
82 --disable-install-docs \
83 --disable-install-srcs
84
85# fix up optflags
86sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{optflags} -fPIC|g" libs-%{vpxtarget}.mk
87sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{optflags} -fPIC|g" examples-%{vpxtarget}.mk
88sed -i "s|\"vpx_config.h\"|\"vpx_config.h\" %{optflags} -fPIC|g" docs-%{vpxtarget}.mk
89
90%{__make} %{?_smp_mflags} verbose=true target=libs
91
92mkdir -p tmp
93pushd tmp
94ar x ../libvpx_g.a
95popd
96gcc -shared -fPIC -pthread -lm \
97    -Wl,--no-undefined \
98    -Wl,-soname,libvpx.so.0 \
99    -Wl,--version-script,%{SOURCE2} \
100    -Wl,-z,noexecstack \
101    -o libvpx.so.0.0.0 tmp/*.o
102rm -rf tmp
103
104ln -sf libvpx.so.0.0.0 libvpx.so
105
106mv libvpx.a libvpx.a.tmp
107mv libvpx_g.a libvpx_g.a.tmp
108
109make %{?_smp_mflags} verbose=true target=examples
110
111mv libvpx.a.tmp libvpx.a
112mv libvpx_g.a.tmp libvpx_g.a
113
114%install
115%{__rm} -rf $RPM_BUILD_ROOT
116mkdir -p $RPM_BUILD_ROOT%{_prefix}
117%{__make} DIST_DIR=$RPM_BUILD_ROOT%{_prefix} install
118mkdir -p $RPM_BUILD_ROOT%{_libdir}
119%{__install} -m755 libvpx.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}
120ln -sf libvpx.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/libvpx.so.0
121ln -sf libvpx.so.0.0.0 $RPM_BUILD_ROOT%{_libdir}/libvpx.so
122
123# Install the pkg-config file
124mkdir -p %{buildroot}%{_libdir}/pkgconfig/
125install -m0644 %{SOURCE1} %{buildroot}%{_libdir}/pkgconfig/
126# Fill in the variables
127sed -i "s|@PREFIX@|%{_prefix}|g" %{buildroot}%{_libdir}/pkgconfig/libvpx.pc
128sed -i "s|@LIBDIR@|%{_libdir}|g" %{buildroot}%{_libdir}/pkgconfig/libvpx.pc
129sed -i "s|@INCLUDEDIR@|%{_includedir}|g" %{buildroot}%{_libdir}/pkgconfig/libvpx.pc
130
131pushd %{buildroot}
132# Rename a few examples
133mv usr/bin/simple_decoder usr/bin/vp8_simple_decoder
134mv usr/bin/simple_encoder usr/bin/vp8_simple_encoder
135mv usr/bin/twopass_encoder usr/bin/vp8_twopass_encoder
136# Move the headers into the subdir
137mkdir -p usr/include/vpx/
138mv usr/include/*.h usr/include/vpx/
139# Fix the binary permissions
140chmod 755 usr/bin/*
141popd
142
143rm -f $RPM_BUILD_ROOT%{_prefix}/md5sums.txt
144rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.a
145
146
147
148%clean
149rm -rf $RPM_BUILD_ROOT
150
151
152%post -p /sbin/ldconfig
153
154%postun -p /sbin/ldconfig
155
156
157%files
158%defattr(-,root,root,-)
159%doc AUTHORS LICENSE README CHANGELOG
160%{_libdir}/*.so.*
161
162%files devel
163%defattr(-,root,root,-)
164%{_libdir}/*.so
165%{_libdir}/pkgconfig/*.pc
166%{_includedir}/vpx/*.h
167
168%files utils
169%defattr(-,root,root,-)
170%{_bindir}/*
171
172
173%changelog
174* Mon May 24 2010 Daisuke SUZUKI <daisuke@linux.or.jp> 0.9.0-1
175- initial build for Vine Linux
Note: See TracBrowser for help on using the repository browser.