1 %define libname libtzplatform-config
4 Name: tizen-platform-config
7 Summary: Tizen Platform Configuration
8 License: MIT and LGPL-2.0
9 Url: http://www.tizen.org
10 Group: System/Configuration
11 Source0: %{name}-%{version}.tar.gz
12 Source1: %{name}-rpmlintrc
13 Source1001: %{name}.manifest
14 Source1002: 201.tizen-platform-config_upgrade.sh
15 Source2001: 200.filesystem-pre.patch.sh
16 Source2002: 799.filesystem-post.patch.sh
17 BuildRequires: tizen-platform-config-meta
20 BuildRequires: coreutils
22 Requires(post): coreutils
24 # the main package only contains a config file but other dependent packages
25 # will contain binary. So, we can't build a noarch package and have to avoid
26 # a rpmlint warning using a filter in xxx-rpmlintrc
29 Tizen Platform Configuration - variables definitions
31 %package -n %{libname}
32 Summary: Tizen Platform Configuration - helper library
33 Group: System/Libraries
35 Requires: %{name} = %{version}
36 %description -n %{libname}
37 Tizen Platform Configuration - helper library to lookup Tizen variables easily
39 %package -n %{libname}-devel
40 Summary: Tizen Platform Configuration - helper libray headers, RPM macros
41 Group: Development/Libraries
43 Requires: %{libname} = %{version}
44 %description -n %{libname}-devel
45 Tizen Platform Configuration - helper library headers to include in source code,
46 RPM macros to call in spec files
48 %package -n %{name}-tools
49 Summary: Tizen Platform Configuration - tools
50 Group: System/Utilities
52 Requires: %{libname} = %{version}
53 %description -n %{name}-tools
54 Tizen Platform Configuration - helper program to lookup Tizen variables easily
61 %reconfigure --enable-static
62 %__make %{?_smp_mflags}
69 install -m 755 %{SOURCE1002} -D %{buildroot}%{_datadir}/upgrade/scripts/201.tizen-platform-config_upgrade.sh
70 install -m 755 %{SOURCE2001} -D %{buildroot}%{_datadir}/upgrade/scripts/200.filesystem-pre.patch.sh
71 install -m 755 %{SOURCE2002} -D %{buildroot}%{_datadir}/upgrade/scripts/799.filesystem-post.patch.sh
72 rm %{buildroot}%{_libdir}/*.a
75 ##############################################
76 # BEGIN - setting of predefined directories (also /etc/skel)
77 ##############################################
80 . "%{_sysconfdir}/tizen-platform.conf"
83 SMACK System::Shared true
99 SMACK User::Home false
107 SMACK User::Home true
109 $TZ_SYS_RW_ICONS/default
110 $TZ_SYS_RW_ICONS/default/small
112 SMACK User::App::Shared true
127 $TZ_USER_HOME/.pki/nssdb
128 $TZ_USER_APP/xwalk-service
130 SMACK System::Shared true
133 SMACK System::Shared false
137 while read s1 s2 s3; do
140 SMACK) c="$s2"; t="$s3";;
142 *) echo "$s1 ${m:-700} ${c:-_} ${t:-false}";;
146 while read dirname mode context transmute; do
147 if [ -e "$dirname" ]; then
148 chmod "$mode" "$dirname"
150 mkdir -p -m "$mode" "$dirname"
152 if [ "$transmute" = true ]; then
153 chsmack -a "$context" -t "$dirname"
155 chsmack -a "$context" "$dirname"
159 ##############################################
160 # END - setting of predefined directories (also /etc/skel)
161 ##############################################
163 %post -n %{libname} -p /sbin/ldconfig
165 %postun -n %{libname} -p /sbin/ldconfig
168 %manifest %{name}.manifest
169 %license LICENSE LICENSE.LGPL-2.0
170 %config %{_sysconfdir}/tizen-platform.conf
171 %{_datadir}/upgrade/scripts/*
174 %manifest %{name}.manifest
175 %license LICENSE.LGPL-2.0
178 %files -n %{libname}-devel
179 %manifest %{name}.manifest
181 %{_libdir}/pkgconfig/*.pc
183 %config %{_sysconfdir}/rpm/macros.tizen-platform
185 %files -n %{name}-tools
186 %manifest %{name}.manifest
187 %license LICENSE.LGPL-2.0