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} .
%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