How about this arduino Mega hack

If you are just changing the physical form factor, the IDE would not know the difference.

If you change other things, like the clock frequency or pin assignments, you would have to define your own "board" to the IDE. Then it would be a different selection in the IDE Boards menu.