transform.rotation Local Axis

I need to rotate my object around Y axis, and im doing it(like a tank tower). But only in global coords. When my object rotating itself (spaceship for example) my object still rotation around global Y.

using UnityEngine;
using System.Collections;

public class subTowerControl : MonoBehaviour
{
    //public float rotationSpeed;
    //public float targetingDistance;

    void Start()
    {

    }


    void Update()
    {
        towerRotation();
    }
    void towerRotation()
    {

        var ray = Camera.main.ScreenPointToRay(Input.mousePosition);

        RaycastHit hit;
        if (Physics.Raycast(ray, out hit, Mathf.Infinity))
        {
            Debug.Log(hit.point);
            Vector3 targetPoint = hit.point;
            //Vector3 targetPoint = ray.origin + ray.direction;
            var targetRotation = Quaternion.LookRotation(targetPoint - transform.position);
            targetRotation.x = 0.0f;
            targetRotation.z = 0.0f;
            transform.rotation = Quaternion.Lerp(transform.rotation, targetRotation, 2f * Time.deltaTime);
        }
        else
        {
            var targetPoint = ray.origin + ray.direction * targetingDistance;
            var targetRotation = Quaternion.LookRotation(targetPoint - transform.position);
            targetRotation.x = 0.0f;
            targetRotation.z = 0.0f;
            transform.rotation = Quaternion.Lerp(transform.rotation, targetRotation, 2f * Time.deltaTime);
        }
    }
}

Use transform.localrotation to change the local rotation.