Merge tizen branch into tizen_3.0 branch
[platform/core/system/system-configuration.git] / packaging / system-configuration.spec
1 Name:       system-configuration
2 Summary:    Configuration for system packages
3 Version:    0.1.1
4 Release:    2
5 Group:      System/Configuration
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Source1:    %{name}.manifest
9
10 %define dlog_conf  OFF
11
12 BuildRequires: pkgconfig(libtzplatform-config)
13
14 %description
15 Configuration files for system packages
16 By modifying this package, each profile can use their own configuration
17
18 %package -n system-configuration-debug
19 Summary:    System-configuration for developer binary
20 Group:      System/Configuration
21 Conflicts:  system-configuration
22
23 %description -n system-configuration-debug
24 System-configuration for developer debug binary
25
26 %prep
27 %setup -q
28 cp %{SOURCE1} .
29
30 %install
31 mkdir -p %{buildroot}%{TZ_SYS_ETC}
32
33 %if %{?dlog_conf} == ON
34         install -m 0644 configs/dlog.sysconf %{buildroot}%{TZ_SYS_ETC}/dlog.sysconf
35 %endif
36
37 %posttrans -n system-configuration
38 %if %{?dlog_conf} == ON
39         mv %{TZ_SYS_ETC}/dlog.conf %{TZ_SYS_ETC}/dlog.conf.bak
40         ln -s %{TZ_SYS_ETC}/dlog.sysconf %{TZ_SYS_ETC}/dlog.conf
41 %endif
42
43 %postun -n system-configuration
44 %if %{?dlog_conf} == ON
45         mv %{TZ_SYS_ETC}/dlog.conf.bak %{TZ_SYS_ETC}/dlog.conf
46 %endif
47
48 %files -n system-configuration
49 %license LICENSE
50 %manifest system-configuration.manifest
51 %if %{?dlog_conf} == ON
52         %attr(664,log,log) %{TZ_SYS_ETC}/dlog.sysconf
53 %endif
54
55 %posttrans -n system-configuration-debug
56 touch %{TZ_SYS_ETC}/.debugmode
57 %if %{?dlog_conf} == ON
58         mv %{TZ_SYS_ETC}/dlog.conf %{TZ_SYS_ETC}/dlog.conf.bak
59         ln -s %{TZ_SYS_ETC}/dlog.sysconf %{TZ_SYS_ETC}/dlog.conf
60 %endif
61
62 %postun -n system-configuration-debug
63 rm %{TZ_SYS_ETC}/.debugmode
64 %if %{?dlog_conf} == ON
65         mv %{TZ_SYS_ETC}/dlog.conf.bak %{TZ_SYS_ETC}/dlog.conf
66 %endif
67
68 %files -n system-configuration-debug
69 %license LICENSE
70 %manifest system-configuration.manifest
71 %if %{?dlog_conf} == ON
72         %attr(664,log,log) %{TZ_SYS_ETC}/dlog.sysconf
73 %endif