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