347c9ccee30df79422aeaa75a2adbf6558d0207d
[scm/bb/meta-tizen.git] / meta-tizen-common-base / recipes-core / tizen-platform-config / tizen-platform-config.inc
1 DESCRIPTION = "Tizen Platform Configuration"
2 HOMEPAGE = "http://www.tizen.org"
3 SECTION = "System/Configuration"
4 LICENSE = "MIT"
5 PV = "2.0"
6
7 SRC_URI = ""
8
9 S = "${WORKDIR}/git"
10
11 inherit manifest autotools-brokensep
12
13 BBCLASSEXTEND = ""
14 PROVIDES = ""
15
16 #PROVIDES by tizen-platform-config
17
18
19 #PROVIDES by libtzplatform-config-dev
20 PROVIDES += "libtzplatform-config-dev"
21
22
23 #PROVIDES by tizen-platform-config-tools
24 PROVIDES += "tizen-platform-config-tools"
25
26
27 #PROVIDES by libtzplatform-config
28 PROVIDES += "libtzplatform-config"
29
30
31 RDEPENDS = ""
32 #RDEPENDS of tizen-platform-config-tools (${PN}-tools)
33 RDEPENDS_${PN}-tools += "libtzplatform-config"
34
35 #RDEPENDS of tizen-platform-config (${PN})
36 RDEPENDS_${PN} += "smack"
37
38 #RDEPENDS of libtzplatform-config-dev (libtzplatform-config-dev)
39 RDEPENDS_libtzplatform-config-dev += "libtzplatform-config"
40
41 #RDEPENDS of libtzplatform-config (libtzplatform-config)
42 RDEPENDS_libtzplatform-config += "tizen-platform-config"
43
44
45 DEPENDS = ""
46 #DEPENDS of tizen-platform-config
47 DEPENDS += "tizen-platform-wrapper"
48
49 do_prep() {
50  cd ${S}
51  chmod -Rf a+rX,u+w,g-w,o-w ${S}
52  #setup -q
53  cp ${S}/packaging/tizen-platform-config.manifest .
54  
55  
56 }
57 do_patch_append() {
58     bb.build.exec_func('do_prep', d)
59 }
60
61 do_configure() {
62 }
63
64 do_compile() {
65  cd ${S}
66   LANG=C
67   export LANG
68   unset DISPLAY
69   LD_AS_NEEDED=1; export LD_AS_NEEDED ;
70   
71   
72   autotools_do_configure
73   oe_runmake
74   
75   exit 0
76   oe_runmake check
77   
78   
79   
80 }
81 EXTRA_OECONF += " --enable-static"
82
83 do_install() {
84  export RPM_BUILD_ROOT=${D}
85  cd ${S}
86  LANG=C
87  export LANG
88  unset DISPLAY
89  rm -rf ${D}
90  mkdir -p ${D}
91  
92  
93    oe_runmake \
94          DESTDIR=${D} \
95          INSTALL_ROOT=${D} \
96          BINDIR=${prefix}/bin \
97    install  
98    rm -f ${D}${infodir}/dir 
99    find ${D} -regex ".*\.la$" | xargs rm -f -- 
100    
101  
102  
103 }
104
105 pkg_postinst_libtzplatform-config() {
106     #!/bin/sh -e
107
108     [ "x$D" == "x" ] && ldconfig
109 }
110
111 pkg_postinst_${PN}() {
112     #!/bin/sh -e
113
114     ##############################################
115     # BEGIN - creation of the /etc/skel/content
116     ##############################################
117     saveHOME="$HOME"
118     chmod 700 $HOME
119     HOME="$D${sysconfdir}/skel"
120     . "$D${sysconfdir}/tizen-platform.conf"
121     cat << ENDOFCAT |
122     $TZ_USER_HOME        User::Home           true
123     $TZ_USER_APPROOT     User::Home           true
124     $TZ_USER_CONTENT     User::Home           true
125     $TZ_USER_CAMERA      User::App::Shared    true
126     $TZ_USER_DOCUMENTS   User::App::Shared    true
127     $TZ_USER_DOWNLOADS   User::App::Shared    true
128     $TZ_USER_GAMES       User::App::Shared    true
129     $TZ_USER_IMAGES      User::App::Shared    true
130     $TZ_USER_OTHERS      User::App::Shared    true
131     $TZ_USER_SOUNDS      User::App::Shared    true
132     $TZ_USER_VIDEOS      User::App::Shared    true
133     $TZ_USER_SHARE       User::App::Shared    true
134     $TZ_USER_APP         User                 false
135     $TZ_USER_DB          User                 false
136     $TZ_USER_DESKTOP     User                 false
137     $TZ_USER_ICONS       User::Home           true
138     $TZ_USER_PACKAGES    User                 false
139     ENDOFCAT
140     LANG= sort | while read skelname context transmute; do
141         mkdir -p "$skelname"
142         chsmack -a "$context" "$skelname"
143         [ "$transmute" = true ] && chsmack -t "$skelname"
144     done
145     HOME="$saveHOME"
146     ##############################################
147     # END - creation of the /etc/skel/content
148     ##############################################
149
150 }
151
152 pkg_postrm_libtzplatform-config() {
153     #!/bin/sh -e
154
155     [ "x$D" == "x" ] && ldconfig
156 }
157
158 PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
159 PACKAGES += " libtzplatform-config-dev "
160 PACKAGES += " tizen-platform-config-tools "
161 PACKAGES += " tizen-platform-config "
162 PACKAGES += " libtzplatform-config "
163
164 libtzplatform-config-dev_files = ""
165 libtzplatform-config-dev_files += "${prefix}/lib/*.so"
166 libtzplatform-config-dev_files += "${prefix}/lib/pkgconfig/*.pc"
167 libtzplatform-config-dev_files += "${prefix}/include/*.h"
168 libtzplatform-config-dev_files += "${sysconfdir}/rpm/macros.tizen-platform"
169 libtzplatform-config-dev_files += "${prefix}/lib/*.a"
170 CONFFILES_libtzplatform-config-dev = ""
171 CONFFILES_libtzplatform-config-dev += "${sysconfdir}/rpm/macros.tizen-platform"
172 MANIFESTFILES_libtzplatform-config-dev = "tizen-platform-config.manifest"
173
174 tizen-platform-config-tools_files = ""
175 tizen-platform-config-tools_files += "${prefix}/bin/*"
176 MANIFESTFILES_${PN}-tools = "tizen-platform-config.manifest"
177
178 tizen-platform-config_files = ""
179 tizen-platform-config_files += "${sysconfdir}/tizen-platform.conf"
180 CONFFILES_${PN} = ""
181 CONFFILES_${PN} += "${sysconfdir}/tizen-platform.conf"
182 MANIFESTFILES_${PN} = "tizen-platform-config.manifest"
183
184 libtzplatform-config_files = ""
185 libtzplatform-config_files += "${prefix}/lib/*.so.*"
186 MANIFESTFILES_libtzplatform-config = "tizen-platform-config.manifest"
187
188 FILES_libtzplatform-config-dev = "${libtzplatform-config-dev_files}"
189 FILES_${PN}-tools = "${tizen-platform-config-tools_files}"
190 FILES_${PN} = "${tizen-platform-config_files}"
191 FILES_libtzplatform-config = "${libtzplatform-config_files}"
192
193 PKG_libtzplatform-config-dev= "libtzplatform-config-dev"
194 PKG_tizen-platform-config-tools= "tizen-platform-config-tools"
195 PKG_tizen-platform-config= "tizen-platform-config"
196 PKG_libtzplatform-config= "libtzplatform-config"
197
198 require tizen-platform-config-extraconf.inc
199