Preheat the oven to 180C/160C fan forced. Place an oven shelf in the lowest position and remove the other shelves. Line a large roasting pan with baking paper.
Place the sugar, juice, rum, vinegar, cinnamon, ground and whole cloves in a saucepan over medium heat. Cook, stirring, for 2 minutes or until sugar dissolves. Bring to the boil. Simmer, stirring occasionally, for 6-7 minutes or until syrupy. Transfer to a heatproof bowl and set aside to cool and thicken. Reserve 1 tbs glaze.
Use a sharp knife to cut around the ham shank, about 10cm from end. Run the knife around the edge of ham. Gently lift rind off in one piece by running your fingers between the rind and fat.
Score fat in parallel lines, about 5mm deep and 1cm apart. Pour 250ml (1 cup) water into the prepared pan. Place ham in pan. Wrap shank in foil. Pour two-thirds of the glaze over the ham. Brush evenly to coat. Bake, brushing with the glaze twice throughout cooking time, for 1 1/2 hours, until golden. Cover loosely with foil and set aside to rest for 30 minutes.
Meanwhile, for the relish, combine the pineapple, onion, chilli, lime rind and juice and reserved 1 tbs glaze in a bowl. Season well. Toss to combine.
Transfer the ham to a platter. Carve and serve with pineapple relish.