]>
Commit | Line | Data |
---|---|---|
1cb0dba9 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without asm # MMX/SSE* x86 assembler optimizations | |
4 | ||
71d7fb7f JB |
5 | %ifnarch %{ix86} |
6 | # %{x8664} misses GOT code in i386inc.asm | |
1cb0dba9 JB |
7 | %undefine with_asm |
8 | %endif | |
8e8aed12 JB |
9 | Summary: Audio Video Standard of China library |
10 | Summary(pl.UTF-8): Biblioteka kodeka AVS (Audio Video Standard of China) | |
11 | Name: xavs | |
12 | Version: 0 | |
1cb0dba9 | 13 | %define svnver 55 |
2bc3b3a6 | 14 | Release: 0.svn%{svnver}.2 |
8e8aed12 JB |
15 | License: GPL v2+ |
16 | Group: Libraries | |
17 | # svn co https://xavs.svn.sourceforge.net/svnroot/xavs/trunk xavs | |
18 | Source0: %{name}-r%{svnver}.tar.xz | |
1cb0dba9 | 19 | # Source0-md5: c4f73561424d850a5c59ef202d85f0d7 |
8e8aed12 | 20 | Patch0: %{name}-dynamic-xavs.patch |
1cb0dba9 JB |
21 | Patch1: %{name}-asm.patch |
22 | URL: http://xavs.sourceforge.net/ | |
8e8aed12 JB |
23 | BuildRequires: tar >= 1:1.22 |
24 | # for svnversion | |
25 | BuildRequires: subversion | |
26 | BuildRequires: xz | |
1cb0dba9 JB |
27 | %if %{with asm} |
28 | BuildRequires: binutils >= 2:2.17 | |
29 | BuildRequires: yasm >= 0.6.1 | |
8e8aed12 JB |
30 | %endif |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
32 | ||
33 | %description | |
34 | AVS is the Audio Video Standard of China. This project aims to | |
35 | implement high quality AVS encoder and decoder. | |
36 | ||
37 | %description -l pl.UTF-8 | |
38 | AVS (Audio Video Standard of China) to standardowy kodek A/V dla Chin. | |
39 | Celem projektu jest zaimplementowanie wysokiej jakości kodera i | |
40 | dekodera AVS. | |
41 | ||
42 | %package devel | |
43 | Summary: Header files for AVS library | |
44 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki AVS | |
45 | Group: Development/Libraries | |
46 | Requires: %{name} = %{version}-%{release} | |
47 | ||
48 | %description devel | |
49 | Header files for AVS library. | |
50 | ||
51 | %description devel -l pl.UTF-8 | |
52 | Pliki nagłówkowe biblioteki AVS. | |
53 | ||
54 | %package static | |
55 | Summary: Static AVS library | |
56 | Summary(pl.UTF-8): Statyczna biblioteka AVS | |
57 | Group: Development/Libraries | |
58 | Requires: %{name}-devel = %{version}-%{release} | |
59 | ||
60 | %description static | |
61 | Static AVS library. | |
62 | ||
63 | %description static -l pl.UTF-8 | |
64 | Statyczna biblioteka AVS. | |
65 | ||
66 | %prep | |
67 | %setup -q -n %{name} | |
68 | %patch0 -p1 | |
1cb0dba9 | 69 | %patch1 -p1 |
8e8aed12 JB |
70 | |
71 | %build | |
72 | # not autoconf script | |
73 | ./configure \ | |
74 | --prefix=%{_prefix} \ | |
75 | --libdir=%{_libdir} \ | |
f329f731 | 76 | %{?with_asm:--enable-asm}%{!?with_asm:--disable-asm} \ |
8e8aed12 JB |
77 | --enable-shared \ |
78 | --extra-cflags="%{rpmcflags} %{rpmcppflags} -fno-strict-aliasing" \ | |
79 | --extra-ldflags="%{rpmldflags}" | |
8e8aed12 JB |
80 | |
81 | # linking hack | |
82 | ln -sf libxavs.so.1 libxavs.so | |
83 | ||
84 | %{__make} default libxavs.a \ | |
85 | CC="%{__cc}" | |
86 | ||
87 | %install | |
88 | rm -rf $RPM_BUILD_ROOT | |
89 | ||
90 | %{__make} install \ | |
91 | DESTDIR=$RPM_BUILD_ROOT | |
92 | ||
93 | %clean | |
94 | rm -rf $RPM_BUILD_ROOT | |
95 | ||
96 | %post -p /sbin/ldconfig | |
97 | %postun -p /sbin/ldconfig | |
98 | ||
99 | %files | |
100 | %defattr(644,root,root,755) | |
101 | %attr(755,root,root) %{_bindir}/xavs | |
102 | %attr(755,root,root) %{_libdir}/libxavs.so.1 | |
103 | ||
104 | %files devel | |
105 | %defattr(644,root,root,755) | |
106 | %attr(755,root,root) %{_libdir}/libxavs.so | |
107 | %{_includedir}/xavs.h | |
108 | %{_pkgconfigdir}/xavs.pc | |
109 | ||
110 | %files static | |
111 | %defattr(644,root,root,755) | |
112 | %{_libdir}/libxavs.a |