de3a62e04408381af58be8e9d4b31dd5f5e32dbe
[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     HOME="$D${sysconfdir}/skel"
119     . "$D${sysconfdir}/tizen-platform.conf"
120     cat << ENDOFCAT |
121     $TZ_USER_HOME        User::Home           true
122     $TZ_USER_CONTENT     User::Home           true
123     $TZ_USER_CAMERA      User::App::Shared    true
124     $TZ_USER_DOCUMENTS   User::App::Shared    true
125     $TZ_USER_DOWNLOADS   User::App::Shared    true
126     $TZ_USER_GAMES       User::App::Shared    true
127     $TZ_USER_IMAGES      User::App::Shared    true
128     $TZ_USER_OTHERS      User::App::Shared    true
129     $TZ_USER_SOUNDS      User::App::Shared    true
130     $TZ_USER_VIDEOS      User::App::Shared    true
131     $TZ_USER_SHARE       User::App::Shared    true
132     $TZ_USER_APP         User                 false
133     $TZ_USER_DB          User                 false
134     $TZ_USER_DESKTOP     User                 false
135     $TZ_USER_ICONS       User::Home           true
136     $TZ_USER_PACKAGES    User                 false
137     ENDOFCAT
138     LANG= sort | while read skelname context transmute; do
139         mkdir -p "$skelname"
140         chsmack -a "$context" "$skelname"
141         [ "$transmute" = true ] && chsmack -t "$skelname"
142     done
143     HOME="$saveHOME"
144     ##############################################
145     # END - creation of the /etc/skel/content
146     ##############################################
147
148 }
149
150 pkg_postrm_libtzplatform-config() {
151     #!/bin/sh -e
152
153     [ "x$D" == "x" ] && ldconfig
154 }
155
156 PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
157 PACKAGES += " libtzplatform-config-dev "
158 PACKAGES += " tizen-platform-config-tools "
159 PACKAGES += " tizen-platform-config "
160 PACKAGES += " libtzplatform-config "
161
162 libtzplatform-config-dev_files = ""
163 libtzplatform-config-dev_files += "${prefix}/lib/*.so"
164 libtzplatform-config-dev_files += "${prefix}/lib/pkgconfig/*.pc"
165 libtzplatform-config-dev_files += "${prefix}/include/*.h"
166 libtzplatform-config-dev_files += "${sysconfdir}/rpm/macros.tizen-platform"
167 libtzplatform-config-dev_files += "${prefix}/lib/*.a"
168 CONFFILES_libtzplatform-config-dev = ""
169 CONFFILES_libtzplatform-config-dev += "${sysconfdir}/rpm/macros.tizen-platform"
170 MANIFESTFILES_libtzplatform-config-dev = "tizen-platform-config.manifest"
171
172 tizen-platform-config-tools_files = ""
173 tizen-platform-config-tools_files += "${prefix}/bin/*"
174 MANIFESTFILES_${PN}-tools = "tizen-platform-config.manifest"
175
176 tizen-platform-config_files = ""
177 tizen-platform-config_files += "${sysconfdir}/tizen-platform.conf"
178 CONFFILES_${PN} = ""
179 CONFFILES_${PN} += "${sysconfdir}/tizen-platform.conf"
180 MANIFESTFILES_${PN} = "tizen-platform-config.manifest"
181
182 libtzplatform-config_files = ""
183 libtzplatform-config_files += "${prefix}/lib/*.so.*"
184 MANIFESTFILES_libtzplatform-config = "tizen-platform-config.manifest"
185
186 FILES_libtzplatform-config-dev = "${libtzplatform-config-dev_files}"
187 FILES_${PN}-tools = "${tizen-platform-config-tools_files}"
188 FILES_${PN} = "${tizen-platform-config_files}"
189 FILES_libtzplatform-config = "${libtzplatform-config_files}"
190
191 PKG_libtzplatform-config-dev= "libtzplatform-config-dev"
192 PKG_tizen-platform-config-tools= "tizen-platform-config-tools"
193 PKG_tizen-platform-config= "tizen-platform-config"
194 PKG_libtzplatform-config= "libtzplatform-config"
195
196 require tizen-platform-config-extraconf.inc
197