summaryrefslogtreecommitdiff
path: root/packaging/alarm-manager.spec
diff options
context:
space:
mode:
authorMyungJoo Ham <myungjoo.ham@samsung.com>2016-11-16 15:58:22 +0900
committerJiwoong Im <jiwoong.im@samsung.com>2017-01-17 17:59:24 +0900
commitf7dff0d76489875f09ee24f64c4cd5c26a9a4846 (patch)
tree2196666fe3f6475906950e1857ded450b4c647cd /packaging/alarm-manager.spec
parentf2e4e90f44dfc3d9ce6701bf7c907a9f18f354b8 (diff)
downloadalarm-manager-f7dff0d76489875f09ee24f64c4cd5c26a9a4846.tar.gz
alarm-manager-f7dff0d76489875f09ee24f64c4cd5c26a9a4846.tar.bz2
alarm-manager-f7dff0d76489875f09ee24f64c4cd5c26a9a4846.zip
Remove Profile Build Dependency: Do it at runtime
- This is for Tizen 4.0. : Tizen 4.0 Configurability and Build Blocks require to remove all profile-depending build options in spec files. (No More profile macros!) - It is recommended to distinguish features/profiles at runtime. unless it incurs too much overhead, which requires you to create multiple binaries and subpackages. In the code (alarm-manager), indentation for if(_APPFW_FEATURE_WAKEUP_USING_RTC) is ignored to help understand the patch. Correcting those indentation ignores will follow as another patch. Change-Id: I18b2ff8ea39bbdda0ed435f08a89b343b868822e Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com> Signed-off-by: Jiwoong Im <jiwoong.im@samsung.com>
Diffstat (limited to 'packaging/alarm-manager.spec')
-rw-r--r--packaging/alarm-manager.spec25
1 files changed, 10 insertions, 15 deletions
diff --git a/packaging/alarm-manager.spec b/packaging/alarm-manager.spec
index 51d19b6..f9e802c 100644
--- a/packaging/alarm-manager.spec
+++ b/packaging/alarm-manager.spec
@@ -32,6 +32,7 @@ BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(eventsystem)
BuildRequires: pkgconfig(notification)
BuildRequires: python-xml
+BuildRequires: pkgconfig(capi-system-info)
%define upgrade_script_path /usr/share/upgrade/scripts
@@ -67,21 +68,12 @@ Requires: libalarm = %{version}-%{release}
%description -n libalarm-devel
Alarm server libraries development package (devel)
-%define appfw_feature_wakeup_using_rtc 1
-
-%if "%{?profile}" == "tv"
-%define appfw_feature_wakeup_using_rtc 0
-%endif
-
%prep
%setup -q
%build
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
-%if 0%{?appfw_feature_wakeup_using_rtc}
-_APPFW_FEATURE_WAKEUP_USING_RTC=ON
-%endif
export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
@@ -95,8 +87,7 @@ export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
-DFULLVER=%{version} \
-DMAJORVER=${MAJORVER} \
-DTZ_SYS_ETC=%{TZ_SYS_ETC} \
- -D_APPFW_FEATURE_ALARM_MANAGER_MODULE_LOG:BOOL=${_APPFW_FEATURE_ALARM_MANAGER_MODULE_LOG} \
- -D_APPFW_FEATURE_WAKEUP_USING_RTC:BOOL=${_APPFW_FEATURE_WAKEUP_USING_RTC}
+ -D_APPFW_FEATURE_ALARM_MANAGER_MODULE_LOG:BOOL=${_APPFW_FEATURE_ALARM_MANAGER_MODULE_LOG}
make %{?jobs:-j%jobs}
@@ -114,10 +105,8 @@ ln -s ../alarm-server.service %{buildroot}%{_unitdir}/multi-user.target.wants/al
ln -sf ../alarm_session_agent.socket %{buildroot}%{_unitdir_user}/sockets.target.wants/alarm-session-agent.socket
mkdir -p %{buildroot}%{_tmpfilesdir}
install -m 0644 %SOURCE4 %{buildroot}%{_tmpfilesdir}/alarm-manager.conf
-%if 0%{?appfw_feature_wakeup_using_rtc}
mkdir -p %{buildroot}%{_libdir}/udev/rules.d
install -m 0644 %SOURCE5 %{buildroot}%{_libdir}/udev/rules.d
-%endif
mkdir -p %{buildroot}%{upgrade_script_path}
cp -f scripts/508.alarmmgr_upgrade.sh %{buildroot}%{upgrade_script_path}
@@ -134,6 +123,14 @@ cp -f scripts/508.alarmmgr_upgrade.sh %{buildroot}%{upgrade_script_path}
%postun -n libalarm
/sbin/ldconfig
+%posttrans -n alarm-server
+if [ -e /etc/config/model-config.xml ]; then
+ grep "feature\/profile.*tv" /etc/config/model-config.xml > /dev/null
+ if [ $? -eq 0 ]; then
+ rm %{_libdir}/udev/rules.d/99-rtc.rules
+ fi
+fi
+
%files -n alarm-server
%manifest alarm-server.manifest
%{_bindir}/*
@@ -148,9 +145,7 @@ cp -f scripts/508.alarmmgr_upgrade.sh %{buildroot}%{upgrade_script_path}
%license LICENSE
%config %{_sysconfdir}/dbus-1/system.d/alarm-service.conf
%{_tmpfilesdir}/alarm-manager.conf
-%if 0%{?appfw_feature_wakeup_using_rtc}
%{_libdir}/udev/rules.d/99-rtc.rules
-%endif
%if 0%{?appfw_feature_alarm_manager_module_log}
%attr(0755,root,root) %{TZ_SYS_ETC}/dump.d/module.d/alarmmgr_log_dump.sh
%endif