]>
Commit | Line | Data |
---|---|---|
1 | %define realname libvorbis | |
2 | Summary: The Vorbis General Audio Compression Codec - MinGW32 cross version | |
3 | Summary(pl.UTF-8): Kodek kompresji audio - Vorbis - wersja skrośna dla MinGW32 | |
4 | Name: crossmingw32-%{realname} | |
5 | Version: 1.3.4 | |
6 | Release: 1 | |
7 | License: BSD | |
8 | Group: Development/Libraries | |
9 | Source0: http://downloads.xiph.org/releases/vorbis/%{realname}-%{version}.tar.xz | |
10 | # Source0-md5: 55f2288055e44754275a17c9a2497391 | |
11 | Patch0: %{realname}-ac_fixes.patch | |
12 | Patch1: %{realname}-make.patch | |
13 | URL: http://www.vorbis.com/ | |
14 | BuildRequires: autoconf >= 2.50 | |
15 | BuildRequires: automake >= 1:1.6 | |
16 | BuildRequires: crossmingw32-gcc >= 3.0 | |
17 | BuildRequires: crossmingw32-libogg >= 1.0 | |
18 | BuildRequires: crossmingw32-w32api | |
19 | BuildRequires: libtool | |
20 | BuildRequires: pkgconfig >= 1:0.15 | |
21 | BuildRequires: sed >= 4.0 | |
22 | BuildRequires: tar >= 1:1.22 | |
23 | BuildRequires: xz | |
24 | Requires: crossmingw32-libogg >= 1.0 | |
25 | Requires: crossmingw32-runtime | |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | %define no_install_post_strip 1 | |
29 | ||
30 | %define target i386-mingw32 | |
31 | %define target_platform %{target} | |
32 | ||
33 | %define _sysprefix /usr | |
34 | %define _prefix %{_sysprefix}/%{target} | |
35 | %define _libdir %{_prefix}/lib | |
36 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig | |
37 | %define _dlldir /usr/share/wine/windows/system | |
38 | %define __cc %{target}-gcc | |
39 | %define __cxx %{target}-g++ | |
40 | ||
41 | %ifnarch %{ix86} | |
42 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
43 | %define optflags -O2 | |
44 | %endif | |
45 | # -z options are invalid for mingw linker, most of -f options are Linux-specific | |
46 | %define filterout_ld -Wl,-z,.* | |
47 | %define filterout_c -f[-a-z0-9=]* | |
48 | ||
49 | %description | |
50 | Ogg Vorbis is a fully open, non-proprietary, patent-and-royalty-free, | |
51 | general-purpose compressed audio format for audio and music at fixed | |
52 | and variable bitrates from 16 to 128 kbps/channel. | |
53 | ||
54 | This package contains the cross version for Win32. | |
55 | ||
56 | %description -l pl.UTF-8 | |
57 | Ogg Vorbis jest całkowicie otwartym, nie będącym niczyją własnością, | |
58 | wolnym od patentów, ogólnego przeznaczenia kodekiem audio i muzyki o | |
59 | stałej i zmiennej bitrate od 16 do 128 kbps/kanał. | |
60 | ||
61 | Ten pakiet zawiera wersję skrośną dla Win32. | |
62 | ||
63 | %package static | |
64 | Summary: Static libvorbis library (cross MinGW32 version) | |
65 | Summary(pl.UTF-8): Statyczna biblioteka libvorbis (wersja skrośna MinGW32) | |
66 | Group: Development/Libraries | |
67 | Requires: %{name} = %{version}-%{release} | |
68 | ||
69 | %description static | |
70 | Static libvorbis library (cross MinGW32 version). | |
71 | ||
72 | %description static -l pl.UTF-8 | |
73 | Statyczna biblioteka libvorbis (wersja skrośna MinGW32). | |
74 | ||
75 | %package dll | |
76 | Summary: DLL libvorbis library for Windows | |
77 | Summary(pl.UTF-8): Biblioteka DLL libvorbis dla Windows | |
78 | Group: Applications/Emulators | |
79 | Requires: crossmingw32-libogg-dll >= 1.0 | |
80 | Requires: wine | |
81 | ||
82 | %description dll | |
83 | DLL libvorbis library for Windows. | |
84 | ||
85 | %description dll -l pl.UTF-8 | |
86 | Biblioteka DLL libvorbis dla Windows. | |
87 | ||
88 | %prep | |
89 | %setup -q -n %{realname}-%{version} | |
90 | %patch0 -p1 | |
91 | %patch1 -p1 | |
92 | %{__sed} -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.ac | |
93 | ||
94 | %build | |
95 | export PKG_CONFIG_LIBDIR=%{_prefix}/lib/pkgconfig | |
96 | %{__libtoolize} | |
97 | %{__aclocal} -I m4 | |
98 | %{__autoconf} | |
99 | %{__autoheader} | |
100 | %{__automake} | |
101 | %configure \ | |
102 | OBJDUMP=%{target}-objdump \ | |
103 | --host=%{target} \ | |
104 | --target=%{target} | |
105 | ||
106 | %{__make} | |
107 | ||
108 | %install | |
109 | rm -rf $RPM_BUILD_ROOT | |
110 | ||
111 | %{__make} install \ | |
112 | DESTDIR=$RPM_BUILD_ROOT | |
113 | ||
114 | install -d $RPM_BUILD_ROOT%{_dlldir} | |
115 | mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
116 | ||
117 | %if 0%{!?debug:1} | |
118 | %{target}-strip --strip-unneeded -R.comment -R.note $RPM_BUILD_ROOT%{_dlldir}/*.dll | |
119 | %{target}-strip -g -R.comment -R.note $RPM_BUILD_ROOT%{_libdir}/*.a | |
120 | %endif | |
121 | ||
122 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/{aclocal,doc} | |
123 | ||
124 | %clean | |
125 | rm -rf $RPM_BUILD_ROOT | |
126 | ||
127 | %files | |
128 | %defattr(644,root,root,755) | |
129 | %doc AUTHORS CHANGES COPYING README | |
130 | %{_libdir}/libvorbis.dll.a | |
131 | %{_libdir}/libvorbisenc.dll.a | |
132 | %{_libdir}/libvorbisfile.dll.a | |
133 | %{_libdir}/libvorbis.la | |
134 | %{_libdir}/libvorbisenc.la | |
135 | %{_libdir}/libvorbisfile.la | |
136 | %{_includedir}/vorbis | |
137 | %{_pkgconfigdir}/vorbis.pc | |
138 | %{_pkgconfigdir}/vorbisenc.pc | |
139 | %{_pkgconfigdir}/vorbisfile.pc | |
140 | ||
141 | %files static | |
142 | %defattr(644,root,root,755) | |
143 | %{_libdir}/libvorbis.a | |
144 | %{_libdir}/libvorbisenc.a | |
145 | %{_libdir}/libvorbisfile.a | |
146 | ||
147 | %files dll | |
148 | %defattr(644,root,root,755) | |
149 | %{_dlldir}/libvorbis-*.dll | |
150 | %{_dlldir}/libvorbisenc-*.dll | |
151 | %{_dlldir}/libvorbisfile-*.dll |