Package distribution
J, 36 34 27 24 bytes
(]&lt;@(#/.~)/.[:I.#\&amp;:-)I.

Try it online!
-3 bytes thanks to Bubbler
Takes capacity as left arg and production sheet as right arg.
how
Use 12 f 30 38 12 as an example.

(...)I. A dyadic hook which expands the right arg into a mask with 30 0s, 38 1s, and 12 2s:
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2


#\&amp;:- makes both arguments negative &amp;:-. The _12 on the left means &quot;chunks of size 12&quot; and #\ will count each:
 12 12 12 12 12 12 8


[:I. Use the same expansion trick we used before to expand each of those in place into a unique integer:
 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5 5 5 5 5 6 6 6 6 6 6 6 6


].../. Use the mask from step 1 to group the output of the last step into groups of size 30, 38, and 12:
  0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 
  2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5
  5 5 5 5 6 6 6 6 6 6 6 6


(#/.~)/. For each of those groups, self-group by value, returning a list of the number of items in each group:
  _________ 12 ________   ________ 12 _________   ___ 6 ___ 
 /                     \ /                     \ /         \
 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 

  ___ 6 ___   ________ 12 _________   ________ 12 _________   _____ 8 _____
 /         \ /                     \ /                     \ /             \
 2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4 4 4 4 4 4 4 5 5 5 5 5 5 5 5

  _ 4 _   _____ 8 _____
 /     \ /             \
 5 5 5 5 6 6 6 6 6 6 6 6


Finally, box each of those results &lt;@ because J doesn't allow ragged arrays.