Global games: How to derive posterior with uniform prior and signal

I have access to some lecture notes on Global games (following the model of Carlsson and van Damme (1993)) showing how to derive the players posterior beliefs. But I don't really grasp how players with uniform priors and uniform signals derive their posterior.

I have the following information:

Ex ante each state $$x \in [-1,5]$$ is equally likely, so $$x \sim U(-1,5)$$. Where $$x$$ is a payoff.

Then player $$i$$ draw an iid signal from $$U(x-\varepsilon, x+\varepsilon)$$, where $$\varepsilon$$ is a (small) number.

The posterior is then given by $$p(x | x_i) = \frac{p(x_i | x) p(x)}{p(x_i)} = \begin{cases} 0 \quad &\text{if } x_i \notin [x - \varepsilon, x + \varepsilon] \\ \frac{5 * 1/6}{5 * 2 \varepsilon / 6} = \frac{1}{2 \varepsilon} \quad &\text{else} \end{cases}$$

Can someone explain how to derive the relevant expressions for $$p(x_i | x)$$ and $$p(x_i)$$?

Carlson and van Damme “Global Games and Equilibrium Selection”, Econometrica, Vol. 61, No. 5 (Sep., 1993), pp. 989-1018