Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into...
[vuplus_openembedded] / packages / images / fso-image.bb
1 #------------------------------------------------------
2 # freesmartphone.org Image Recipe
3 #------------------------------------------------------
4
5 PV = "1.1"
6 PR = "r4"
7
8 # no languages for now
9 IMAGE_LINGUAS = ""
10
11 BASE_INSTALL = "\
12   task-base \
13 "
14
15 ILLUME_THEME = "illume-theme-freesmartphone"
16
17 X_INSTALL = "\
18   task-x11-illume \
19   task-fonts-truetype-core \
20 "
21
22 X_INSTALL_append_om-gta02 = "\
23   task-fonts-truetype-chinese \
24   task-fonts-truetype-japanese \
25 "
26
27 # tools
28 TOOLS_INSTALL = "\
29   task-cli-tools \
30   task-cli-tools-python \
31 "
32
33 # audio
34 AUDIO_INSTALL = "\
35   alsa-oss \
36   alsa-state \
37   alsa-utils-aplay \
38   alsa-utils-amixer \
39   gst-meta-audio \
40   gst-plugin-modplug \
41   gst-plugin-sid \
42   ${@base_conditional('ENTERPRISE_DISTRO', '1', '', 'gst-plugin-mad', d)} \
43   fso-sounds \
44 "
45
46 GTK_INSTALL = "\
47   hicolor-icon-theme \
48   tango-icon-theme \
49   openmoko-calculator2 \
50   vala-terminal \
51   gpe-scap \
52   tangogps \
53 "
54
55 GAMES_INSTALL = "\
56   numptyphysics \
57 "
58
59 # FIXME these should rather be part of alsa-state,
60 # once Om stabilizes them...
61 AUDIO_INSTALL_append_om-gta01 = "\
62   openmoko-alsa-scenarios \
63 "
64 AUDIO_INSTALL_append_om-gta02 = "\
65   openmoko-alsa-scenarios \
66 "
67
68 # python
69 PYTHON_INSTALL = "\
70   task-python-efl \
71   python-codecs \
72   python-gst \
73 "
74
75 # fso+zhone
76 ZHONE_INSTALL = "\
77   task-fso-compliance \
78   zhone \
79 "
80
81 # additional apps
82 APPS_INSTALL = "\
83   paroli \
84   gpe-gallery \
85   gpe-sketchbook \
86   gpe-filemanager \
87   ${@base_conditional('ENTERPRISE_DISTRO', '1', '', 'vagalume', d)} \
88   starling \
89 "
90
91 IMAGE_INSTALL = "\
92   ${BASE_INSTALL} \
93   ${X_INSTALL} \
94   ${GTK_INSTALL} \
95   ${GAMES_INSTALL} \
96   ${AUDIO_INSTALL} \
97   ${TOOLS_INSTALL} \
98   ${PYTHON_INSTALL} \
99   ${ZHONE_INSTALL} \
100   ${APPS_INSTALL} \
101 "
102
103 inherit image
104
105 # perform some convenience tweaks to the rootfs to improve the out-of-the-box experience :M:
106 fso_rootfs_postprocess() {
107     curdir=$PWD
108     cd ${IMAGE_ROOTFS}
109     # date/time
110     date "+%m%d%H%M%Y" >./etc/timestamp
111     # alias foo
112     echo "alias pico=nano" >>./etc/profile
113     echo "alias fso='cd /local/pkg/fso'" >>./etc/profile
114     echo "alias ipkg='opkg'" >>./etc/profile
115     echo "alias vim=vi" >>./etc/profile
116     echo "alias ll='ls -al'" >>./etc/profile
117     # nfs
118     mkdir -p ./local/pkg
119     echo >>./etc/fstab
120     echo "# NFS Host" >>./etc/fstab
121     echo "192.168.0.200:/local/pkg /local/pkg nfs noauto,nolock,soft,rsize=32768,wsize=32768 0 0" >>./etc/fstab
122     # fix .desktop files for illume
123     desktop=`find ./usr/share/applications -name "*.desktop"`
124     for file in $desktop; do
125         echo "Categories=Office;" >>$file
126     done
127     # minimal gtk theme foo
128     mkdir -p ./etc/gtk-2.0/
129     echo 'gtk-font-name = "Sans 5"' >> ./etc/gtk-2.0/gtkrc
130     echo 'gtk-icon-theme-name = "Tango"' >> ./etc/gtk-2.0/gtkrc
131     # fix strange iconv/gconf bug
132     ln -s libc.so.6 ./lib/libc.so
133     # set sensible default DNS entries
134     echo "nameserver 208.67.222.222" > ./etc/resolv.conf
135     echo "nameserver 208.67.220.220" >> ./etc/resolv.conf
136     # remove autostart of gspd (if installed), we have fso-gpsd and this conflicts
137     rm -f ./etc/init.d/gpsd
138     # silence printk
139     mkdir -p ./etc/profile.d/
140     echo "echo 0 0 0 0 >/proc/sys/kernel/printk" >./etc/profile.d/printk.sh
141     chmod a+rx ./etc/profile.d/printk.sh
142     # back on track
143     cd $curdir
144 }
145
146 ROOTFS_POSTPROCESS_COMMAND += "fso_rootfs_postprocess"