Now it's even easier:
Download latest develop branch:
$ git clone git://github.com/cocos2d/cocos2d-iphone.git develop
Change to the cocos2d directory:
$ cd cocos2d-iphone
Install the new templates
./install-templates.sh -u -f
Open Xcode, and create a new cocos2d v0.99.5 project. All of the cocos2d templates (cocos2d alone, cocos2d + box2d and cocos2d + chipmunk) includes the autorotation code.
To disabled autorotation, edit GameConfg.h:
#define GAME_AUTOROTATION kGameAutorotationNone
To enable autorotation using cocos2d, edit GameConfig.h:
#define GAME_AUTOROTATION kGameAutorotationCCDirector
To enable autorotation using UIViewController, edit GameConfig.h (this is the default value):
#define GAME_AUTOROTATION kGameAutorotationkGameAutorotationUIViewController