<commit_before>configure_flags = [
	'--disable-mtp',
	'--disable-daap',
	'--disable-ipod',
	'--disable-boo',
	'--disable-gnome',
	'--disable-docs',
	'--enable-osx'
]

package = {
	'name':    'banshee-1',
	'version': '1.5.2',
	'sources': [],
	'prep': [
		'cd ../../../../..',
	],
	'build': [
		'cp configure.ac configure.ac.orig',
		'grep -v AM_GCONF_SOURCE_2 < configure.ac.orig > configure.ac',
		'./autogen.sh --prefix=%{_prefix} ' + ' '.join (configure_flags),
		'mv configure.ac.orig configure.ac',
		'%{__make}'
	],
	'install': []
}<commit_msg>[build] use some internal functions as build phase steps<commit_after>configure_flags = [
	'--disable-mtp',
	'--disable-daap',
	'--disable-ipod',
	'--disable-boo',
	'--disable-gnome',
	'--disable-docs',
	'--enable-osx'
]

def change_to_gitdir (*args):
	last_pwd = ''
	while not os.path.isdir ('.git'):
		os.chdir ('..')
		if last_pwd == os.getcwd ():
			break
		last_pwd = os.getcwd ()

def overwrite_launcher_script (package):
	install_bin_path = os.path.join (package['_prefix'], 'bin')
	install_lib_path = os.path.join (package['_prefix'], 'lib')

	fp = open (os.path.join (install_bin_path, 'banshee-1'), 'w')
	fp.write ('#!/usr/bin/env bash\n')
	fp.write ('export LD_LIBRARY_PATH="%s"\n' % install_lib_path)
	fp.write ('%s %s' % (os.path.join (install_bin_path, 'mono'),
		os.path.join (install_lib_path, 'banshee-1', 'Nereid.exe')))
	fp.close ()

package = {
	'name':    'banshee-1',
	'version': '1.5.2',
	'sources': [],
	'prep': [
		change_to_gitdir
	],
	'build': [
		'cp configure.ac configure.ac.orig',
		'grep -v AM_GCONF_SOURCE_2 < configure.ac.orig > configure.ac',
		'./autogen.sh --prefix=%{_prefix} ' + ' '.join (configure_flags),
		'mv configure.ac.orig configure.ac',
		'%{__make}'
	],
	'install': [
		'%{__makeinstall}',
		overwrite_launcher_script
	]
}
{'fraction_non_alphanumeric': 0.2291208791208791, 'fraction_numerical': 0.006593406593406593, 'mean_word_length': 3.669230769230769, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4205870', 'n_tokens_mistral': 797, 'n_tokens_neox': 759, 'n_words': 128}