copy license file to /usr/share/license/
[platform/core/system/libsvi.git] / packaging / libfeedback.spec
1 Name:       libfeedback
2 Summary:    Feedback library
3 Version:    0.1.3
4 Release:    0
5 Group:      System/Libraries
6 License:    Apache License, Version 2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Source1:        libsvi.manifest
9 source2:        libfeedback.manifest
10 source3:        svi-data-sdk.manifest
11 Requires(post): /sbin/ldconfig
12 Requires(postun): /sbin/ldconfig
13 BuildRequires:  cmake
14 BuildRequires:  pkgconfig(dlog)
15 BuildRequires:  pkgconfig(vconf)
16 BuildRequires:  pkgconfig(mm-keysound)
17 BuildRequires:  pkgconfig(haptic)
18 BuildRequires:  pkgconfig(libxml-2.0)
19 BuildRequires:  pkgconfig(glib-2.0)
20 BuildRequires:  pkgconfig(capi-base-common)
21
22 %description
23 Feedback library for playing sound, vibration and led
24
25
26 %package -n libfeedback-devel
27 Summary:    Feedback library for (devel)
28 Group:      Development/Libraries
29 Requires:   libfeedback = %{version}-%{release}
30
31 %description -n libfeedback-devel
32 Feedback library for playing sound, vibration and led (devel)
33
34 %package -n libsvi
35 Summary:        SVI library
36 Group:          Development/Libraries
37 Requires:       libfeedback = %{version}-%{release}
38
39 %description -n libsvi
40 SVI library
41
42 %package -n libsvi-devel
43 Summary:        SVI library for (devel)
44 Group:          Development/Libraries
45 Requires:       libsvi = %{version}-%{release}
46
47 %description -n libsvi-devel
48 SVI library (devel)
49
50 %package -n svi-data
51 Summary:        svi resource package
52 Group:          Development/Libraries
53
54 %description -n svi-data
55 svi resource package
56
57
58 %prep
59 %setup -q 
60
61 %build
62 cp %{SOURCE1} .
63 cp %{SOURCE2} .
64 cp %{SOURCE3} .
65 %cmake .
66 make
67
68 %install
69 rm -rf %{buildroot}
70 %make_install
71
72 mkdir -p %{buildroot}/opt/share/svi/sound/touch
73 mkdir -p %{buildroot}/opt/share/svi/sound/operation
74 mkdir -p %{buildroot}/opt/share/svi/haptic/default
75 mkdir -p %{buildroot}/opt/share/svi/haptic/touch
76
77 mkdir -p %{buildroot}%{_datadir}/license
78 cp LICENSE.APLv2 %{buildroot}%{_datadir}/license/%{name}
79
80 %post -p /sbin/ldconfig
81
82 %post -n libsvi -p /sbin/ldconfig
83
84 %postun -n libsvi -p /sbin/ldconfig
85
86 %post -n svi-data
87 ln -s %{_datadir}/svi/sound/touch/key0.wav            /opt/share/svi/sound/touch
88 ln -s %{_datadir}/svi/sound/touch/key1.wav            /opt/share/svi/sound/touch
89 ln -s %{_datadir}/svi/sound/touch/key2.wav            /opt/share/svi/sound/touch
90 ln -s %{_datadir}/svi/sound/touch/key3.wav            /opt/share/svi/sound/touch
91 ln -s %{_datadir}/svi/sound/touch/key4.wav            /opt/share/svi/sound/touch
92 ln -s %{_datadir}/svi/sound/touch/key5.wav            /opt/share/svi/sound/touch
93 ln -s %{_datadir}/svi/sound/touch/key6.wav            /opt/share/svi/sound/touch
94 ln -s %{_datadir}/svi/sound/touch/key7.wav            /opt/share/svi/sound/touch
95 ln -s %{_datadir}/svi/sound/touch/key8.wav            /opt/share/svi/sound/touch
96 ln -s %{_datadir}/svi/sound/touch/key9.wav            /opt/share/svi/sound/touch
97 ln -s %{_datadir}/svi/sound/touch/keyasterisk.wav     /opt/share/svi/sound/touch
98 ln -s %{_datadir}/svi/sound/touch/keysharp.wav        /opt/share/svi/sound/touch
99 ln -s %{_datadir}/svi/sound/touch/sip.wav             /opt/share/svi/sound/touch
100 ln -s %{_datadir}/svi/sound/touch/sip_backspace.wav   /opt/share/svi/sound/touch
101 ln -s %{_datadir}/svi/sound/touch/touch.wav           /opt/share/svi/sound/touch
102 ln -s %{_datadir}/svi/sound/operation/call_connect.wav         /opt/share/svi/sound/operation
103 ln -s %{_datadir}/svi/sound/operation/call_disconnect.wav      /opt/share/svi/sound/operation
104 ln -s %{_datadir}/svi/sound/operation/charger_connection.wav   /opt/share/svi/sound/operation
105 ln -s %{_datadir}/svi/sound/operation/fully_charged.wav        /opt/share/svi/sound/operation
106 ln -s %{_datadir}/svi/sound/operation/list_reorder.wav         /opt/share/svi/sound/operation
107 ln -s %{_datadir}/svi/sound/operation/lock.wav                 /opt/share/svi/sound/operation
108 ln -s %{_datadir}/svi/sound/operation/low_battery.wav          /opt/share/svi/sound/operation
109 ln -s %{_datadir}/svi/sound/operation/minute_minder.wav        /opt/share/svi/sound/operation
110 ln -s %{_datadir}/svi/sound/operation/power_on.wav             /opt/share/svi/sound/operation
111 ln -s %{_datadir}/svi/sound/operation/shutter.wav              /opt/share/svi/sound/operation
112 ln -s %{_datadir}/svi/sound/operation/slider_sweep.wav         /opt/share/svi/sound/operation
113 ln -s %{_datadir}/svi/sound/operation/unlock.wav               /opt/share/svi/sound/operation
114 ln -s %{_datadir}/svi/sound/operation/volume_control.wav       /opt/share/svi/sound/operation
115 ln -s %{_datadir}/svi/haptic/default/Basic_call.tht             /opt/share/svi/haptic/default
116 ln -s %{_datadir}/svi/haptic/touch/touch.tht                    /opt/share/svi/haptic/touch
117
118 %postun -p /sbin/ldconfig
119
120 %postun -n svi-data
121 rm -rf %{_datadir}/svi/
122 rm -rf /opt/share/svi/
123
124 %files
125 %manifest %{name}.manifest
126 %defattr(-,root,root,-)
127 %{_libdir}/libfeedback.so.*
128 %{_datadir}/license/%{name}
129
130 %files -n libfeedback-devel
131 %manifest %{name}.manifest
132 %defattr(-,root,root,-)
133 %{_includedir}/feedback/*.h
134 %{_libdir}/libfeedback.so
135 %{_libdir}/pkgconfig/feedback.pc
136
137 %files -n libsvi
138 %manifest %{name}.manifest
139 %defattr(-,root,root,-)
140 %{_libdir}/libsvi.so.*
141
142 %files -n libsvi-devel
143 %manifest %{name}.manifest
144 %defattr(-,root,root-)
145 %{_includedir}/svi/*.h
146 %{_libdir}/libsvi.so
147 %{_libdir}/pkgconfig/svi.pc
148
149 %files -n svi-data
150 %manifest %{name}.manifest
151 %defattr(644,root,root,-)
152 %{_datadir}/svi/*
153 %defattr(666,app,app,-)
154 %dir /opt/share/svi/sound/touch
155 %dir /opt/share/svi/sound/operation
156 %dir /opt/share/svi/haptic/default
157 %dir /opt/share/svi/haptic/touch