#! /usr/bin/env python
## This script demonstrates how to build and install
## a complex kde program having a kparts shell
## with scons
##
## Thomas Nagy, 2004, 2005
## This file can be reused freely for any project (see COPYING)

Import('env')

perlpath = env.WhereIs('perl').replace('/','\/')

env.Command('kleansweep-helper',
            'kleansweep-helper.in',
	     "sed 's/\@PERL\@/#!" + perlpath + "/' < $SOURCE > $TARGET")
	     #"sed 's/\@PERL\@/#!\/usr\/bin\/perl/' < $SOURCE > $TARGET")
env.KDEinstall('KDEBIN','','kleansweep-helper')

#############################
## the kate plugin to build

obj=env.kobject('program')
obj.target='kleansweep'
obj.source="""
filelistview.cpp
filelistviewtarget.cpp
fileviewitem.cpp
logwidget.cpp
main.cpp
sweeperwizard.cpp
sweepfileinfo.cpp
sweepscanner.cpp
"""
obj.libs='qt-mt kdeui kio kdecore'
obj.execute()

## the rc file is particular - it goes in the kate directory
#env.KDEinstall( 'KDEDATA', 'kate/plugins/test8/', 'plugin_test8.rc' )

## this servicetype desktop file goes in KDEXDG whether the other one goes in KDEMENU or KDESERV
#env.KDEinstall( 'KDESERV', '', 'test8.desktop' )

