aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/openmoko-projects/paroli_git.bb
blob: eb6e8d80abd2650af000a22e1020620cbc247bed (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
DESCRIPTION = "Paroli"
SECTION = "x11"
LICENSE = "GPL"
SRCREV = "bb9fb1969acdfbaa48b55902675a6d8949014c6d"
PV = "0.2.1+gitr${SRCPV}"
PE = "1"
PR = "r2"

SRC_URI = "git://git.paroli-project.org/paroli.git;protocol=http;branch=shr"
S = "${WORKDIR}/git"

inherit distutils

PACKAGES += "${PN}-autostart ${PN}-theme ${PN}-sounds ${PN}-calculator"

RDEPENDS_${PN} = "\
  python-datetime \
  python-subprocess \
  python-textutils \
  python-dbus \
  python-pygobject \
  python-elementary \
  dbus-x11 \
  task-fso-compliance \
  elementary \
  elementary-themes \
  edbus \
"

E_CONFIG_DIR="/usr/share/enlightenment/data"

RULES_YAML = rules.yaml
RULES_YAML_om-gta01 = gta01_rules.yaml

do_configure_append() {
	# fix absolute etc reference
	sed -i "s|/etc/|../../etc/|" ${S}/setup.py
	sed -i "s|prefix,|'../../usr/',|" ${S}/setup.py
	sed -i "s|core/|${PYTHON_SITEPACKAGES_DIR}/|" ${S}/scripts/paroli
	sed -i "s|services|/usr/share/paroli/services|" ${S}/scripts/paroli.fso.cfg
	sed -i "s|applications|/usr/share/paroli/applications|" ${S}/scripts/paroli.fso.cfg
}

do_install_append() {
#	install ${D}${sysconfdir}/paroli/paroli.fso.cfg ${D}${sysconfdir}/paroli/paroli.cfg

       	# install paroli theme
       	install -d ${D}${E_CONFIG_DIR}/themes
       	install ${S}/data/e-config/paroli.edj ${D}${E_CONFIG_DIR}/themes/
       	install ${S}/data/e-config/serenity.edj ${D}${E_CONFIG_DIR}/themes/
       	install -d ${D}${E_CONFIG_DIR}/config/paroli
       	install ${S}/data/e-config/paroli/* ${D}${E_CONFIG_DIR}/config/paroli/
       	install -d ${D}${E_CONFIG_DIR}/config/paroli-serenity
       	install ${S}/data/e-config/paroli-serenity/* ${D}${E_CONFIG_DIR}/config/paroli-serenity/

	install -d ${D}${datadir}/elementary/themes
	install ${S}/data/paroli.edj ${D}${datadir}/elementary/themes

   	install -d ${D}${datadir}/icons
	install ${S}/data/paroli.png ${D}${datadir}/icons

   	install -d ${D}${datadir}/applications	
	install ${S}/data/paroli.desktop ${D}${datadir}/applications

       	# install autostart
    	install -d ${D}${E_CONFIG_DIR}/applications/all
	cp ${D}/usr/share/applications/paroli.desktop ${D}${E_CONFIG_DIR}/applications/all
    	install -d ${D}${E_CONFIG_DIR}/applications/startup
       	echo "${E_CONFIG_DIR}/applications/all/paroli.desktop" >> ${D}${E_CONFIG_DIR}/applications/startup/.order

#	install -d ${D}${sysconfdir}/freesmartphone/oevents
#	install ${S}/data/${RULES_YAML} ${D}${sysconfdir}/freesmartphone/oevents/paroli_rules.yaml
#	install ${S}/data/frameworkd.conf ${D}${sysconfdir}/paroli_frameworkd.conf

	install -d ${D}${sysconfdir}/freesmartphone/opreferences/conf/phone
	install ${S}/data/default.yaml ${D}${sysconfdir}/freesmartphone/opreferences/conf/phone/default.yaml

	install -d ${D}${datadir}/dbus-1/system-services/
	install ${S}/data/dbus/org.tichy.launcher.service ${D}${datadir}/dbus-1/system-services/

	install -d ${D}${datadir}/sounds
	install ${S}/data/sounds/* ${D}${datadir}/sounds

}

pkg_postinst_${PN}-autostart() {
#!/bin/sh
# do this off or on line
if [ "x$D" != "x" ]; then
	ROOTFS=${IMAGE_ROOTFS}
else
	ROOTFS=""
fi

# post installation script
if [ -x $ROOTFS${sysconfdir}/X11/Xsession.d/80zhone ]; then
   echo "*******************************************"
   echo "Deactivating zhone autostart"
   echo "*******************************************"
   chmod -x $ROOTFS${sysconfdir}/X11/Xsession.d/80zhone || true
fi
exit 0
}

#pkg_postinst_${PN}-sounds() {
#!/bin/sh
# do this off or on line
#if [ "x$D" != "x" ]; then
#	ROOTFS=${IMAGE_ROOTFS}
#else
#	ROOTFS=""
#fi
# post installation script
#if [ ! -e /$ROOTFS${sysconfdir}/freesmartphone/opreferences/conf/phone/old_default.yaml ] ; then
#    echo "Backing up ${sysconfdir}/freesmartphone/opreferences/conf/phone/default.yaml"
#    mv $ROOTFS${sysconfdir}/freesmartphone/opreferences/conf/phone/default.yaml $ROOTFS${sysconfdir}/freesmartphone/opreferences/conf/phone/old_default.yaml
#fi
#cp $ROOTFS${sysconfdir}/freesmartphone/opreferences/conf/phone/paroli_default.yaml $ROOTFS${sysconfdir}/freesmartphone/opreferences/conf/phone/default.yaml
#exit 0
#}

pkg_postinst_${PN}-theme() {
#!/bin/sh
# do this off or on line
if [ "x$D" != "x" ]; then
	ROOTFS=${IMAGE_ROOTFS}
else
	ROOTFS=""
fi
# post installation script
echo 'E_PROFILE="-profile paroli"' > $ROOTFS${sysconfdir}/enlightenment/default_profile
exit 0
}

FILES_${PN} = " \
	${sysconfdir}/dbus-1 \
	${sysconfdir}/paroli \
	${sysconfdir}/freesmartphone/oevents \
	${prefix}/lib \
	${prefix}/bin \
	${datadir}/paroli/applications/common-for-edje \
	${datadir}/paroli/applications/inout \
	${datadir}/paroli/applications/telephony \
	${datadir}/paroli/applications/messages \
	${datadir}/paroli/applications/launcher \
	${datadir}/paroli/applications/people \
	${datadir}/paroli/applications/settings \
	${datadir}/applications \
	${datadir}/elementary \
	${datadir}/paroli/services \
	${datadir}/paroli/data \
	${datadir}/pixmaps \
	${datadir}/icons \
	${datadir}/dbus-1/system-services/ \
	"

FILES_${PN}-theme = " \
	${E_CONFIG_DIR}/themes \
	${E_CONFIG_DIR}/config \
	"

FILES_${PN}-autostart = "${E_CONFIG_DIR}/applications"

FILES_${PN}-sounds = " \
	${datadir}/sounds/ \
	${sysconfdir}/freesmartphone/opreferences/conf/phone/default.yaml \
	"

FILES_${PN}-calculator = " \
	${datadir}/paroli/applications/calculator \
	"

CONFFILES_${PN} += " \
	${sysconfdir}/paroli/paroli.fallback.cfg \
	${sysconfdir}/paroli/paroli.pyneo.cfg \
	${sysconfdir}/paroli/paroli.fso.cfg \
	"
CONFFILES_${PN}-sounds += " \
	${sysconfdir}/freesmartphone/opreferences/conf/phone/default.yaml \
	"