This is an interesting variation on the more common problem of integer partitions.
It is relatively straightforward to generate integer partitions of N, so you have a set of lists of integers which sum to N. My idea is that you can assign probability to each such partition, according to the probabilities in your specified distribution. Then sample from the set of partitions according to the calculated per-partition probabilities. I believe the per-partition probability should be just the product of the probabilities of its elements.
This scheme is workable for N which is not too big -- otherwise there are too many partitions. Not sure what to do if the list of partitions is too big. For comparison, the number of integers partitions of 60 is a little less than one million (actually 966467).
I think you can use a rejection sampling scheme: from the list of partitions, pick one (with uniform probability). Then generate a random number between 0 and 1 and look at the calculated probability for that partition. If the random number is less than the calculated probability, take that partition. Otherwise try again; keep trying until you take one.
It occurs to me that maybe just multiplying the per-element probabilities is incorrect. It's going to make the probabilities for long partitions much smaller than for short partitions; I don't know if that's right. Maybe you can think of a different way to assign probabilities to partitions.
EDIT: maybe take product of per-element probabilities divided by the greatest such product (so one of the acceptance probabilities is 1 and the rest are smaller).
EDIT2: I think the scheme above will work, but the per-partition probability needs to be multiplied by a multinomial coefficient (namely n!/(n1!n2!...nm!) where n = length of partition and n1, ..., nm are the numbers of the m distinct elements in the partition).
But maybe a simpler scheme will work: generate random numbers while the sum is less than N. If it's exactly N then return that list. If not, remove elements at random (from anywhere in the list) until the sum is less than N, then start adding elements again.