Tizen recipes : Fix tizen common build and get little more closer to current Tizen...
[scm/bb/meta-tizen.git] / meta-tizen-ivi / meta-tizen-common-base / recipes-multimedia / avsystem / avsystem.inc
1 DESCRIPTION = "Audio Video System"
2 HOMEPAGE = "http://nohomepage.org"
3 SECTION = "System/Libraries"
4 LICENSE = "Apache-2.0"
5 PV = "0.5.5"
6
7 SRC_URI = ""
8
9 S = "${WORKDIR}/git"
10
11 inherit manifest autotools-brokensep
12
13 BBCLASSEXTEND = ""
14 PROVIDES = ""
15
16 #PROVIDES by avsystem
17
18
19 #PROVIDES by avsystem-dev
20 PROVIDES += "avsystem-dev"
21
22
23 #PROVIDES by libavsysaudio
24 PROVIDES += "libavsysaudio"
25
26
27 RDEPENDS = ""
28 #RDEPENDS of avsystem (${PN})
29 RDEPENDS_${PN} += "glibc"
30 RDEPENDS_${PN} += "systemd"
31
32 #RDEPENDS of avsystem-dev (${PN}-dev)
33 RDEPENDS_${PN}-dev += "avsystem"
34
35
36 DEPENDS = ""
37 #DEPENDS of avsystem
38 DEPENDS += "alsa-lib"
39 DEPENDS += "libmm-log"
40 inherit pkgconfig
41 DEPENDS += "iniparser"
42 DEPENDS += "pulseaudio"
43 DEPENDS += "libexif"
44 DEPENDS += "libmm-ta"
45 DEPENDS += "alsa-scenario"
46
47 do_prep() {
48  cd ${S}
49  chmod -Rf a+rX,u+w,g-w,o-w ${S}
50  #setup -q -n avsystem-0.5.5
51  cp ${S}/packaging/avsystem.manifest .
52  
53  
54  
55 }
56 do_patch_append() {
57     bb.build.exec_func('do_prep', d)
58 }
59
60 do_configure() {
61 }
62
63 do_compile() {
64  cd ${S}
65   LANG=C
66   export LANG
67   unset DISPLAY
68   LD_AS_NEEDED=1; export LD_AS_NEEDED ;
69   
70   
71   autotools_do_configure
72   
73   oe_runmake -j16
74   
75   
76   
77   
78 }
79 EXTRA_OECONF += " --enable-audiotest"
80
81 do_install() {
82  export RPM_BUILD_ROOT=${D}
83  cd ${S}
84  LANG=C
85  export LANG
86  unset DISPLAY
87  rm -rf ${D}
88  mkdir -p ${D}
89  
90  
91    oe_runmake \
92          DESTDIR=${D} \
93          INSTALL_ROOT=${D} \
94          BINDIR=${prefix}/bin \
95    install  
96    rm -f ${D}${infodir}/dir 
97    find ${D} -regex ".*\.la$" | xargs rm -f -- 
98    find ${D} -regex ".*\.a$" | xargs rm -f --
99  
100  mkdir -m 755 -p ${D}${systemd_unitdir}/system/multi-user.target.wants
101  install -m 0644 ${S}/packaging/avsystem.service ${D}${systemd_unitdir}/system/avsystem.service
102  ln -sf ../avsystem.service ${D}${systemd_unitdir}/system/multi-user.target.wants/avsystem.service
103  
104  
105  
106 }
107
108 pkg_postinst_libavsysaudio() {
109     #!/bin/sh -e
110
111     [ "x$D" == "x" ] && ldconfig
112
113 }
114
115 pkg_postinst_${PN}() {
116     #!/bin/sh -e
117
118     systemctl daemon-reload
119     if [ $1 == 1 ]; then
120         systemctl restart avsystem.service
121     fi
122
123 }
124
125 pkg_prerm_${PN}() {
126     #!/bin/sh -e
127
128     if [ $1 == 0 ]; then
129         systemctl stop avsystem.service
130     fi
131
132 }
133
134 pkg_postrm_libavsysaudio() {
135     #!/bin/sh -e
136
137     [ "x$D" == "x" ] && ldconfig
138
139 }
140
141 pkg_postrm_${PN}() {
142     #!/bin/sh -e
143
144     systemctl daemon-reload
145
146 }
147
148 PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
149 PACKAGES += " avsystem "
150 PACKAGES += " avsystem-dev "
151 PACKAGES += " libavsysaudio "
152
153 avsystem_files = ""
154 avsystem_files += "${prefix}/bin/*"
155 avsystem_files += "${systemd_unitdir}/system/avsystem.service"
156 avsystem_files += "${systemd_unitdir}/system/multi-user.target.wants/avsystem.service"
157 MANIFESTFILES_${PN} = "avsystem.manifest"
158
159 avsystem-dev_files = ""
160 avsystem-dev_files += "${prefix}/lib/pkgconfig/*.pc"
161 avsystem-dev_files += "${prefix}/lib/*.so"
162 avsystem-dev_files += "${prefix}/include/avsystem/*.h"
163 MANIFESTFILES_${PN}-dev = "avsystem.manifest"
164
165 libavsysaudio_files = ""
166 libavsysaudio_files += "${prefix}/lib/lib*.so.*"
167 MANIFESTFILES_libavsysaudio = "avsystem.manifest"
168
169 FILES_${PN} = "${avsystem_files}"
170 FILES_${PN}-dev = "${avsystem-dev_files}"
171 FILES_libavsysaudio = "${libavsysaudio_files}"
172
173 PKG_avsystem= "avsystem"
174 PKG_avsystem-dev= "avsystem-dev"
175 PKG_libavsysaudio= "libavsysaudio"
176
177 require avsystem-extraconf.inc
178