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