Joystick and buttons installation

How difficult is to install a working raspberry pi joystick and 4 buttons to the gpio? I want to use the joystick as a mouse 2 buttons for left and right click and will think about what I will use the other 2 for.