Add the chopped tomatoes and their juices, onion, brown sugar, vinegar, bottled lemon juice, ginger, cumin, smoked paprika, salt, black pepper, and red pepper flakes to a wide heavy saucepan. Stir and let stand for 5 minutes.
Set the pan over medium-high heat and bring to a gentle boil, stirring often. Reduce the heat to maintain a steady uncovered simmer.
Cook for 60 to 80 minutes, stirring every 10 minutes at first and more frequently as the mixture thickens. Scrape the bottom and corners to prevent scorching.
The jam is ready when a spoon dragged across the pan leaves a path for 1 to 2 seconds and a teaspoon placed on a cold plate mounds instead of running.
Spoon into clean heat-safe jars, leaving space at the top. Cool briefly, cover, and refrigerate. The jam thickens further as it cools.