From: Kichan Kwon Date: Mon, 12 Dec 2016 04:28:00 +0000 (+0900) Subject: Make system-configuration-debug X-Git-Tag: accepted/tizen/4.0/unified/20170816.013922^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen;p=platform%2Fcore%2Fsystem%2Fsystem-configuration.git Make system-configuration-debug - This package will make .debugmode file - In addition, switch for each conf file is added Change-Id: Ibe8297f70875700af248fa3f04cb2cfb1257d0b2 Signed-off-by: Kichan Kwon --- diff --git a/README b/README index 8400aae..4cc3598 100644 --- a/README +++ b/README @@ -3,8 +3,8 @@ 1. Introduction ===== -System configuration is the set of config files. - +System-configuration is the set of config files. +System-configuration-debug is package for developer debug binary. 2. Background ===== diff --git a/packaging/system-configuration.spec b/packaging/system-configuration.spec index 44d18cd..1763f60 100644 --- a/packaging/system-configuration.spec +++ b/packaging/system-configuration.spec @@ -1,18 +1,28 @@ Name: system-configuration Summary: Configuration for system packages -Version: 0.1 +Version: 0.1.1 Release: 1 Group: System/Configuration License: Apache-2.0 Source0: %{name}-%{version}.tar.gz Source1: %{name}.manifest +%define dlog_conf OFF + BuildRequires: pkgconfig(libtzplatform-config) %description Configuration files for system packages By modifying this package, each profile can use their own configuration +%package -n system-configuration-debug +Summary: System-configuration for developer binary +Group: System/Configuration +Conflicts: system-configuration + +%description -n system-configuration-debug +System-configuration for developer debug binary + %prep %setup -q cp %{SOURCE1} . @@ -20,16 +30,44 @@ cp %{SOURCE1} . %install mkdir -p %{buildroot}%{TZ_SYS_ETC} -install -m 0644 configs/dlog.sysconf %{buildroot}%{TZ_SYS_ETC}/dlog.sysconf +%if %{?dlog_conf} == ON + install -m 0644 configs/dlog.sysconf %{buildroot}%{TZ_SYS_ETC}/dlog.sysconf +%endif + +%posttrans -n system-configuration +%if %{?dlog_conf} == ON + mv %{TZ_SYS_ETC}/dlog.conf %{TZ_SYS_ETC}/dlog.conf.bak + ln -s %{TZ_SYS_ETC}/dlog.sysconf %{TZ_SYS_ETC}/dlog.conf +%endif + +%postun -n system-configuration +%if %{?dlog_conf} == ON + mv %{TZ_SYS_ETC}/dlog.conf.bak %{TZ_SYS_ETC}/dlog.conf +%endif + +%files -n system-configuration +%license LICENSE +%manifest system-configuration.manifest +%if %{?dlog_conf} == ON + %attr(664,log,log) %{TZ_SYS_ETC}/dlog.sysconf +%endif -%posttrans -mv %{TZ_SYS_ETC}/dlog.conf %{TZ_SYS_ETC}/dlog.conf.bak -ln -s %{TZ_SYS_ETC}/dlog.sysconf %{TZ_SYS_ETC}/dlog.conf +%posttrans -n system-configuration-debug +touch %{TZ_SYS_ETC}/.debugmode +%if %{?dlog_conf} == ON + mv %{TZ_SYS_ETC}/dlog.conf %{TZ_SYS_ETC}/dlog.conf.bak + ln -s %{TZ_SYS_ETC}/dlog.sysconf %{TZ_SYS_ETC}/dlog.conf +%endif -%postun -mv %{TZ_SYS_ETC}/dlog.conf.bak %{TZ_SYS_ETC}/dlog.conf +%postun -n system-configuration-debug +rm %{TZ_SYS_ETC}/.debugmode +%if %{?dlog_conf} == ON + mv %{TZ_SYS_ETC}/dlog.conf.bak %{TZ_SYS_ETC}/dlog.conf +%endif -%files +%files -n system-configuration-debug %license LICENSE %manifest system-configuration.manifest -%attr(664,log,log) %{TZ_SYS_ETC}/dlog.sysconf +%if %{?dlog_conf} == ON + %attr(664,log,log) %{TZ_SYS_ETC}/dlog.sysconf +%endif