Here is a simple, automatic battery charger built around BC337 (T1), Zener diode (ZD1) and a few discrete components.
The power supply circuit for the charger consists of a step-down transformer (X1) and bridge rectifier comprising diodes D1 through D4.The 50 Hz, 230V AC is stepped down by transformer X1 to output 15V, 1A at the secondary. The secondary output is rectified by the full-wave bridge rectifier comprising diodes D1 though D4 and fed to the anode of SCR1. For triggering SCR1, its gage is connected through R1 to the power supply.
When the mains is available, SCR1 gets triggered via R1 and the battery starts charging. When the battery voltage level goes above 12.6V, ZD1 breaks down and npn transistor T1 conducts to ground the gate voltage of SCR1.SCR1 stops conducting and the battery stops charging. Resistor R3 limits the battery charging current. Its value can be changed as per your requirement.
On the other hand, when the battery voltage goes below 12.6V, SCR1 gets the required voltage through R1 at its gate and is triggered .The battery starts charging now.