T2 = `date -d "2009-8-15" +%s`

rebuild: clear db.sqlite

clear: 
	rm -f db.sqlite fi

install: rebuild
	mkdir ~/.kimi || true 2>/dev/null
	cp db.sqlite ~/.kimi

db.sqlite: 
	sqlite3 db.sqlite "CREATE TABLE tblEvent (id INTEGER PRIMARY KEY AUTOINCREMENT, id_type INTEGER, title TEXT, start_time INTEGER, end_time INTEGER, description TEXT, remind_time INTEGER, start_day INTEGER, end_day INTEGER, days TEXT, repeat INTEGER, type INTEGER, location TEXT, alarm_cookie INTEGER, service_event_id TEXT);"	
	sqlite3 db.sqlite "INSERT INTO tblEvent (id_type, title, start_time, description, start_day, end_day, days, repeat, type, location, alarm_cookie, service_event_id) VALUES (0, 'Meeting' ,1250334000, 'Meeting about project', null, null, null, null, null, '215', 0, null)"
	sqlite3 db.sqlite "INSERT INTO tblEvent (id_type, title, start_time, description, start_day, end_day, days, repeat, type, location, alarm_cookie, service_event_id) VALUES (0, 'Meeting' ,1250424000, 'Meeting with work', null, null, null, null, null, '217', 0, null)"
	sqlite3 db.sqlite "INSERT INTO tblEvent (id_type, title, start_time, description, start_day, end_day, days, repeat, type, location, alarm_cookie, service_event_id) VALUES (1, 'Breakfast' ,1250319600, 'Breakfast', null, null, null, null, null, 'Home', 0, null)"
	sqlite3 db.sqlite "INSERT INTO tblEvent (id_type, title, start_time, description, start_day, end_day, days, repeat, type, location, alarm_cookie, service_event_id) VALUES (0, 'Go to home' ,1250331300, 'home', null, null, null, null, null, 'Trolleybus', 0, null)"
	sqlite3 db.sqlite "INSERT INTO tblEvent (id_type, title, start_time, description, start_day, end_day, days, repeat, type, location, alarm_cookie, service_event_id) VALUES (0, 'Project meeting' ,1249902000, 'Meeting with work', null, null, null, null, null, 'IT park', 0, null)"
	sqlite3 db.sqlite "INSERT INTO tblEvent (id_type, title, start_time, description, start_day, end_day, days, repeat, type, location, alarm_cookie, service_event_id) VALUES (0, 'Test' ,1244185200, 'test', 1209931200, 1260129600, '1,3,5', 1, 2, 'Test location', 0, null)"
