Merge tag 'upstream/1.2.0' into tizen_base
[platform/upstream/libsndfile.git] / packaging / libsndfile.spec
1 %define __spec_check_pre exit 0
2 Name:           libsndfile
3 Version:        1.2.0
4 Release:        0
5 License:        LGPL-2.1+
6 Summary:        C library for reading and writing sound files
7 Group:          Multimedia/Audio
8 BuildRequires:  gcc-c++
9 BuildRequires:  libtool
10 BuildRequires:  python
11 BuildRequires:  pkg-config
12 BuildRequires:  autogen
13 BuildRequires:  pkgconfig(ogg)
14 BuildRequires:  pkgconfig(vorbis)
15 BuildRequires:  pkgconfig(opus)
16 Requires:       opus
17 Url:            https://github.com/libsndfile/libsndfile
18 Source:         libsndfile-%{version}.tar.gz
19 Source1001:     libsndfile.manifest
20
21 %description
22 Libsndfile is a C library for reading and writing sound files, such as
23 AIFF, AU, and WAV files, through one standard interface.  It can
24 currently read and write 8, 16, 24, and 32-bit PCM files as well as
25 32-bit floating point WAV files and a number of compressed formats.
26
27
28 %package devel
29 Summary:        Development package for the libsndfile library
30 Group:          Development/Libraries
31 Requires:       %{name} = %{version}
32 Requires:       glibc-devel
33 Requires:       libstdc++-devel
34
35 %description devel
36 This package contains the files needed to compile programs that use the
37 libsndfile library.
38
39 %prep
40 %setup -q
41 cp %{SOURCE1001} .
42
43 %build
44 %define warn_flags -W -Wall -Wstrict-prototypes -Wpointer-arith -Wno-unused-parameter
45 autoreconf --force --install
46 CFLAGS="%{optflags} %{warn_flags} -D__TIZEN__"
47 export CFLAGS
48 LDFLAGS="-ldl"
49 export LDFLAGS
50 %configure --disable-static \
51     --disable-dependency-tracking \
52     --disable-sqlite --disable-alsa
53 make %{?_smp_mflags}
54
55 %check
56 pushd src
57 make check
58 popd
59
60 %install
61
62 %make_install
63 # remove programs; built in another spec file
64 rm -rf %{buildroot}%{_bindir}
65 rm -rf %{buildroot}%{_mandir}/man1
66 # remove binaries from examples directory
67 rm -rf %{buildroot}%{_datadir}/doc/libsndfile
68
69 %post  -p /sbin/ldconfig
70
71 %postun  -p /sbin/ldconfig
72
73 %files
74 %manifest %{name}.manifest
75 %defattr(-, root, root)
76 %license COPYING
77 %{_libdir}/libsndfile.so.1*
78
79 %files devel
80 %manifest %{name}.manifest
81 %defattr(-, root, root)
82 %{_libdir}/libsndfile.so
83 %{_includedir}/sndfile.h
84 %{_includedir}/sndfile.hh
85 %{_libdir}/pkgconfig/*.pc
86
87 %changelog