1 %define libname libtzplatform-config
4 Name: tizen-platform-config
7 Summary: Tizen Platform Configuration
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-wrapper >= 2
18 BuildRequires: tizen-platform-config-meta
20 Requires(post): coreutils
22 # the main package only contains a config file but other dependent packages
23 # will contain binary. So, we can't build a noarch package and have to avoid
24 # a rpmlint warning using a filter in xxx-rpmlintrc
27 Tizen Platform Configuration - variables definitions
29 %package -n %{libname}
30 Summary: Tizen Platform Configuration - helper library
31 Group: System/Libraries
33 Requires: %{name} = %{version}
34 %description -n %{libname}
35 Tizen Platform Configuration - helper library to lookup Tizen variables easily
37 %package -n %{libname}-devel
38 Summary: Tizen Platform Configuration - helper libray headers, RPM macros
39 Group: Development/Libraries
41 Requires: %{libname} = %{version}
42 %description -n %{libname}-devel
43 Tizen Platform Configuration - helper library headers to include in source code,
44 RPM macros to call in spec files
46 %package -n %{name}-tools
47 Summary: Tizen Platform Configuration - tools
48 Group: System/Utilities
50 Requires: %{libname} = %{version}
51 %description -n %{name}-tools
52 Tizen Platform Configuration - helper program to lookup Tizen variables easily
59 %reconfigure --enable-static
60 %__make %{?_smp_mflags}
67 install -m 755 %{SOURCE1002} -D %{buildroot}%{_datadir}/upgrade/scripts/201.tizen-platform-config_upgrade.sh
68 install -m 755 %{SOURCE2001} -D %{buildroot}%{_datadir}/upgrade/scripts/200.filesystem-pre.patch.sh
69 install -m 755 %{SOURCE2002} -D %{buildroot}%{_datadir}/upgrade/scripts/799.filesystem-post.patch.sh
70 rm %{buildroot}%{_libdir}/*.a
73 ##############################################
74 # BEGIN - setting of predefined directories (also /etc/skel)
75 ##############################################
78 . "%{_sysconfdir}/tizen-platform.conf"
81 SMACK System::Shared true
97 SMACK User::Home false
105 SMACK User::Home true
107 $TZ_SYS_RW_ICONS/default
108 $TZ_SYS_RW_ICONS/default/small
110 SMACK User::App::Shared true
125 $TZ_USER_HOME/.pki/nssdb
126 $TZ_USER_APP/xwalk-service
128 SMACK System::Shared true
131 SMACK System::Shared false
135 while read s1 s2 s3; do
138 SMACK) c="$s2"; t="$s3";;
140 *) echo "$s1 ${m:-700} ${c:-_} ${t:-false}";;
144 while read dirname mode context transmute; do
145 if [ -e "$dirname" ]; then
146 chmod "$mode" "$dirname"
148 mkdir -p -m "$mode" "$dirname"
150 if [ "$transmute" = true ]; then
151 chsmack -a "$context" -t "$dirname"
153 chsmack -a "$context" "$dirname"
157 ##############################################
158 # END - setting of predefined directories (also /etc/skel)
159 ##############################################
161 %post -n %{libname} -p /sbin/ldconfig
163 %postun -n %{libname} -p /sbin/ldconfig
166 %manifest %{name}.manifest
168 %config %{_sysconfdir}/tizen-platform.conf
169 %{_datadir}/upgrade/scripts/*
172 %manifest %{name}.manifest
175 %files -n %{libname}-devel
176 %manifest %{name}.manifest
179 %{_libdir}/pkgconfig/*.pc
181 %config %{_sysconfdir}/rpm/macros.tizen-platform
183 %files -n %{name}-tools
184 %manifest %{name}.manifest