There is no syntax for an upsert trigger. The upsert actually does an insert and an update seperately. So you will have an insert and update trigger. The undelete is the same as your other triggers just using before undelete or after undelete. The undelete is used when data is recovered from the recycling bin [1].
[1] https://help.salesforce.com/HTViewHelpDoc?id=home_delete.htm