--- Quote Start ---
I did it for simple designs with my Altera DE0 board before
--- Quote End ---
This thread has a project with scripts for the DE0-nano ...
http://www.alteraforum.com/forum/showthread.php?t=45927 For the SoCKit, you should be able to export a Tcl script for an existing project, and then break up that script into the constraints script like I have provided for the DE0-nano.
The "key" to using scripts is that you should always use a top-level entity with all the pin assignments on the physical PCB, and the pin assignments script provide assignments to the ports (pins) on that top-level entity. If a design does not use a particular signal, then any outputs can either be driven to a valid logic level, or tristated. Look at the de0_nano.vhd top-level design for an example.
Cheers,
Dave