add packaging
[platform/upstream/libtheora.git] / packaging / libtheora.spec
1 Name:           libtheora
2 Version:        1.1.1
3 Release:        14
4 License:        BSD-3-Clause
5 Summary:        Free Video Codec
6 Url:            http://www.theora.org/
7 Group:          Productivity/Multimedia/Other
8 %define pkg_version %{version}
9 Source:         %{name}-%{version}.tar.bz2
10 Source2:        baselibs.conf
11 BuildRequires:  gcc-c++
12 BuildRequires:  libogg-devel
13 BuildRequires:  libtool
14 BuildRequires:  libvorbis-devel
15 BuildRequires:  pkg-config
16 BuildRequires:  python
17
18 %description
19 Theora is a free video codec based on VP3. The package contains the
20 library that can decode and encode Theora streams. Theora is also able
21 to playback VP3 streams.
22
23 %package devel
24 License:        BSD-3-Clause
25 Summary:        Free Video Codec
26 Group:          Development/Libraries/C and C++
27 Requires:       libogg-devel
28 Requires:       libtheora = %{version}
29
30 %description devel
31 Theora is a free video codec based on VP3. The package contains the
32 library that can decode and encode Theora streams. Theora is also able
33 to playback VP3 streams.
34
35 %prep
36 %setup -q -n %{name}-%{pkg_version}
37
38 %build
39 ACLOCAL="aclocal -I m4" autoreconf -f -i
40 %configure --disable-examples \
41     --disable-static \
42     --with-pic
43 make %{?_smp_mflags} docdir=%{_docdir}/%{name}
44
45 %check
46 make check
47
48 %install
49 %make_install
50 install -d %{buildroot}%{_bindir}
51
52 rm -rf %{buildroot}/%{_datadir}/doc/%{name}-%{version}/*
53
54 %post  -p /sbin/ldconfig
55
56 %postun  -p /sbin/ldconfig
57
58 %files
59 %defattr(-,root,root)
60 %{_libdir}/libtheora.so.0*
61 %{_libdir}/libtheoradec.so.1*
62 %{_libdir}/libtheoraenc.so.1*
63
64 %files devel
65 %defattr(-,root,root)
66 %doc COPYING LICENSE
67 %{_includedir}/theora
68 %{_libdir}/*.so
69 %{_libdir}/pkgconfig/theoradec.pc
70 %{_libdir}/pkgconfig/theoraenc.pc
71 %{_libdir}/pkgconfig/theora.pc