As Ethel states, you can bring back a theoretically unlimited amount of 'duty paid' booze from any EU country, as long as it's for your personal use.
HMRC issue guideline figures for the amounts that they'll let you bring in without normally challenging you as to whether they're really for personal use but, if you're flying, the maximum amounts are probably so great that you'd end up paying excess baggage charges if you tried to import that much. (With spirits, the 'guideline maximum' is 10 litres. The figures for beer, wine and fortified wine are 110 litres, 90 litres and 20 litres respectively).
However, you must remember that you're not allowed to carry liquids in your hand luggage through the security checks (except in containers holding less than 100ml). That means that any booze you buy in the local shops must go into your hold baggage. (If you try to take it through the security checks, it will be confiscated).
You can purchase booze at the Spanish airport after the security checks but many airport shops now charge far more than your local supermarket. (For example, I looked a bottle of local wine at Bergamo airport, in Italy, a few weeks ago. They'd got nothing local and the cheapest wine they had was a Sicilian plonk for �8, which I can buy in my local Co-op store for �3.49).
Chris