aboutsummaryrefslogtreecommitdiff
blob: e5b4a1b97443a08d63140fcbdb30499fee708530 (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
#!/usr/bin/env python

from distutils.command.install_scripts import install_scripts
from distutils import log
import os

class my_install_scripts(install_scripts):
	"""Specialized data file install to handle our symlinks"""
	install_scripts.user_options.append(('symlink-tools=', None,
		'List if files to symlink to run-java-tool in script directory'))

	def initialize_options(self):
		install_scripts.initialize_options(self)
		self.symlink_tools = None

	def finalize_options(self):
		install_scripts.finalize_options(self)
		self.ensure_string_list('symlink_tools')
		
	def run(self):
		install_scripts.run(self)
		for tool in self.symlink_tools:
			s = self.install_dir + '/' + tool
			log.info("symbolically linking %s -> %s" % ('run-java-tool',s))
			if not self.dry_run:
				#copy_file is not able to handle relative symlinks with --root
				os.symlink('run-java-tool',s)

from distutils.core import setup
from glob import glob

setup (
	cmdclass={'install_scripts': my_install_scripts},
	name = 'java-config',
	version = '2.1.10',
	description = 'java enviroment configuration tool',
	long_description = \
	"""
		java-config is a tool for configuring various enviroment
		variables and configuration files involved in the java
		enviroment for Gentoo Linux.
	""",
	maintainer = 'Gentoo Java Team',
	maintainer_email = 'java@gentoo.org',
	url = 'http://www.gentoo.org',
	packages = ['java_config_2'],
	package_dir = { 'java_config_2' : 'src/java_config_2' },
	scripts = ['src/java-config-2','src/depend-java-query','src/run-java-tool', 'src/gjl'],
	data_files = [
		('share/java-config-2/pym/java_config/', glob('src/java_config/*')),
		('share/applications/', ['data/javaws.desktop']),
		('share/mimelnk/application/', ['data/x-java-jnlp-file.desktop']),
		('share/icons/hicolor/48x48/mimetypes/', ['data/application-x-java-jnlp-file.png']),
		('share/pixmaps/', ['data/java-icon48.png']),
		('share/java-config-2/launcher', ['src/launcher.bash']),
		('share/eselect/modules', glob('src/eselect/*.eselect')),
		('/etc/java-config-2/', ['config/virtuals']),
		('/etc/java-config-2/build/', ['config/jdk.conf','config/compilers.conf']),
		('/etc/env.d/',['config/20java-config']),
		('/etc/profile.d/', glob('src/profile.d/*')),
		('/etc/revdep-rebuild/', ['src/revdep-rebuild/60-java'])
	]
)

# vim: noet:ts=4: