6987d570ea18e6ffbd7692518b5800dc0823070d
[platform/core/multimedia/libmm-sound.git] / packaging / libmm-sound.spec
1 Name:       libmm-sound
2 Summary:    MMSound Package contains client lib and sound_server binary
3 Version:    0.12.11
4 Release:    0
5 Group:      System/Libraries
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Source2:    sound-server.service
9 Source3:    sound-server.conf
10 Source4:    focus-server.service
11 Source5:    focus-server.path
12 Source6:    focus-server.conf
13 Requires: security-config
14 %if "%{?TIZEN_PRODUCT_TV}" == "1"
15 Source7:    libmm-sound.notstrip
16 Source8:    focus-server-tv.service
17 %endif
18 Source9:    org.tizen.SoundServer.service
19 Requires(post): /sbin/ldconfig
20 Requires(postun): /sbin/ldconfig
21 BuildRequires: pkgconfig(mm-common)
22 BuildRequires: pkgconfig(mm-session)
23 BuildRequires: pkgconfig(glib-2.0)
24 BuildRequires: pkgconfig(gio-2.0)
25 BuildRequires: pkgconfig(vconf)
26 BuildRequires: pkgconfig(libpulse)
27 BuildRequires: pkgconfig(sndfile)
28 %if "%{?TIZEN_PRODUCT_TV}" == "1"
29 BuildRequires: pkgconfig(lwipc)
30 %endif
31 %ifarch %{arm}
32 %endif
33
34 %description
35 MMSound Package contains client lib and sound_server binary for sound system
36
37
38 %package devel
39 Summary: MMSound development package
40 Group:      Development/Libraries
41 Requires:   %{name} = %{version}-%{release}
42
43 %description devel
44 MMSound development package for sound system
45
46 %package sdk-devel
47 Summary: MMSound development package
48 Group:      Development/Libraries
49 Requires:   %{name}-devel = %{version}-%{release}
50
51 %description sdk-devel
52 MMSound development package for sound system
53
54 %package tool
55 Summary: MMSound utility package - contians mm_sound_testsuite, sound_check
56 Group:      TO_BE/FILLED_IN
57 Requires:   %{name} = %{version}-%{release}
58
59 %description tool
60 MMSound utility package - contians mm_sound_testsuite, sound_check for sound system
61
62 %prep
63 %setup -q
64
65 %build
66
67 CFLAGS="%{optflags} -fvisibility=hidden -D_TIZEN_PUBLIC_ -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\"" ;export CFLAGS
68
69 %if "%{?TIZEN_PRODUCT_TV}" == "1"
70         CFLAGS+=" -DTIZEN_TV";export CFLAGS
71 %endif
72
73 ./autogen.sh
74 %configure \
75        --with-plugindir=%{_libdir}/soundplugins \
76 %if "%{?TIZEN_PRODUCT_TV}" == "1"
77        --enable-prelink \
78        --enable-lwipc \
79 %endif
80         --prefix=/usr --enable-pulse --enable-focus
81
82 make %{?_smp_mflags}
83
84 %install
85 rm -rf %{buildroot}
86 mkdir -p %{buildroot}/etc/dbus-1/system.d/
87 cp %{SOURCE3} %{buildroot}/etc/dbus-1/system.d/sound-server.conf
88 cp %{SOURCE6} %{buildroot}/etc/dbus-1/system.d/focus-server.conf
89 %if "%{?TIZEN_PRODUCT_TV}" == "1"
90 cp %{SOURCE8} %{SOURCE4}
91 %endif
92 mkdir -p %{buildroot}/usr/share/dbus-1/system-services/
93 cp %{SOURCE9} %{buildroot}/usr/share/dbus-1/system-services/org.tizen.SoundServer.service
94
95 %make_install
96 %if "%{?TIZEN_PRODUCT_TV}" == "1"
97 mkdir -p %{buildroot}%{_sysconfdir}/notstrip
98 install -m0644 %{SOURCE7} %{buildroot}%{_sysconfdir}/notstrip/libmm-sound.notstrip
99 install -d %{buildroot}%{_unitdir}/sysinit.target.wants
100 %else
101 install -d %{buildroot}%{_unitdir}/multi-user.target.wants
102 %endif
103 install -m0644 %{SOURCE2} %{buildroot}%{_unitdir}/
104 install -m0644 %{SOURCE4} %{buildroot}%{_unitdir}/
105 install -m0644 %{SOURCE5} %{buildroot}%{_unitdir}/
106 %if "%{?TIZEN_PRODUCT_TV}" == "1"
107 ln -sf ../focus-server.path %{buildroot}%{_unitdir}/sysinit.target.wants/focus-server.path
108 %else
109 ln -sf ../focus-server.path %{buildroot}%{_unitdir}/multi-user.target.wants/focus-server.path
110 %endif
111 %post
112 /sbin/ldconfig
113
114 %postun -p /sbin/ldconfig
115
116
117 %files
118 %manifest libmm-sound.manifest
119 %defattr(-,root,root,-)
120 %{_bindir}/focus_server
121 %{_bindir}/sound_server
122 %{_libdir}/libmmfsound.so.*
123 %{_libdir}/libmmfsoundcommon.so.*
124 %{_libdir}/libmmfkeysound.so.*
125 %{_libdir}/libmmfbootsound.so.*
126 %{_libdir}/soundplugins/libsoundplugintone.so
127 %{_libdir}/soundplugins/libsoundpluginwave.so
128 %if 0%{?tizen_audio_feature_ogg_enable}
129 %{_libdir}/soundplugins/libsoundplugintremoloogg.so
130 %endif
131 %if "%{?TIZEN_PRODUCT_TV}" == "1"
132 %{_sysconfdir}/notstrip/libmm-sound.notstrip
133 %{_unitdir}/sysinit.target.wants/focus-server.path
134 %else
135 %{_unitdir}/multi-user.target.wants/focus-server.path
136 %endif
137 %{_unitdir}/focus-server.service
138 %{_unitdir}/focus-server.path
139 /usr/share/sounds/sound-server/*
140 %license LICENSE.APLv2
141 /etc/dbus-1/system.d/sound-server.conf
142 /etc/dbus-1/system.d/focus-server.conf
143 %{_datadir}/dbus-1/system-services/org.tizen.SoundServer.service
144 %{_unitdir}/sound-server.service
145
146 %files devel
147 %defattr(-,root,root,-)
148 %{_libdir}/libmmfkeysound.so
149 %{_libdir}/libmmfbootsound.so
150 %{_libdir}/libmmfsound.so
151 %{_libdir}/libmmfsoundcommon.so
152 %{_includedir}/mmf/mm_sound_private.h
153 %exclude %{_includedir}/mmf/mm_sound_pa_client.h
154
155 %files sdk-devel
156 %defattr(-,root,root,-)
157 %{_includedir}/mmf/mm_sound.h
158 %{_includedir}/mmf/mm_sound_focus.h
159 %{_includedir}/mmf/mm_sound_device.h
160 %exclude %{_includedir}/mmf/mm_sound_focus_socket.h
161 %exclude %{_includedir}/mmf/mm_sound_pa_client.h
162 %{_libdir}/pkgconfig/mm-keysound.pc
163 %{_libdir}/pkgconfig/mm-bootsound.pc
164 %{_libdir}/pkgconfig/mm-sound.pc
165
166 %files tool
167 %manifest libmm-sound-tool.manifest
168 %defattr(-,root,root,-)
169 %{_bindir}/mm_sound_testsuite
170 %license LICENSE.APLv2