aboutsummaryrefslogtreecommitdiffstats
path: root/meta-application-manager/recipes-others/tizen-platform-config/tizen-platform-config.inc
blob: 513d1af09898f4dfb1d3d6fc5345168cd20b3640 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
DESCRIPTION = "Tizen Platform Configuration"
HOMEPAGE = "http://www.tizen.org"
SECTION = "System/Configuration"
LICENSE = "MIT"
PV = "2.0"

SRC_URI += "file://0001-modified-global-tizen-to-agl.patch"

S = "${WORKDIR}/git"

inherit autotools-brokensep

BBCLASSEXTEND = ""
PROVIDES = ""

#PROVIDES by tizen-platform-config


#PROVIDES by libtzplatform-config-dev
PROVIDES += "libtzplatform-config-dev"


#PROVIDES by tizen-platform-config-tools
PROVIDES += "tizen-platform-config-tools"


#PROVIDES by libtzplatform-config
PROVIDES += "libtzplatform-config"


RDEPENDS = ""
#RDEPENDS of tizen-platform-config-tools (${PN}-tools)
RDEPENDS_${PN}-tools += "libtzplatform-config"

#RDEPENDS of libtzplatform-config-dev (libtzplatform-config-dev)
RDEPENDS_libtzplatform-config-dev += "libtzplatform-config"

#RDEPENDS of libtzplatform-config (libtzplatform-config)
RDEPENDS_libtzplatform-config += "tizen-platform-config"


DEPENDS = ""
#DEPENDS of tizen-platform-config
DEPENDS += "tizen-platform-wrapper"

do_prep() {
 cd ${S}
 chmod -Rf a+rX,u+w,g-w,o-w ${S}
 #setup -q
 cp ${S}/packaging/tizen-platform-config.manifest .
 
 
}
do_patch_append() {
    bb.build.exec_func('do_prep', d)
}

do_configure() {
}

do_compile() {
 cd ${S}
  LANG=C
  export LANG
  unset DISPLAY
  LD_AS_NEEDED=1; export LD_AS_NEEDED ;
  
  
  autotools_do_configure
  oe_runmake ${PARALLEL_MAKE}
  
  exit 0
  oe_runmake check
  
  
  
}
EXTRA_OECONF += " --enable-static"

do_install() {
 export RPM_BUILD_ROOT=${D}
 cd ${S}
 LANG=C
 export LANG
 unset DISPLAY
 rm -rf ${D}
 mkdir -p ${D}
 
 
   oe_runmake \
         DESTDIR=${D} \
         INSTALL_ROOT=${D} \
         BINDIR=${prefix}/bin \
   install  
   rm -f ${D}${infodir}/dir 
   find ${D} -regex ".*\.la$" | xargs rm -f -- 
   
 
 
}

pkg_postinst_${PN}() {
    #!/bin/sh -e

    ##############################################
    # BEGIN - setting of predefined directories (also /etc/skel)
    ##############################################
    saveHOME="$HOME"
    HOME="%{_sysconfdir}/skel"
    . "%{_sysconfdir}/tizen-platform.conf"
    cat << ENDOFCAT |
    MODE 777
    SMACK System::Shared true
    $TZ_SYS_STORAGE
    $TZ_SYS_MEDIA

    MODE 700
    SMACK User::Home true
    $TZ_USER_HOME
    $TZ_USER_APPROOT
    $TZ_USER_DB
    $TZ_USER_PACKAGES
    $TZ_USER_ICONS
    $TZ_USER_APP

    MODE 775
    SMACK User::Home false
    $TZ_SYS_DB
    $TZ_SYS_RO_PACKAGES
    $TZ_SYS_RO_APP
    $TZ_SYS_RW_PACKAGES
    $TZ_SYS_RW_APP

    MODE 775
    SMACK User::Home true
    $TZ_SYS_RW_ICONS
    $TZ_SYS_RW_ICONS/default
    $TZ_SYS_RW_ICONS/default/small

    SMACK User::App::Shared true
    $TZ_USER_CONTENT
    $TZ_USER_CAMERA
    $TZ_USER_DOCUMENTS
    $TZ_USER_DOWNLOADS
    $TZ_USER_GAMES
    $TZ_USER_IMAGES
    $TZ_USER_OTHERS
    $TZ_USER_SOUNDS
    $TZ_USER_MUSIC
    $TZ_USER_VIDEOS
    $TZ_USER_SHARE
    $TZ_USER_CACHE
    $TZ_USER_CONFIG
    $TZ_USER_HOME/.pki/nssdb
    $TZ_USER_APP/xwalk-service

    SMACK System::Shared true
    $TZ_USER_DESKTOP

    SMACK System::Shared false
    $TZ_SYS_ETC

    ENDOFCAT
    while read s1 s2 s3; do
    case "$s1" in
    MODE) m="$s2";;
    SMACK) c="$s2"; t="$s3";;
    "") ;;
    *) echo "$s1 ${m:-700} ${c:-_} ${t:-false}";;
    esac
    done |
    LANG=C sort |
    while read dirname mode context transmute; do
    mkdir -p -m "$mode" "$dirname"
    if [ "$transmute" = true ]; then
    chsmack -a "$context" -t "$dirname"
    else
    chsmack -a "$context" "$dirname"
    fi >&2
    done
    HOME="$saveHOME"
    ##############################################
    # END - setting of predefined directories (also /etc/skel)
    ##############################################
}

pkg_postinst_libtzplatform-config() {
    #!/bin/sh -e

    [ "x$D" == "x" ] && ldconfig
}

pkg_postrm_libtzplatform-config() {
    #!/bin/sh -e

    [ "x$D" == "x" ] && ldconfig
}

PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
PACKAGES += " libtzplatform-config-dev "
PACKAGES += " tizen-platform-config-tools "
PACKAGES += " tizen-platform-config "
PACKAGES += " libtzplatform-config "

libtzplatform-config-dev_files = ""
libtzplatform-config-dev_files += "${prefix}/lib/*.so"
libtzplatform-config-dev_files += "${prefix}/lib/pkgconfig/*.pc"
libtzplatform-config-dev_files += "${prefix}/include/*.h"
libtzplatform-config-dev_files += "${sysconfdir}/rpm/macros.tizen-platform"
libtzplatform-config-dev_files += "${prefix}/lib/*.a"
CONFFILES_libtzplatform-config-dev = ""
CONFFILES_libtzplatform-config-dev += "${sysconfdir}/rpm/macros.tizen-platform"
MANIFESTFILES_libtzplatform-config-dev = "tizen-platform-config.manifest"

tizen-platform-config-tools_files = ""
tizen-platform-config-tools_files += "${prefix}/bin/*"
MANIFESTFILES_${PN}-tools = "tizen-platform-config.manifest"

tizen-platform-config_files = ""
tizen-platform-config_files += "${sysconfdir}/tizen-platform.conf"
CONFFILES_${PN} = ""
CONFFILES_${PN} += "${sysconfdir}/tizen-platform.conf"
MANIFESTFILES_${PN} = "tizen-platform-config.manifest"

libtzplatform-config_files = ""
libtzplatform-config_files += "${prefix}/lib/*.so.*"
MANIFESTFILES_libtzplatform-config = "tizen-platform-config.manifest"

FILES_libtzplatform-config-dev = "${libtzplatform-config-dev_files}"
FILES_${PN}-tools = "${tizen-platform-config-tools_files}"
FILES_${PN} = "${tizen-platform-config_files}"
FILES_libtzplatform-config = "${libtzplatform-config_files}"

PKG_libtzplatform-config-dev= "libtzplatform-config-dev"
PKG_tizen-platform-config-tools= "tizen-platform-config-tools"
PKG_tizen-platform-config= "tizen-platform-config"
PKG_libtzplatform-config= "libtzplatform-config"

require tizen-platform-config-extraconf.inc