How to find Leq for a WAV audio file like an SPL Meter would?
how do we integrate the SPL of each frame with the previous frames?


You're measuring the RMS value of the (filtered) samples, which is sqrt(average(samples^2)), so if you're finding the RMS value in multiple chunks, it would just be sqrt(weighted_average(chunk1^2, chunk2^2, chunk3^2, ...)) where the average is weighted by the number of samples in each chunk (typically they are all the same length, but maybe a recording is not an exact multiple of chunk size, for instance).

To find the time weighting, the signal flow is:


Apply A-weighting filter
Square the samples
Apply a low-pass filter with a real pole at 1/τ (where τ is 125 ms or 1 s in your case)
Square root
20*log10() of the signal to convert to dB


It's the same as the RMS of the weighted signal, above, except that instead of an unweighted average over the whole signal, you're using a sliding-time average (same as https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average I think).

The time-weighted SPL will be a signal, not a scalar for each frame.