class sugar_preconfig(PackageRecipe): name = 'sugar-preconfig' version = '4.2.1b' buildRequires = [ 'chkconfig:runtime' ] def setup(r): r.addSource('sugar-reset.init', dest='/etc/init.d/sugar-reset.init', mode=0755) r.addSource('issue-reset.init', dest='/etc/init.d/issue-reset.init', mode=0755) r.addSource('sugarcrm.sql', dest='/root/', mode=0755) r.addSource('config.php', dest='/root/', mode=0644) r.addSource('db_setup.sql', dest='/root/', mode=0755) r.addSource('index.html', dest='/srv/www/html/', mode=0755) r.addSource('logo-smaller.png', dest='/srv/www/html/', mode=0755) r.addSource('sugarcrm-appliance-logo-small.png', dest='/srv/www/html/', mode=0755) r.Create('%(sysconfdir)s/cron.d/sugarcrm', contents='''* * * * * apache cd /usr/share/sugarcrm ; php cron.php >/dev/null 2>&1''')