Add submarine formula

FIX tar.gz installation, replace patch with an inreplace

mikemcquaid comments on formula