Setting up a home Linux server to synchronize calendar, contacts and various files (images, music...) is easy. Just install ownCloud which has everything needed for the server, including a Web interface to manage calendar and contacts.
For mail, any IMAP server from the Linux distribution (UW-imapd, dovecot, cyrus...) will do. You probably already know them if you run your own mail server.
You can use the pre-installed GMail app or the feature-rich K-9 Mail to access an IMAP server.
Note that after setting that all up, you will have several different accounts on your Android device: one for mail, calendar and contacts each, as well as one for file transfer. This may look confusing compared to the Google account which has all services under one umbrella, but it really doesn't matter.
Thunderbird with the Lightning add-on can synchronize against a CalDAV calendar. Just set up a calendar in Lightning using the URL found on the Calendar page of your ownCloud server. If your ownCloud account provides more than one calendar (e.g. to separate work and private items), you have to set up separate URLs in Lightning.
Discontinue using the standard "local" calendar which you got when first installing Thunderbird/Lightning. To migrate your existing local Thunderbird/Lightning calendar to ownCloud:
.ICSfile on the ownCloud page - this will import the contents into the ownCloud calendar
For synchronizing the address book, Thunderbird needs the SOGo Connector
extension (only the Connector, not the Integrator). Setup is similar
to the calendar. To migrate, use the MoreFunctionsForAddressBook
extension which allows to export an address book as
file (use VCF version 2.1 and UTF-8 character set).