-DESCRIPTION = "SVI"
+DESCRIPTION = "Feedback library"
HOMEPAGE = "http://nohomepage.org"
SECTION = "System/Libraries"
LICENSE = "Apache"
PROVIDES = ""
PACKAGES = ""
-PACKAGES += "libsvi"
+PACKAGES += "libfeedback-devel"
+PACKAGES += "svi-data"
+PACKAGES += "libfeedback"
PACKAGES += "libsvi-devel"
+PACKAGES += "libsvi"
-libsvi_files = ""
-libsvi_files += "/usr/bin/svi_test"
-libsvi_files += "/usr/lib/libsvi.so.*"
+libfeedback-devel_files = ""
+libfeedback-devel_files += "libfeedback.manifest"
+libfeedback-devel_files += "/usr/include/feedback/*.h"
+libfeedback-devel_files += "/usr/lib/libfeedback.so"
+libfeedback-devel_files += "/usr/lib/pkgconfig/feedback.pc"
+
+svi-data_files = ""
+svi-data_files += "libfeedback.manifest"
+svi-data_files += "/usr/share/svi/*"
+svi-data_files += "/opt/share/svi/sound/touch"
+svi-data_files += "/opt/share/svi/sound/operation"
+svi-data_files += "/opt/share/svi/haptic/default"
+svi-data_files += "/opt/share/svi/haptic/touch"
+
+libfeedback_files = ""
+libfeedback_files += "libfeedback.manifest"
+libfeedback_files += "/usr/lib/libfeedback.so.*"
libsvi-devel_files = ""
+libsvi-devel_files += "libfeedback.manifest"
libsvi-devel_files += "/usr/include/svi/*.h"
libsvi-devel_files += "/usr/lib/libsvi.so"
libsvi-devel_files += "/usr/lib/pkgconfig/svi.pc"
-FILES_${PN} = "${libsvi_files}"
-FILES_${PN}-devel = "${libsvi-devel_files}"
+libsvi_files = ""
+libsvi_files += "libfeedback.manifest"
+libsvi_files += "/usr/lib/libsvi.so.*"
+
+FILES_${PN}-devel = "${libfeedback-devel_files}"
+FILES_svi-data = "${svi-data_files}"
+FILES_${PN} = "${libfeedback_files}"
+FILES_libsvi-devel = "${libsvi-devel_files}"
+FILES_libsvi = "${libsvi_files}"
SRC_URI = ""
-Name: libsvi
-Summary: SVI
-Version: 0.1.2
-Release: 8
+Name: libfeedback
+Summary: Feedback library
+Version: 0.1.3
+Release: 0
Group: System/Libraries
License: Apache License, Version 2.0
Source0: %{name}-%{version}.tar.gz
+Source1: libsvi.manifest
+source2: libfeedback.manifest
+source3: svi-data-sdk.manifest
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
BuildRequires: cmake
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(vconf)
-BuildRequires: pkgconfig(devman_haptic)
BuildRequires: pkgconfig(mm-keysound)
-BuildRequires: pkgconfig(devman)
+BuildRequires: pkgconfig(haptic)
+BuildRequires: pkgconfig(libxml-2.0)
+BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(capi-base-common)
%description
+Feedback library for playing sound, vibration and led
-%package devel
-Summary: SVI
+
+%package -n libfeedback-devel
+Summary: Feedback library for (devel)
Group: Development/Libraries
-Requires: %{name} = %{version}-%{release}
+Requires: libfeedback = %{version}-%{release}
+
+%description -n libfeedback-devel
+Feedback library for playing sound, vibration and led (devel)
+
+%package -n libsvi
+Summary: SVI library
+Group: Development/Libraries
+Requires: libfeedback = %{version}-%{release}
+
+%description -n libsvi
+SVI library
+
+%package -n libsvi-devel
+Summary: SVI library for (devel)
+Group: Development/Libraries
+Requires: libsvi = %{version}-%{release}
+
+%description -n libsvi-devel
+SVI library (devel)
+
+%package -n svi-data
+Summary: svi resource package
+Group: Development/Libraries
+
+%description -n svi-data
+svi resource package
-%description devel
%prep
%setup -q
%build
-cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix}
+cp %{SOURCE1} .
+cp %{SOURCE2} .
+cp %{SOURCE3} .
+%cmake .
make
%install
rm -rf %{buildroot}
%make_install
+mkdir -p %{buildroot}/opt/share/svi/sound/touch
+mkdir -p %{buildroot}/opt/share/svi/sound/operation
+mkdir -p %{buildroot}/opt/share/svi/haptic/default
+mkdir -p %{buildroot}/opt/share/svi/haptic/touch
+
%post -p /sbin/ldconfig
+%post -n libsvi -p /sbin/ldconfig
+
+%postun -n libsvi -p /sbin/ldconfig
+
+%post -n svi-data
+ln -s %{_datadir}/svi/sound/touch/key0.wav /opt/share/svi/sound/touch
+ln -s %{_datadir}/svi/sound/touch/key1.wav /opt/share/svi/sound/touch
+ln -s %{_datadir}/svi/sound/touch/key2.wav /opt/share/svi/sound/touch
+ln -s %{_datadir}/svi/sound/touch/key3.wav /opt/share/svi/sound/touch
+ln -s %{_datadir}/svi/sound/touch/key4.wav /opt/share/svi/sound/touch
+ln -s %{_datadir}/svi/sound/touch/key5.wav /opt/share/svi/sound/touch
+ln -s %{_datadir}/svi/sound/touch/key6.wav /opt/share/svi/sound/touch
+ln -s %{_datadir}/svi/sound/touch/key7.wav /opt/share/svi/sound/touch
+ln -s %{_datadir}/svi/sound/touch/key8.wav /opt/share/svi/sound/touch
+ln -s %{_datadir}/svi/sound/touch/key9.wav /opt/share/svi/sound/touch
+ln -s %{_datadir}/svi/sound/touch/keyasterisk.wav /opt/share/svi/sound/touch
+ln -s %{_datadir}/svi/sound/touch/keysharp.wav /opt/share/svi/sound/touch
+ln -s %{_datadir}/svi/sound/touch/sip.wav /opt/share/svi/sound/touch
+ln -s %{_datadir}/svi/sound/touch/sip_backspace.wav /opt/share/svi/sound/touch
+ln -s %{_datadir}/svi/sound/touch/touch.wav /opt/share/svi/sound/touch
+ln -s %{_datadir}/svi/sound/operation/call_connect.wav /opt/share/svi/sound/operation
+ln -s %{_datadir}/svi/sound/operation/call_disconnect.wav /opt/share/svi/sound/operation
+ln -s %{_datadir}/svi/sound/operation/charger_connection.wav /opt/share/svi/sound/operation
+ln -s %{_datadir}/svi/sound/operation/fully_charged.wav /opt/share/svi/sound/operation
+ln -s %{_datadir}/svi/sound/operation/list_reorder.wav /opt/share/svi/sound/operation
+ln -s %{_datadir}/svi/sound/operation/lock.wav /opt/share/svi/sound/operation
+ln -s %{_datadir}/svi/sound/operation/low_battery.wav /opt/share/svi/sound/operation
+ln -s %{_datadir}/svi/sound/operation/minute_minder.wav /opt/share/svi/sound/operation
+ln -s %{_datadir}/svi/sound/operation/power_on.wav /opt/share/svi/sound/operation
+ln -s %{_datadir}/svi/sound/operation/shutter.wav /opt/share/svi/sound/operation
+ln -s %{_datadir}/svi/sound/operation/slider_sweep.wav /opt/share/svi/sound/operation
+ln -s %{_datadir}/svi/sound/operation/unlock.wav /opt/share/svi/sound/operation
+ln -s %{_datadir}/svi/sound/operation/volume_control.wav /opt/share/svi/sound/operation
+ln -s %{_datadir}/svi/haptic/default/Basic_call.tht /opt/share/svi/haptic/default
+ln -s %{_datadir}/svi/haptic/touch/touch.tht /opt/share/svi/haptic/touch
+
%postun -p /sbin/ldconfig
+%postun -n svi-data
+rm -rf %{_datadir}/svi/
+rm -rf /opt/share/svi/
+
%files
+%manifest %{name}.manifest
%defattr(-,root,root,-)
-%{_bindir}/svi_test
-%{_libdir}/libsvi.so.*
+%{_libdir}/libfeedback.so.*
-%files devel
+%files -n libfeedback-devel
+%manifest %{name}.manifest
%defattr(-,root,root,-)
+%{_includedir}/feedback/*.h
+%{_libdir}/libfeedback.so
+%{_libdir}/pkgconfig/feedback.pc
+
+%files -n libsvi
+%manifest %{name}.manifest
+%defattr(-,root,root,-)
+%{_libdir}/libsvi.so.*
+
+%files -n libsvi-devel
+%manifest %{name}.manifest
+%defattr(-,root,root-)
%{_includedir}/svi/*.h
%{_libdir}/libsvi.so
%{_libdir}/pkgconfig/svi.pc
-%changelog
-* Thu Sep 06 2012 - Jiyoung Yun <jy910.yun@samsung.com>
-- if there isnt' haptic resource, it plays monotone
-- Tag : libsvi_0.1.2-8
-
-* Mon Aug 20 2012 - Jiyoung Yun <jy910.yun@samsung.com>
-- Re-uploaded because prev commit is not supply on tizen_build project
-- Tag : libsvi_0.1.2-7
-
-* Fri Aug 17 2012 - Jiyoung Yun <jy910.yun@samsung.com>
-- separate 2.0_beta branch from master
-- Remove code regarding led notification that is product feature
-- Tag : libsvi_0.1.2-6
-
-* Tue Aug 14 2012 - Jiyoung Yun <jy910.yun@samsung.com>
-- led bug fix
-- svi_play_led function is called twice
-- Tag : libsvi_0.1.2-5
-
-* Tue Aug 14 2012 - Jiyoung Yun <jy910.yun@samsung.com>
-- Code merge from old git
-- Tag : libsvi_0.1.2-4
-
-* Mon Aug 06 2012 - Jiyoung Yun <jy910.yun@samsung.com>
-- Add new code for support LED notification
-- Add svi-led.c file to convert ivt to led file
-- Change SVI_VIB_OPERATION_FULLYCHARGED to SVI_VIB_OPERATION_FULLCHARGED enum value
-- Tag : libsvi_0.1.2-3
-
-* Fri Aug 03 2012 - Jiyoung Yun <jy910.yun@samsung.com>
-- Change SVI_VIB_OPERATION_LOTBATT to SVI_VIB_OPERATION_LOWBATT value
-- Tag : libsvi_0.1.2-2
-
-* Fri Jul 13 2012 - Hyungdeuk Kim <hd3.kim@samsung.com>
-- Add 2 new enum type defined by ux 0627 document
-- remove temp code for error handling
+%files -n svi-data
+%manifest %{name}.manifest
+%defattr(644,root,root,-)
+%{_datadir}/svi/*
+%defattr(666,app,app,-)
+%dir /opt/share/svi/sound/touch
+%dir /opt/share/svi/sound/operation
+%dir /opt/share/svi/haptic/default
+%dir /opt/share/svi/haptic/touch