Clean spec file for Yocto compatibility
[profile/ivi/genivi/genivi-audio-manager.git] / packaging / genivi-audio-manager.spec
1 Name:             genivi-audio-manager
2 License:          MPL-2.0
3 Group:            Automotive/API
4 Summary:          GENIVI Audio Manager
5 Version:          6.0
6 Release:          0
7 Source:           %{name}-%{version}.tar.bz2
8 BuildRequires:    cmake
9 BuildRequires:    pkgconfig(libsystemd-journal)
10 BuildRequires:    pkgconfig(python)
11 BuildRequires:    pkgconfig(sqlite3)
12 BuildRequires:    pkgconfig(dbus-1)
13 BuildRequires:    pkgconfig(automotive-dlt)
14 BuildRequires:    pkgconfig(zlib)
15 BuildRequires:    pkgconfig(CommonAPI)
16 BuildRequires:    pkgconfig(CommonAPI-DBus)
17 Requires(post):   /sbin/ldconfig
18 Requires(postun): /sbin/ldconfig
19
20 %description
21 The AudioManager is a framework for managing audio in the IVI context.
22
23 %package devel
24 Summary:    Development files for %{name}
25 Group:      Development/Libraries
26 Requires:   %{name} = %{version}-%{release}
27
28 %description devel
29 %{summary}. This package provides headers for developing AudioManager plugins and applications.
30
31 %prep
32 %setup -q -n %{name}-%{version}
33
34 %build
35 mkdir -p build
36 cd build
37
38 cmake -DUSE_BUILD_LIBS=OFF -DWITH_TESTS=OFF -DWITH_ENABLED_IPC=DBUS -DWITH_DBUS_WRAPPER=ON -DWITH_NSM=OFF -DCMAKE_INSTALL_PREFIX=/usr ..
39 #make VERBOSE=1
40 %__make %{?_smp_mflags}
41
42 %install
43 rm -rf "$RPM_BUILD_ROOT"
44 cd build
45 %make_install DESTDIR=$RPM_BUILD_ROOT
46 mkdir $RPM_BUILD_ROOT%{_includedir}/%{name}
47 mv $RPM_BUILD_ROOT%{_includedir}/*.h $RPM_BUILD_ROOT%{_includedir}/command $RPM_BUILD_ROOT%{_includedir}/control $RPM_BUILD_ROOT%{_includedir}/routing $RPM_BUILD_ROOT%{_includedir}/shared $RPM_BUILD_ROOT%{_includedir}/%{name}
48 rm $RPM_BUILD_ROOT%{_libdir}/audioManager/routing/libPluginRoutingInterfaceAsync.so*
49
50 %files
51 %doc LICENCE README.html
52 %{_bindir}/AudioManager
53 %{_libdir}/audioManager/command/libPluginCommandInterfaceDbus.so*
54 %{_libdir}/audioManager/routing/libPluginRoutingInterfaceDbus.so*
55 %{_libdir}/audioManager/control/libPluginControlInterface.so*
56 %{_libdir}/audioManager/control/libPluginControlInterfaceDbus.so*
57 %{_datadir}/audiomanager/*xml
58
59 %files devel
60 %{_includedir}/%{name}/*