surpport seeking the recorded video
[vuplus_openembedded] / recipes / openmoko-projects / paroli_git.bb
1 DESCRIPTION = "Paroli"
2 SECTION = "x11"
3 LICENSE = "GPL"
4 PV = "0.2.1+gitr${SRCREV}"
5 PE = "1"
6 PR = "r0"
7
8 SRC_URI = "git://git.paroli-project.org/paroli.git;protocol=http;branch=shr"
9 S = "${WORKDIR}/git"
10
11 inherit distutils
12
13 PACKAGES += "${PN}-autostart ${PN}-theme ${PN}-sounds ${PN}-calculator"
14
15 RDEPENDS = "\
16   python-datetime \
17   python-subprocess \
18   python-textutils \
19   python-dbus \
20   python-pygobject \
21   python-elementary \
22   dbus-x11 \
23   task-fso-compliance \
24   elementary \
25   elementary-themes \
26   edbus-ehal \
27 "
28
29 E_CONFIG_DIR="/usr/share/enlightenment/data"
30
31 RULES_YAML = rules.yaml
32 RULES_YAML_om-gta01 = gta01_rules.yaml
33
34 do_configure_append() {
35         # fix absolute etc reference
36         sed -i "s|/etc/|../../etc/|" ${S}/setup.py
37         sed -i "s|prefix,|'../../usr/',|" ${S}/setup.py
38         sed -i "s|core/|/usr/lib/python2.6/site-packages/|" ${S}/scripts/paroli
39         sed -i "s|services|/usr/share/paroli/services|" ${S}/scripts/paroli.fso.cfg
40         sed -i "s|applications|/usr/share/paroli/applications|" ${S}/scripts/paroli.fso.cfg
41 }
42
43 do_install_append() {
44 #       install ${D}${sysconfdir}/paroli/paroli.fso.cfg ${D}${sysconfdir}/paroli/paroli.cfg
45
46         # install paroli theme
47         install -d ${D}${E_CONFIG_DIR}/themes
48         install ${S}/data/e-config/paroli.edj ${D}${E_CONFIG_DIR}/themes/
49         install ${S}/data/e-config/serenity.edj ${D}${E_CONFIG_DIR}/themes/
50         install -d ${D}${E_CONFIG_DIR}/config/paroli
51         install ${S}/data/e-config/paroli/* ${D}${E_CONFIG_DIR}/config/paroli/
52         install -d ${D}${E_CONFIG_DIR}/config/paroli-serenity
53         install ${S}/data/e-config/paroli-serenity/* ${D}${E_CONFIG_DIR}/config/paroli-serenity/
54
55         install -d ${D}${datadir}/elementary/themes
56         install ${S}/data/paroli.edj ${D}${datadir}/elementary/themes
57
58         install -d ${D}${datadir}/icons
59         install ${S}/data/paroli.png ${D}${datadir}/icons
60
61         install -d ${D}${datadir}/applications  
62         install ${S}/data/paroli.desktop ${D}${datadir}/applications
63
64         # install autostart
65         install -d ${D}${E_CONFIG_DIR}/applications/all
66         cp ${D}/usr/share/applications/paroli.desktop ${D}${E_CONFIG_DIR}/applications/all
67         install -d ${D}${E_CONFIG_DIR}/applications/startup
68         echo "${E_CONFIG_DIR}/applications/all/paroli.desktop" >> ${D}${E_CONFIG_DIR}/applications/startup/.order
69
70 #       install -d ${D}${sysconfdir}/freesmartphone/oevents
71 #       install ${S}/data/${RULES_YAML} ${D}${sysconfdir}/freesmartphone/oevents/paroli_rules.yaml
72 #       install ${S}/data/frameworkd.conf ${D}${sysconfdir}/paroli_frameworkd.conf
73
74         install -d ${D}${sysconfdir}/freesmartphone/opreferences/conf/phone
75         install ${S}/data/default.yaml ${D}${sysconfdir}/freesmartphone/opreferences/conf/phone/default.yaml
76
77         install -d ${D}${datadir}/dbus-1/system-services/
78         install ${S}/data/dbus/org.tichy.launcher.service ${D}${datadir}/dbus-1/system-services/
79
80         install -d ${D}${datadir}/sounds
81         install ${S}/data/sounds/* ${D}${datadir}/sounds
82
83 }
84
85 pkg_postinst_${PN}-autostart() {
86 #!/bin/sh
87 # do this off or on line
88 if [ "x$D" != "x" ]; then
89         ROOTFS=${IMAGE_ROOTFS}
90 else
91         ROOTFS=""
92 fi
93
94 # post installation script
95 if [ -x $ROOTFS${sysconfdir}/X11/Xsession.d/80zhone ]; then
96    echo "*******************************************"
97    echo "Deactivating zhone autostart"
98    echo "*******************************************"
99    chmod -x $ROOTFS${sysconfdir}/X11/Xsession.d/80zhone || true
100 fi
101 exit 0
102 }
103
104 #pkg_postinst_${PN}-sounds() {
105 #!/bin/sh
106 # do this off or on line
107 #if [ "x$D" != "x" ]; then
108 #       ROOTFS=${IMAGE_ROOTFS}
109 #else
110 #       ROOTFS=""
111 #fi
112 # post installation script
113 #if [ ! -e /$ROOTFS${sysconfdir}/freesmartphone/opreferences/conf/phone/old_default.yaml ] ; then
114 #    echo "Backing up ${sysconfdir}/freesmartphone/opreferences/conf/phone/default.yaml"
115 #    mv $ROOTFS${sysconfdir}/freesmartphone/opreferences/conf/phone/default.yaml $ROOTFS${sysconfdir}/freesmartphone/opreferences/conf/phone/old_default.yaml
116 #fi
117 #cp $ROOTFS${sysconfdir}/freesmartphone/opreferences/conf/phone/paroli_default.yaml $ROOTFS${sysconfdir}/freesmartphone/opreferences/conf/phone/default.yaml
118 #exit 0
119 #}
120
121 pkg_postinst_${PN}-theme() {
122 #!/bin/sh
123 # do this off or on line
124 if [ "x$D" != "x" ]; then
125         ROOTFS=${IMAGE_ROOTFS}
126 else
127         ROOTFS=""
128 fi
129 # post installation script
130 echo 'E_PROFILE="-profile paroli"' > $ROOTFS${sysconfdir}/enlightenment/default_profile
131 exit 0
132 }
133
134 FILES_${PN} = " \
135         ${sysconfdir}/dbus-1 \
136         ${sysconfdir}/paroli \
137         ${sysconfdir}/freesmartphone/oevents \
138         ${prefix}/lib \
139         ${prefix}/bin \
140         ${datadir}/paroli/applications/common-for-edje \
141         ${datadir}/paroli/applications/inout \
142         ${datadir}/paroli/applications/telephony \
143         ${datadir}/paroli/applications/messages \
144         ${datadir}/paroli/applications/launcher \
145         ${datadir}/paroli/applications/people \
146         ${datadir}/paroli/applications/settings \
147         ${datadir}/applications \
148         ${datadir}/elementary \
149         ${datadir}/paroli/services \
150         ${datadir}/paroli/data \
151         ${datadir}/pixmaps \
152         ${datadir}/icons \
153         ${datadir}/dbus-1/system-services/ \
154         "
155
156 FILES_${PN}-theme = " \
157         ${E_CONFIG_DIR}/themes \
158         ${E_CONFIG_DIR}/config \
159         "
160
161 FILES_${PN}-autostart = "${E_CONFIG_DIR}/applications"
162
163 FILES_${PN}-sounds = " \
164         ${datadir}/sounds/ \
165         ${sysconfdir}/freesmartphone/opreferences/conf/phone/default.yaml \
166         "
167
168 FILES_${PN}-calculator = " \
169         ${datadir}/paroli/applications/calculator \
170         "
171
172 CONFFILES_${PN} += " \
173         ${sysconfdir}/paroli/paroli.fallback.cfg \
174         ${sysconfdir}/paroli/paroli.pyneo.cfg \
175         ${sysconfdir}/paroli/paroli.fso.cfg \
176         "
177 CONFFILES_${PN}-sounds += " \
178         ${sysconfdir}/freesmartphone/opreferences/conf/phone/default.yaml \
179         "