aae61822d1a1807eb2e345fd8084f7acfbb67705
[platform/upstream/libvorbis.git] / packaging / libvorbis.spec
1 Name:           libvorbis
2 Version:        1.3.3
3 Release:        0
4 License:        BSD-3-Clause
5 Summary:        The Vorbis General Audio Compression Codec
6 Url:            http://www.vorbis.com/
7 Group:          System/Libraries
8 Source:         %{name}-%{version}.tar.xz
9 Source2:        baselibs.conf
10 BuildRequires:  fdupes
11 BuildRequires:  libogg-devel
12 BuildRequires:  libtool
13 BuildRequires:  pkgconfig
14
15 %description
16 Vorbis is a fully open, nonproprietary, patent-and-royalty-free, and
17 general-purpose compressed audio format for audio and music at fixed
18 and variable bit rates from 16 to 128 kbps/channel.
19
20 The native bitstream format of Vorbis is libogg (Ogg). Alternatively,
21 libmatroska (matroska) can also be used.
22
23
24 %package -n libvorbisenc
25
26 Summary:        The Vorbis General Audio Compression Codec
27 Group:          System/Libraries
28
29 %description -n libvorbisenc
30 Vorbis is a fully open, nonproprietary, patent-and-royalty-free, and
31 general-purpose compressed audio format for audio and music at fixed
32 and variable bit rates from 16 to 128 kbps/channel.
33
34 The native bitstream format of Vorbis is libogg (Ogg). Alternatively,
35 libmatroska (matroska) can also be used.
36
37 %package -n libvorbisfile
38
39 Summary:        The Vorbis General Audio Compression Codec
40 Group:          System/Libraries
41
42 %description -n libvorbisfile
43 Vorbis is a fully open, nonproprietary, patent-and-royalty-free, and
44 general-purpose compressed audio format for audio and music at fixed
45 and variable bit rates from 16 to 128 kbps/channel.
46
47 The native bitstream format of Vorbis is libogg (Ogg). Alternatively,
48 libmatroska (matroska) can also be used.
49
50 %package devel
51 Summary:        Include Files and Libraries mandatory for Ogg Vorbis Development
52 Group:          Development/Libraries/C and C++
53 Requires:       glibc-devel
54 Requires:       libogg-devel
55 Requires:       libvorbis = %{version}
56 Requires:       libvorbisenc = %{version}
57 Requires:       libvorbisfile = %{version}
58
59 %description devel
60 This package contains all necessary include files and libraries needed
61 to compile and develop applications that use libvorbis.
62
63 %package doc
64 Summary:        Documentation of Ogg/Vorbis library
65 Group:          Documentation/Other
66 BuildArch:      noarch
67
68 %description doc
69 This package contains documents for Ogg/Vorbis library, including the
70 API reference.
71
72 %prep
73 %setup -q
74
75 %build
76 # Fix optimization level
77 sed -i s,-O20,-O3,g configure.ac
78
79 autoreconf -fiv
80 %configure --disable-examples --disable-static
81 make %{?_smp_mflags}
82
83 %check
84 make check
85
86 %install
87 %make_install
88 mkdir -p %{buildroot}%{_docdir}/%{name}
89 mv %{buildroot}%{_datadir}/doc/libvorbis-* %{buildroot}%{_docdir}/%{name}
90 install -c -m 0644 doc/Vorbis_I_spec.* %{buildroot}%{_docdir}/%{name}
91 # remove unneeded files
92 find %{buildroot}%{_docdir}/ -empty -delete
93 %fdupes -s %{buildroot}%{_docdir}
94
95
96 %post  -p /sbin/ldconfig
97
98 %postun -p /sbin/ldconfig
99
100 %post -n libvorbisenc -p /sbin/ldconfig
101
102 %postun -n libvorbisenc -p /sbin/ldconfig
103
104 %post -n libvorbisfile -p /sbin/ldconfig
105
106 %postun -n libvorbisfile -p /sbin/ldconfig
107
108 %files 
109 %defattr(0644,root,root,0755)
110 %license COPYING 
111 %{_libdir}/libvorbis.so.0*
112
113 %files -n libvorbisenc
114 %defattr(0644,root,root,0755)
115 %license COPYING 
116 %{_libdir}/libvorbisenc.so.2*
117
118 %files -n libvorbisfile
119 %defattr(0644,root,root,0755)
120 %license COPYING 
121 %{_libdir}/libvorbisfile.so.3*
122
123 %files devel
124 %defattr(-,root,root)
125 %license COPYING 
126 %{_datadir}/aclocal/*.m4
127 %{_includedir}/vorbis
128 %{_libdir}/lib*.so
129 %{_libdir}/pkgconfig/*.pc
130
131 %files doc
132 %defattr(-,root,root)
133 %doc %{_docdir}/%{name}
134
135 %changelog