It's immensely more complicated -- life need not be restricted to biological. IMHO, in the grandest scale of things, the definition of life should include no restrictions save one: that it reverses entropy.
I think most people here would agree that what's to be replicated is the totality of information one holds. You not only reproduce by physical means, your ideas reproduce themselves (just like your genes do when you reproduce, it's actually their will that pushes you to reproduce more than the totality of "your will"). Not only ideas (in the strictest sense) of course, but your habits, gestures, etc.
Natural selection plays the same role in that arena. If you have an idea that by itself doesn't have self-replicating properties, it will not survive, however "good" it is (therefore you won't call it "good" anyway). Therefore we tend to have ideas that have this property.
I call the totality of these things we talk about, "norms", since the only thing that they have in common is that they are normative.
What I want to speculate about though, is what "self" means in the contest of this discussion. We casually mention pleasure of the self, replication of the self, and so on... However, a person is not atomic. A person is more like a vessel where the fight for dominance is taking place. Not only your ideas are fighting among themselves, there is a more holistic aspect of the quarrel among the totality of your norms. For instance, you can decide not to reproduce, and can spread that norm with passion, even though your body dictates that you should. Of course this war is seamless in every resolution, so everything you do, from holding a cup to forming a sentence, is a result of this process.
This is why superficial hedonism doesn't work. You can take pleasure from anything, and it's up to you as a whole to decide (usually not consciously, sometimes even not mentally) what will please you. Taking this into account, an enlightened hedonism would be in fact the same as any other philosophy of life.
So, briefly, you don't have a definitive purpose at any given moment. You have elements within you that have different purposes. If you want to define yourself as a single atomic entity, that itself defines a purpose. So the purpose would be to find coherence. Know thyself, and all that.