A procedure for deriving analytical fragility curves for masonry buildings