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

from distutils.command.install_scripts import install_scripts

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):
		from os import symlink
		from distutils.util import change_root
		from distutils import log
		install_scripts.run(self)
		for tool in self.symlink_tools:
			s = self.install_dir + '/' + tool
			log.info("Creating symlink %s -> run-java-tool" % s)
			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.1',
	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/man/man1', ['man/java-config-2.1']),
		('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: