- release 5 (C++ rebuild)
[packages/flac.git] / flac.spec
1 #
2 # Conditional build:
3 %bcond_without  static_libs     # don't build static library
4 %bcond_without  xmms            # don't build XMMS plugin
5
6 Summary:        Free Lossless Audio Codec
7 Summary(pl.UTF-8):      Free Lossless Audio Codec - Wolnodostępny bezstratny kodek audio
8 Name:           flac
9 Version:        1.3.1
10 Release:        5
11 License:        BSD (libFLAC/libFLAC++), GPL v2+ (programs and plugins)
12 Group:          Libraries
13 Source0:        http://downloads.xiph.org/releases/flac/%{name}-%{version}.tar.xz
14 # Source0-md5:  b9922c9a0378c88d3e901b234f852698
15 Patch0:         %{name}-opt.patch
16 Patch1:         x32.patch
17 URL:            http://xiph.org/flac/
18 BuildRequires:  autoconf >= 2.60
19 BuildRequires:  automake >= 1:1.11
20 # for AM_ICONV
21 BuildRequires:  gettext-tools
22 BuildRequires:  libogg-devel >= 2:1.0
23 BuildRequires:  libstdc++-devel
24 BuildRequires:  libtool >= 2:2
25 %{?with_xmms:BuildRequires:     rpmbuild(macros) >= 1.125}
26 BuildRequires:  tar >= 1:1.22
27 %{?with_xmms:BuildRequires:     xmms-devel >= 0.9.5.1}
28 BuildRequires:  xz
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
32 FLAC is an Open Source lossless audio codec developed by Josh Coalson.
33
34 %description -l pl.UTF-8
35 FLAC jest bezstratnym kodekiem audio z otwartymi źródłami, rozwijanym
36 przez Josha Coalsona.
37
38 %package devel
39 Summary:        FLAC - development files
40 Summary(pl.UTF-8):      FLAC - pliki nagłówkowe
41 License:        BSD
42 Group:          Development/Libraries
43 Requires:       %{name} = %{version}-%{release}
44 Requires:       libogg-devel >= 2:1.0
45
46 %description devel
47 The package contains the development header files for FLAC libraries.
48
49 %description devel -l pl.UTF-8
50 Ten pakiet zawiera pliki nagłówkowe bibliotek FLAC.
51
52 %package static
53 Summary:        FLAC - static libraries
54 Summary(pl.UTF-8):      FLAC - biblioteki statyczne
55 License:        BSD
56 Group:          Development/Libraries
57 Requires:       %{name}-devel = %{version}-%{release}
58
59 %description static
60 The package contains FLAC static libraries.
61
62 %description static -l pl.UTF-8
63 Ten pakiet zawiera biblioteki statyczne FLAC.
64
65 %package c++
66 Summary:        FLAC++ - C++ API for FLAC codec
67 Summary(pl.UTF-8):      FLAC++ - API C++ do kodeka FLAC
68 Group:          Libraries
69 Requires:       %{name} = %{version}-%{release}
70
71 %description c++
72 FLAC++ - C++ API for FLAC codec.
73
74 %description c++ -l pl.UTF-8
75 FLAC++ - API C++ do kodeka FLAC.
76
77 %package c++-devel
78 Summary:        Header files for FLAC++ library
79 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki FLAC++
80 Group:          Development/Libraries
81 Requires:       %{name}-c++ = %{version}-%{release}
82 Requires:       %{name}-devel = %{version}-%{release}
83 Requires:       libstdc++-devel
84
85 %description c++-devel
86 Header files for FLAC++ library.
87
88 %description c++-devel -l pl.UTF-8
89 Pliki nagłówkowe biblioteki FLAC++.
90
91 %package c++-static
92 Summary:        Static FLAC++ library
93 Summary(pl.UTF-8):      Statyczna biblioteka FLAC++
94 Group:          Development/Libraries
95 Requires:       %{name}-c++-devel = %{version}-%{release}
96
97 %description c++-static
98 Static FLAC++ library.
99
100 %description c++-static -l pl.UTF-8
101 Statyczna biblioteka FLAC++.
102
103 %package -n xmms-input-flac
104 Summary:        Free Lossless Audio Codec - XMMS plugin
105 Summary(pl.UTF-8):      Wtyczka FLAC dla XMMS
106 License:        GPL v2+
107 Group:          Libraries
108 Requires:       %{name} = %{version}-%{release}
109 Requires:       xmms >= 0.9.5.1
110
111 %description -n xmms-input-flac
112 FLAC input plugin for XMMS.
113
114 %description -n xmms-input-flac -l pl.UTF-8
115 Wtyczka dla XMMS umożliwiająca odtwarzanie plików w formacie FLAC.
116
117 %prep
118 %setup -q
119 %patch0 -p1
120 %patch1 -p1
121
122 %{__rm} m4/ogg.m4
123
124 %build
125 %{__libtoolize}
126 %{__aclocal} -I m4
127 %{__autoconf}
128 %{__autoheader}
129 %{__automake}
130 %configure \
131         --disable-silent-rules \
132         %{?with_static_libs:--enable-static} \
133         %{!?with_xmms:--disable-xmms-plugin}
134
135 %{__make}
136
137 rm -rf doc-html
138 cp -a doc/html doc-html
139 # no makefiles in doc dirs
140 find doc-html -name 'Makefile*' | xargs %{__rm}
141
142 %install
143 rm -rf $RPM_BUILD_ROOT
144 %{__make} install \
145         DESTDIR=$RPM_BUILD_ROOT
146
147 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
148
149 %if %{with xmms}
150 %{__rm} $RPM_BUILD_ROOT%{xmms_input_plugindir}/*.la
151 %if %{with static_libs}
152 %{__rm} $RPM_BUILD_ROOT%{xmms_input_plugindir}/*.a
153 %endif
154 %endif
155
156 %clean
157 rm -rf $RPM_BUILD_ROOT
158
159 %post   -p /sbin/ldconfig
160 %postun -p /sbin/ldconfig
161
162 %post   c++ -p /sbin/ldconfig
163 %postun c++ -p /sbin/ldconfig
164
165 %files
166 %defattr(644,root,root,755)
167 %doc AUTHORS COPYING.Xiph README
168 %attr(755,root,root) %{_bindir}/flac
169 %attr(755,root,root) %{_bindir}/metaflac
170 %attr(755,root,root) %{_libdir}/libFLAC.so.*.*.*
171 %attr(755,root,root) %ghost %{_libdir}/libFLAC.so.8
172 %{_mandir}/man1/flac.1*
173 %{_mandir}/man1/metaflac.1*
174
175 %files devel
176 %defattr(644,root,root,755)
177 %doc doc-html/{*.html,images}
178 %attr(755,root,root) %{_libdir}/libFLAC.so
179 %{_libdir}/libFLAC.la
180 %{_includedir}/FLAC
181 %{_pkgconfigdir}/flac.pc
182 %{_aclocaldir}/libFLAC.m4
183
184 %if %{with static_libs}
185 %files static
186 %defattr(644,root,root,755)
187 %{_libdir}/libFLAC.a
188 %endif
189
190 %files c++
191 %defattr(644,root,root,755)
192 %attr(755,root,root) %{_libdir}/libFLAC++.so.*.*.*
193 %attr(755,root,root) %ghost %{_libdir}/libFLAC++.so.6
194
195 %files c++-devel
196 %defattr(644,root,root,755)
197 %attr(755,root,root) %{_libdir}/libFLAC++.so
198 %{_libdir}/libFLAC++.la
199 %{_includedir}/FLAC++
200 %{_pkgconfigdir}/flac++.pc
201 %{_aclocaldir}/libFLAC++.m4
202
203 %if %{with static_libs}
204 %files c++-static
205 %defattr(644,root,root,755)
206 %{_libdir}/libFLAC++.a
207 %endif
208
209 %if %{with xmms}
210 %files -n xmms-input-flac
211 %defattr(644,root,root,755)
212 %attr(755,root,root) %{xmms_input_plugindir}/libxmms-flac.so
213 %endif
This page took 0.088712 seconds and 3 git commands to generate.