summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
authorMyungJoo Ham <myungjoo.ham@samsung.com>2016-11-02 16:00:39 +0900
committerMyungJoo Ham <myungjoo.ham@samsung.com>2017-01-16 00:27:35 -0800
commit4fad77614ae6916670b22a1e8dac0d49e87a5d4b (patch)
treeca3ae7d63bb214711896d316fbe8b0ae63884080 /packaging
parent4f99793ddeb8477b58137cbb3986de7ea17a4d89 (diff)
downloadlibsvi-4fad77614ae6916670b22a1e8dac0d49e87a5d4b.tar.gz
libsvi-4fad77614ae6916670b22a1e8dac0d49e87a5d4b.tar.bz2
libsvi-4fad77614ae6916670b22a1e8dac0d49e87a5d4b.zip
[4.0] Remove Profile Build Dependencies
1. This is for Tizen 4.0 2. When this commit is being SR'ed, the maintainer need to create JIRA-TRE issue of: Add libfeedback-profile_common for common profile if libfeedback exists Add libfeedback-profile_mobile for mobile profile if libfeedback exists Add libfeedback-profile_tv for tv profile if libfeedback exists Add libfeedback-profile_wearable for wearable profile if libfeedback exists Add libfeedback-profile_ivi for ivi profile if libfeedback exists Add svi-data-profile_common for common profile if svi-data exists Add svi-data-profile_mobile for mobile profile if svi-data exists Add svi-data-profile_tv for tv profile if svi-data exists Add svi-data-profile_wearable for wearable profile if svi-data exists Add svi-data-profile_ivi for ivi profile if svi-data exists Change-Id: Ib295d3b0e844ab8e4cce07107e46d22a26f24944 Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Diffstat (limited to 'packaging')
-rw-r--r--packaging/libfeedback.spec149
1 files changed, 147 insertions, 2 deletions
diff --git a/packaging/libfeedback.spec b/packaging/libfeedback.spec
index 022e954..102445f 100644
--- a/packaging/libfeedback.spec
+++ b/packaging/libfeedback.spec
@@ -1,3 +1,6 @@
+# Do not provide *.so from per-profile subpackage.
+%global __provides_exclude_from ^.*\\.(mobile|wearable)$
+
Name: libfeedback
Summary: Feedback library
Version: 0.2.0
@@ -19,10 +22,28 @@ BuildRequires: pkgconfig(capi-base-common)
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(libtzplatform-config)
Requires(post): svi-data
+Provides: %{name}-profile_common = %{version}-%{release}
+Provides: %{name}-profile_tv = %{version}-%{release}
+Provides: %{name}-profile_ivi = %{version}-%{release}
%description
Feedback library for playing sound and vibration
+%package profile_mobile
+Summary: Feedback library mod for mobile profile
+Requires: %{name} = %{version}-%{release}
+Conflicts: %{name}-profile_wearable
+%description profile_mobile
+Feedback library mod for mobile profile that replaces .so.* files.
+This overwrites .so.* files of %{name}.
+
+%package profile_wearable
+Summary: Feedback library mod for wearable profile
+Requires: %{name} = %{version}-%{release}
+Conflicts: %{name}-profile_wearable
+%description profile_wearable
+Feedback library mod for wearable profile that replaces .so.* files.
+This overwrites .so.* files of %{name}.
%package devel
Summary: Feedback library for (devel)
@@ -35,10 +56,42 @@ Feedback library for playing sound and vibration (devel)
%package -n svi-data
Summary: svi resource package
Group: Development/Libraries
+Requires: svi-data-compat = %{version}-%{release}
+Recommends: svi-data-profile_common = %{version}-%{release}
%description -n svi-data
svi resource package
+%package -n svi-data-profile_common
+Summary: svi resource package body without mobile/wearable mods
+Provides: svi-data-compat = %{version}-%{release}
+Provides: svi-data-profile_tv = %{version}-%{release}
+Provides: svi-data-profile_ivi = %{version}-%{release}
+Conflicts: svi-data-profile_mobile
+Conflicts: svi-data-profile_wearable
+%description -n svi-data-profile_common
+default set for svi resource package (not for mobile or wearable).
+
+%package -n svi-data-profile_mobile
+Summary: svi resource package body without mobile/wearable mods
+Provides: svi-data-compat = %{version}-%{release}
+Provides: svi-data-profile_tv = %{version}-%{release}
+Provides: svi-data-profile_ivi = %{version}-%{release}
+Conflicts: svi-data-profile_common
+Conflicts: svi-data-profile_wearable
+%description -n svi-data-profile_mobile
+default set for svi resource package (not for mobile or wearable).
+
+%package -n svi-data-profile_wearable
+Summary: svi resource package body without mobile/wearable mods
+Provides: svi-data-compat = %{version}-%{release}
+Provides: svi-data-profile_tv = %{version}-%{release}
+Provides: svi-data-profile_ivi = %{version}-%{release}
+Conflicts: svi-data-profile_common
+Conflicts: svi-data-profile_mobile
+%description -n svi-data-profile_wearable
+default set for svi resource package (not for mobile or wearable).
+
%prep
%setup -q
@@ -47,16 +100,64 @@ export CFLAGS+=" -DTIZEN_ENGINEER_MODE"
cp %{SOURCE1} .
cp %{SOURCE2} .
+mkdir -p build_mobile
+pushd build_mobile
+%cmake .. \
+ -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+ -DPROFILE=mobile \
+ -DTZ_SYS_RO_SHARE=%{_datadir} \
+ -DTZ_SYS_SHARE=%{TZ_SYS_SHARE}
+make
+popd
+
+mkdir -p build_wearable
+pushd build_wearable
+%cmake .. \
+ -DCMAKE_INSTALL_PREFIX=%{_prefix} \
+ -DPROFILE=wearable \
+ -DTZ_SYS_RO_SHARE=%{_datadir} \
+ -DTZ_SYS_SHARE=%{TZ_SYS_SHARE}
+make
+popd
+
+# Note that common is used for tv/ivi/common.
%cmake . \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
- -DPROFILE=%{profile} \
+ -DPROFILE=common \
-DTZ_SYS_RO_SHARE=%{_datadir} \
-DTZ_SYS_SHARE=%{TZ_SYS_SHARE}
make
%install
rm -rf %{buildroot}
+
+pushd build_mobile
+%make_install
+popd
+pushd %{buildroot}%{_libdir}
+for file in libfeedback.so.*[0-9]; do mv "$file" "$file.mobile"; done
+ls -l
+popd
+pushd %{buildroot}%{_datadir}
+mv feedback feedback.mobile
+popd
+
+
+pushd build_wearable
+%make_install
+popd
+pushd %{buildroot}%{_libdir}
+for file in libfeedback.so.*[0-9]; do mv "$file" "$file.wearable"; done
+ls -l
+popd
+pushd %{buildroot}%{_datadir}
+mv feedback feedback.wearable
+popd
+
%make_install
+pushd %{buildroot}%{_libdir}
+ls -l
+popd
mkdir -p %{buildroot}%{_datadir}/license
cp LICENSE %{buildroot}%{_datadir}/license/%{name}
@@ -74,10 +175,38 @@ rm -rf %{TZ_SYS_SHARE}/feedback/
%files
%defattr(-,root,root,-)
+%exclude %{_libdir}/libfeedback.so.*.mobile
+%exclude %{_libdir}/libfeedback.so.*.wearable
%{_libdir}/libfeedback.so.*
%{_datadir}/license/%{name}
%manifest libfeedback.manifest
+%post profile_mobile
+pushd %{_libdir}
+for file in libfeedback.so.*.mobile; do mv "$file" "${file%.mobile}"; done
+popd
+%preun profile_mobile
+pushd %{_libdir}
+echo "You need to reinstall libfeedback to let libfeedback work as expected after this uninstall. Otherwise it will keep working as mobile-mod."
+# adding symlinks to supress warnings at uninstall
+for file in libfeedback.so.*; do ln -sf "$file" "$file.mobile"; done
+popd
+%files profile_mobile
+%{_libdir}/libfeedback.so.*.mobile
+
+%post profile_wearable
+pushd %{_libdir}
+for file in libfeedback.so.*.wearable; do mv "$file" "${file%.wearable}"; done
+popd
+%preun profile_wearable
+pushd %{_libdir}
+echo "You need to reinstall libfeedback to let libfeedback work as expected after this uninstall. Otherwise it will keep working as wearable-mod."
+# adding symlinks to supress warnings at uninstall
+for file in libfeedback.so.*; do ln -sf "$file" "$file.wearable"; done
+popd
+%files profile_wearable
+%{_libdir}/libfeedback.so.*.wearable
+
%files devel
%defattr(-,root,root,-)
%{_includedir}/feedback/*.h
@@ -86,8 +215,24 @@ rm -rf %{TZ_SYS_SHARE}/feedback/
%files -n svi-data
%defattr(644,root,root,-)
-%{_datadir}/feedback/*
%defattr(666,app,app,-)
%dir %{TZ_SYS_SHARE}/feedback/haptic/custom
%{_datadir}/license/svi-data
%manifest svi-data.manifest
+
+%files -n svi-data-profile_common
+%{_datadir}/feedback/*
+
+%post -n svi-data-profile_mobile
+ln -sf feedback.mobile %{_datadir}/feedback
+%preun -n svi-data-profile_mobile
+rm -f %{_datadir}/feedback
+%files -n svi-data-profile_mobile
+%{_datadir}/feedback.mobile/*
+
+%post -n svi-data-profile_wearable
+ln -sf feedback.wearable %{_datadir}/feedback
+%preun -n svi-data-profile_wearable
+rm -f %{_datadir}/feedback
+%files -n svi-data-profile_wearable
+%{_datadir}/feedback.wearable/*