A deal has been reached in Spain to end the player strike that has prevented the new La Liga season from kicking off.