Merge remote-tracking branch 'origin/master' into erp5testnode
[slapos.git] / component / opera / buildout.cfg
1 [buildout]
2 # Work in progress
3 extends = 
4   ../xorg/buildout.cfg
5   ../fontconfig/buildout.cfg
6   ../dbus/buildout.cfg
7   ../gtk-2/buildout.cfg
8   ../libpng/buildout.cfg
9
10 parts = 
11   opera
12   
13 [opera]
14 recipe = slapos.recipe.build
15 slapos_promise =
16   file:opera
17
18 depends = 
19   ${liberation-fonts:location}
20   ${ipaex-fonts:location}
21
22 x86 = http://arc.opera.com/pub/opera/linux/1151/opera-11.51-1087.i386.linux.tar.bz2 91db21fc001e736a6432627fbf93062f
23 x86-64 = todohttp://arc.opera.com/pub/opera/linux/1151/opera-11.51-1087.i386.linux.tar.bz2 91db21fc001e736a6432627fbf93062f
24
25 script =
26   if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
27   extract_dir = self.extract(self.download(self.options['url'], self.options.get('md5sum')))
28   workdir = guessworkdir(extract_dir)
29   self.copyTree(workdir, "%(location)s")
30   wrapper_location = os.path.join("%(location)s", "opera-slapos")
31   wrapper = open(wrapper_location, 'w')
32   wrapper.write("""#!/bin/sh
33   cd %(location)s
34   export LD_LIBRARY_PATH=${libXrender:location}/lib/:${fontconfig:location}/lib/:${dbus:location}/lib/:${dbus-glib:location}/lib/:${pango:location}/lib:${cairo:location}/lib:${glib:location}/lib:${gtk-2:location}/lib:${atk:location}/lib:${gdk-pixbuf:location}/lib:${libXt:location}/lib:${libpng15:location}/lib:${libSM:location}/lib:${libICE:location}/lib:%(location)s
35   export PATH=${fontconfig:location}/bin:$PATH
36   %(location)s/opera $*""")
37   wrapper.close()
38   profile_directory = os.path.join("%(location)s", "profile")
39   os.mkdir(profile_directory)
40   opera_config = open(os.path.join(profile_directory, "opera6.ini"), "w")
41   opera_config.write("""[State]
42   Reading Plugins=0
43   Accept License=1
44   Run=0""")
45   opera_config.close()
46   os.chmod(wrapper_location, 0766)
47