This project starts after preparation of the pocket door site has been completed --- drywall has been removed, studs, plates and sills have been removed, and electrical and plumbing issues have been handled.
Be sure to purchase a high-quality pocket door frame with durable hardware. Additionally, the size of the header increases with the weight of the door, so be sure to factor this in. Most pocket door frame kits specify how big the header should be.
The door rides through a channel made by what are called "split studs." These studs function like regular wall studs but are metal-wrapped and form a hollow channel in the middle for the pocket door to pass through.
Attach the split studs to the floor and to the header, checking for plumb. When you hang the new drywall that will hide the pocket door when it's open, you'll attach the drywall to the exterior (wood) side of these split studs.
Hang drywall to cover up the area behind the open pocket door.
Measure, cut and install trim around the door, starting with the top header trim piece and then the side jambs. For the casing trim (outside), use finish nails just long enough to "bite" into the 2 x 4s -- longer nails might extend too far into the door chamber and scratch the door during opening and closing.