Faster than light's answer is fine if the gamma ray burst is "pointing" towards us. The emission from rapidly moving material in a GRB is thought to be beamed in the direction of that motion, along the rotation axis of the progenitor object in fact.
The opening angle of the beam may only be a few degrees (e.g. Frail et al. 2001), which would mean that for random orientations of the GRB source there would only be about a 1 in 500 chance of the solar system being "in the beam". Thus the highly destructive conclusion of Faster than Light's answer is a remote possibility.
As the fireball phase of the GRB develops then it is thought that the beam opening angle will widen over days and weeks, but of course the source brightness also fades drastically on these timescales too. It should also be noted that most of the highly destructive X-ray and Gamma ray emission arises during the tightly beamed phase within minutes or hours of the burst.
Thus although I'm not saying we're not "screwed", I am saying that the issue is more complex than scaling the apparent magnitude of a GRB and comparing it to the Sun. I suspect that in most cases the effects would be similar to the explosion of a supernova at the distance of Proxima Cen.
The conclusions I can garner from such as https://physics.stackexchange.com/questions/26578/near-earth-supernova?rq=1 , suggest that would still likely remove the ozone layer for some time and therefore could have serious and deadly consequences for life on Earth.