]>
Commit | Line | Data |
---|---|---|
fefa06f9 | 1 | %define realname libvorbis |
e25b9593 JB |
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 | |
fefa06f9 | 4 | Name: crossmingw32-%{realname} |
94cc5bca | 5 | Version: 1.3.4 |
fefa06f9 | 6 | Release: 1 |
7 | License: BSD | |
3cc5fdc6 | 8 | Group: Development/Libraries |
53845ee3 | 9 | Source0: http://downloads.xiph.org/releases/vorbis/%{realname}-%{version}.tar.xz |
94cc5bca | 10 | # Source0-md5: 55f2288055e44754275a17c9a2497391 |
fefa06f9 | 11 | Patch0: %{realname}-ac_fixes.patch |
12 | Patch1: %{realname}-make.patch | |
13 | URL: http://www.vorbis.com/ | |
53845ee3 JB |
14 | BuildRequires: autoconf >= 2.50 |
15 | BuildRequires: automake >= 1:1.6 | |
40f03a91 JB |
16 | BuildRequires: crossmingw32-gcc >= 3.0 |
17 | BuildRequires: crossmingw32-libogg >= 1.0 | |
fefa06f9 | 18 | BuildRequires: crossmingw32-w32api |
53845ee3 | 19 | BuildRequires: libtool |
b6359ee7 | 20 | BuildRequires: pkgconfig >= 1:0.15 |
3cc5fdc6 | 21 | BuildRequires: sed >= 4.0 |
53845ee3 JB |
22 | BuildRequires: tar >= 1:1.22 |
23 | BuildRequires: xz | |
40f03a91 | 24 | Requires: crossmingw32-libogg >= 1.0 |
fefa06f9 | 25 | Requires: crossmingw32-runtime |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | %define no_install_post_strip 1 | |
29 | ||
33cdbcdc JB |
30 | %define target i386-mingw32 |
31 | %define target_platform %{target} | |
fefa06f9 | 32 | |
33cdbcdc JB |
33 | %define _sysprefix /usr |
34 | %define _prefix %{_sysprefix}/%{target} | |
cada3af0 | 35 | %define _libdir %{_prefix}/lib |
33cdbcdc JB |
36 | %define _pkgconfigdir %{_prefix}/lib/pkgconfig |
37 | %define _dlldir /usr/share/wine/windows/system | |
38 | %define __cc %{target}-gcc | |
39 | %define __cxx %{target}-g++ | |
fefa06f9 | 40 | |
40f03a91 JB |
41 | %ifnarch %{ix86} |
42 | # arch-specific flags (like alpha's -mieee) are not valid for i386 gcc | |
fefa06f9 | 43 | %define optflags -O2 |
44 | %endif | |
3cc5fdc6 | 45 | # -z options are invalid for mingw linker, most of -f options are Linux-specific |
40f03a91 | 46 | %define filterout_ld -Wl,-z,.* |
3cc5fdc6 | 47 | %define filterout_c -f[-a-z0-9=]* |
fefa06f9 | 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 | ||
33cdbcdc JB |
54 | This package contains the cross version for Win32. |
55 | ||
17e12ff9 JR |
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ł. | |
fefa06f9 | 60 | |
33cdbcdc JB |
61 | Ten pakiet zawiera wersję skrośną dla Win32. |
62 | ||
63 | %package static | |
e25b9593 JB |
64 | Summary: Static libvorbis library (cross MinGW32 version) |
65 | Summary(pl.UTF-8): Statyczna biblioteka libvorbis (wersja skrośna MinGW32) | |
33cdbcdc JB |
66 | Group: Development/Libraries |
67 | Requires: %{name} = %{version}-%{release} | |
68 | ||
69 | %description static | |
e25b9593 | 70 | Static libvorbis library (cross MinGW32 version). |
33cdbcdc JB |
71 | |
72 | %description static -l pl.UTF-8 | |
e25b9593 | 73 | Statyczna biblioteka libvorbis (wersja skrośna MinGW32). |
33cdbcdc | 74 | |
fefa06f9 | 75 | %package dll |
33cdbcdc JB |
76 | Summary: DLL libvorbis library for Windows |
77 | Summary(pl.UTF-8): Biblioteka DLL libvorbis dla Windows | |
fefa06f9 | 78 | Group: Applications/Emulators |
40f03a91 | 79 | Requires: crossmingw32-libogg-dll >= 1.0 |
33cdbcdc | 80 | Requires: wine |
fefa06f9 | 81 | |
82 | %description dll | |
33cdbcdc | 83 | DLL libvorbis library for Windows. |
fefa06f9 | 84 | |
17e12ff9 | 85 | %description dll -l pl.UTF-8 |
33cdbcdc | 86 | Biblioteka DLL libvorbis dla Windows. |
fefa06f9 | 87 | |
88 | %prep | |
89 | %setup -q -n %{realname}-%{version} | |
90 | %patch0 -p1 | |
91 | %patch1 -p1 | |
421f2ff4 | 92 | %{__sed} -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/g' configure.ac |
fefa06f9 | 93 | |
94 | %build | |
b6359ee7 | 95 | export PKG_CONFIG_LIBDIR=%{_prefix}/lib/pkgconfig |
33cdbcdc | 96 | %{__libtoolize} |
40f03a91 | 97 | %{__aclocal} -I m4 |
33cdbcdc JB |
98 | %{__autoconf} |
99 | %{__autoheader} | |
100 | %{__automake} | |
fefa06f9 | 101 | %configure \ |
33cdbcdc JB |
102 | OBJDUMP=%{target}-objdump \ |
103 | --host=%{target} \ | |
fefa06f9 | 104 | --target=%{target} |
105 | ||
33cdbcdc | 106 | %{__make} |
fefa06f9 | 107 | |
33cdbcdc JB |
108 | %install |
109 | rm -rf $RPM_BUILD_ROOT | |
fefa06f9 | 110 | |
33cdbcdc JB |
111 | %{__make} install \ |
112 | DESTDIR=$RPM_BUILD_ROOT | |
fefa06f9 | 113 | |
33cdbcdc JB |
114 | install -d $RPM_BUILD_ROOT%{_dlldir} |
115 | mv -f $RPM_BUILD_ROOT%{_prefix}/bin/*.dll $RPM_BUILD_ROOT%{_dlldir} | |
fefa06f9 | 116 | |
117 | %if 0%{!?debug:1} | |
33cdbcdc JB |
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 | |
fefa06f9 | 120 | %endif |
121 | ||
40f03a91 | 122 | %{__rm} -r $RPM_BUILD_ROOT%{_datadir}/{aclocal,doc} |
fefa06f9 | 123 | |
124 | %clean | |
125 | rm -rf $RPM_BUILD_ROOT | |
126 | ||
127 | %files | |
128 | %defattr(644,root,root,755) | |
33cdbcdc JB |
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 | |
fefa06f9 | 146 | |
147 | %files dll | |
148 | %defattr(644,root,root,755) | |
33cdbcdc JB |
149 | %{_dlldir}/libvorbis-*.dll |
150 | %{_dlldir}/libvorbisenc-*.dll | |
151 | %{_dlldir}/libvorbisfile-*.dll |