The flight crew of EI-JFK declared an emergency at 10.09 hrs after they received a fire alarm indicating a fire in No. 2 engine. The aircraft had just taken off from Runway (RWY) 28 en route to New York. The Airport Fire Service (AFS) deployed all their first line vehicles at strategic points adjacent to RWY 28. The aircraft landed safely on RWY 28 at 10.25 hrs. and there were no reported injuries. Following inspection by the Airport Fire Officer, the aircraft was towed to Stand 36 where the passengers disembarked normally. Engineers inspected the aircraft and confirmed that they located a pneumatic duct leak in No. 2 engine. The electrical harness also sustained overheat damage.