[buildout]

parts = 
  qt
  
[qt]
recipe = slapos.recipe.build
slapos_promisee =
  file:plop

# Online installer
x86 = http://get.qt.nokia.com/qtsdk/Qt_SDK_Lin32_online_v1_1_3_en.run eae2e2a1396fec1369b66c71d7df6eab
x86-64 =  http://get.qt.nokia.com/qtsdk/Qt_SDK_Lin64_online_v1_1_3_en.run a4d929bc4d6511290c07c3745477b77b
# Offline installer
#x86 = http://get.qt.nokia.com/qtsdk/Qt_SDK_Lin32_offline_v1_1_3_en.run 106fdae4ec8947c491ab0a827a02da12
#x86-64 = http://get.qt.nokia.com/qtsdk/Qt_SDK_Lin64_offline_v1_1_3_en.run 8c280beb11ee763840464572ed80e8b8

# Needs many dependencies.

script =
  if not self.options.get('url'): self.options['url'], self.options['md5sum'] = self.options[guessPlatform()].split(' ')
  download_file = self.download(self.options['url'], self.options.get('md5sum'))
  extract_dir = tempfile.mkdtemp(self.name)
  os.chdir(extract_dir)
  (download_dir, filename) = os.path.split(download_file)
  auto_extract_bin = os.path.join(extract_dir, filename)
  shutil.move(download_file, auto_extract_bin)
  os.chmod(auto_extract_bin, 0755)
  subprocess.call([auto_extract_bin])
  self.cleanup_list.append(extract_dir)
  workdir = guessworkdir(extract_dir)
  import pdb; pdb.set_trace()
  self.copyTree(os.path.join(workdir, "jre1.6.0_27"), "%(location)s")



#ldd qt.run
#	linux-gate.so.1 =>  (0xb7827000)
#	libutil.so.1 => /lib/i686/cmov/libutil.so.1 (0xb781c000)
#	libgobject-2.0.so.0 => not found
#	libSM.so.6 => not found
#	libICE.so.6 => not found
#	libXrender.so.1 => not found
#	libfontconfig.so.1 => not found
#	libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb77a4000)
#	libz.so.1 => /usr/lib/libz.so.1 (0xb778f000)
#	libXext.so.6 => /usr/lib/libXext.so.6 (0xb7780000)
#	libX11.so.6 => /usr/lib/libX11.so.6 (0xb7663000)
#	libdl.so.2 => /lib/i686/cmov/libdl.so.2 (0xb765f000)
#	libgthread-2.0.so.0 => not found
#	librt.so.1 => /lib/i686/cmov/librt.so.1 (0xb7655000)
#	libglib-2.0.so.0 => not found
#	libpthread.so.0 => /lib/i686/cmov/libpthread.so.0 (0xb763c000)
#	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb754d000)
#	libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7527000)
#	libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb7508000)
#	libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb73c2000)
#	libxcb.so.1 => /usr/lib/libxcb.so.1 (0xb73a9000)
#	/lib/ld-linux.so.2 (0xb7828000)
#	libXau.so.6 => /usr/lib/libXau.so.6 (0xb73a6000)
#	libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb73a1000)