  Shear $\eta$ and bulk $\zeta$ viscosities are calculated in a quasiparticle model within a relaxation time approximation for pure gluon matter. Below $T_c$ the confined sector is described within a quasiparticle glueball model. Particular attention is paid to behavior of the shear and bulk viscosities near $T_c$. The constructed equation of state reproduces the first-order phase transition for the glue matter. It is shown that with this equation of state it is possible to describe the temperature dependence of the shear viscosity to entropy ratio $\eta/s$ and the bulk viscosity to entropy ratio $\zeta/s$ in reasonable agreement with available lattice data but absolute values of the $\zeta/s$ ratio underestimate the upper limits of this ratio in the lattice measurements typically by an order of magnitude. 
Shear and bulk viscosities for pure glue matter