Heat your oven to 200°C/Fan 180°C/Gas 6. Trim the green top off the aubergine. Finely chop it into 1 cm cubes. Pop in a roasting tin.
Season with salt and pepper. Add 1 tbsp oil. Toss to mix. Roast for 25-30 mins till soft and a little charred at the edges. Stir the aubergine after 15 mins so it cooks evenly.
While the aubergine roasts, peel and finely chop the onion and carrot. Trim and finely slice the celery. Halve the pepper. Scoop out the seeds and white bits. Finely chop it. Peel and grate or crush the garlic.
Warm a pan over a medium heat. Add ½ tbsp oil, the onion, carrot, celery and pepper. Fry over a medium heat for 5 mins till softened. Stir now and then. While the veg cook, strip the rosemary leaves from the stems and finely chop.
Add the garlic and rosemary to the pan. Fry for 1 min. Stir in the tomatoes. Half fill the tin with water and pour into the pan. Season with a little salt and pepper. Bring to the boil. Simmer without the lid on for 15-20 mins till thickened. Stir every so often.
While the sauce cooks, bring a large pan of salted water to the boil. Add the spaghetti. Cover. Simmer for about 8 mins till the spaghetti is cooked but not too soft. It should still have a little bite to it.
Stir the roast aubergine into the tomato sauce. Taste and add more salt and pepper if it needs it.
Drain the spaghetti. Divide between two warm plates or bowls. Top with the roast aubergine pasta sauce. Serve straight away.