summaryrefslogtreecommitdiff
path: root/recipes-tizen/media-server/media-server.inc
blob: 07a672a10f5414e3c5dba72db1402e4016ad5818 (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
DESCRIPTION = "File manager service server."
HOMEPAGE = "http://nohomepage.org"
SECTION = "Multimedia/Service"
LICENSE = "Apache-2.0"

SRC_URI = ""

S = "${WORKDIR}/git"

inherit autotools-brokensep

BBCLASSEXTEND = ""
PROVIDES = ""

#PROVIDES by libmedia-utils-dev
PROVIDES += "libmedia-utils-dev"


#PROVIDES by media-server


#PROVIDES by libmedia-utils
PROVIDES += "libmedia-utils"


RDEPENDS = ""
#RDEPENDS of libmedia-utils-dev (libmedia-utils-dev)
RDEPENDS_libmedia-utils-dev += "tizen-platform-config"
RDEPENDS_libmedia-utils-dev += "libmedia-utils"

#RDEPENDS of media-server (${PN})
RDEPENDS_${PN} += "vconf"

#RDEPENDS of libmedia-utils (libmedia-utils)
RDEPENDS_libmedia-utils += "media-server"


DEPENDS = ""
#DEPENDS of media-server
DEPENDS += "drm-client"
DEPENDS += "notification"
DEPENDS += "tizen-platform-config"
DEPENDS += "aul"
DEPENDS += "dlog"
DEPENDS += "glib-2.0"
DEPENDS += "system-server"
DEPENDS += "libslp-db-util"
DEPENDS += "sqlite3"
DEPENDS += "heynoti"
DEPENDS += "vconf"
DEPENDS += "dbus-glib"

do_prep() {
 cd ${S}
 chmod -Rf a+rX,u+w,g-w,o-w ${S}
 #setup -q
 cp ${S}/packaging/media-server.manifest ${S}/packaging/libmedia-utils.manifest ${S}/packaging/libmedia-utils-devel.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 ;
  
  rm -rf autom4te.cache
  rm -f aclocal.m4 ltmain.sh
  mkdir -p m4
  
  autotools_do_configure
  oe_runmake -j16
  
  
  
}
EXTRA_OECONF += " --prefix=${prefix} --disable-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 -- 
   find ${D} -regex ".*\.a$" | xargs rm -f --
 
 mkdir -p ${D}/lib/systemd/system/multi-user.target.wants
 install -m 644 ${S}/packaging/media-server.service ${D}/lib/systemd/system/media-server.service
 ln -s ../media-server.service ${D}/lib/systemd/system/multi-user.target.wants/media-server.service
 mkdir -p ${D}${prefix}/data/data-media/Camera
 mkdir -p ${D}${prefix}/data/data-media/Downloads
 mkdir -p ${D}${prefix}/data/data-media/Images
 mkdir -p ${D}${prefix}/data/data-media/Sounds/Voice\ recorder
 mkdir -p ${D}${prefix}/data/data-media/Videos
 mkdir -p ${D}${prefix}/data/data-media/file-manager-service/.thumb/mmc
 mkdir -p ${D}${prefix}/data/data-media/file-manager-service/.thumb/phone
 install -m 0775 ./data-media/Images/* ${D}${prefix}/data/data-media/Images/
 install -m 0775 ./data-media/dbspace/file-manager-service/.thumb/thumb_default.png ${D}${prefix}/data/data-media/file-manager-service/.thumb/
 install -D -m 0775 ./data-media/dbspace/file-manager-service/.thumb/mmc/* ${D}${prefix}/data/data-media/file-manager-service/.thumb/mmc/
 install -m 0775 ./data-media/dbspace/file-manager-service/.thumb/phone/PHONE_THUMB_HERE ${D}${prefix}/data/data-media/file-manager-service/.thumb/phone/
 install -m 0775 ./data-media/dbspace/file-manager-service/.thumb/phone/.jpg* ${D}${prefix}/data/data-media/file-manager-service/.thumb/phone/
 install -D -m 0775 ./data-media/dbspace/file-manager-service/* ${D}${prefix}/data/data-media/file-manager-service/
 install -m 0775 ${S}/packaging/media-data-sdk_create_db.sh ${D}${prefix}/bin/media-data-sdk_create_db.sh
 
 
}

pkg_postinst_libmedia-utils() {
    #!/bin/sh -e

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

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

    vconftool set -t int db/filemanager/dbupdate "1" -f
    vconftool set -t int memory/filemanager/Mmc "0" -i -f
    vconftool set -t string db/private/mediaserver/mmc_info "" -f
    vconftool set -t int file/private/mediaserver/scan_internal "1" -f
    vconftool set -t int file/private/mediaserver/scan_directory "1" -f
    chgrp users $D${prefix}/bin/media-data-sdk_create_db.sh
    chgrp -R users $D${prefix}/data/data-media

}

pkg_postrm_libmedia-utils() {
    #!/bin/sh -e

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

PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
PACKAGES += " libmedia-utils-dev "
PACKAGES += " media-server "
PACKAGES += " libmedia-utils "

libmedia-utils-dev_files = ""
libmedia-utils-dev_files += "${prefix}/lib/libmedia-utils.so"
libmedia-utils-dev_files += "${prefix}/lib/pkgconfig/libmedia-utils.pc"
libmedia-utils-dev_files += "${prefix}/include/media-utils/*.h"
MANIFESTFILES_libmedia-utils-dev = "libmedia-utils-devel.manifest"

media-server_files = ""
media-server_files += "${prefix}/bin/media-server"
media-server_files += "${prefix}/bin/media-scanner"
media-server_files += "${prefix}/bin/mediadb-update"
media-server_files += "/lib/systemd/system/media-server.service"
media-server_files += "/lib/systemd/system/multi-user.target.wants/media-server.service"
media-server_files += "${prefix}/bin/media-data-sdk_create_db.sh"
media-server_files += "${prefix}/data/data-media/*"
media-server_files += "${prefix}/data/data-media/file-manager-service/.thumb/*"
MANIFESTFILES_${PN} = "media-server.manifest"

libmedia-utils_files = ""
libmedia-utils_files += "${prefix}/lib/libmedia-utils.so.0"
libmedia-utils_files += "${prefix}/lib/libmedia-utils.so.0.0.0"
MANIFESTFILES_libmedia-utils = "libmedia-utils.manifest"

FILES_libmedia-utils-dev = "${libmedia-utils-dev_files}"
FILES_${PN} = "${media-server_files}"
FILES_libmedia-utils = "${libmedia-utils_files}"

PKG_libmedia-utils-dev= "libmedia-utils-dev"
PKG_media-server= "media-server"
PKG_libmedia-utils= "libmedia-utils"

require media-server-extraconf.inc