How to derive the Gibbs free energy for an ideal gas?
The fundamental relation for an Ideal Gas, in the entropy representation is 

$$S(U,V,N) = 
   NS_0 + NR\ln\left[ \left( \frac{U}{U_0} \right)^c 
                      \left( \frac{V}{V_0} \right)
                      \left( \frac{N_0}{N} \right)^{c+1} \right]$$

The Gibbs Free Energy, is the Legendre Transform $G \equiv U[T,p]$

so, $G = U + pV -TS$

First, let's get the equation of state $S(T,V,N) $ from the the fundamental relation. We eliminate $U$ using $U = cNRT$

$$S(T,V,N) = 
  NS_0 + NR\ln\left[ \left( \frac{T}{T_0} \right)^c
                     \left( \frac{V}{V_0} \right)
                     \left( \frac{N_0}{N} \right) \right].$$

Also, for an Ideal Gas, $p =\frac{NRT}{V}$

$$G(T,p,N) = 
  cNRT - TNS_0 
  - NRT\ln\left[ \left( \frac{T}{T_0} \right)^c
                 \left( \frac{p_0}{p} \right)
                 \left( \frac{N_0}{N} \right) \right] + NRT $$

Exercise: Find $G_0 = G(T_0,p_0, N_0)$ and substitute into the fundamental relation derived above to get rid of $S_0$