Prior to Dwyer-Greenlees-Iyengar, Dwyer and myself (independently) defined Gorenstein conditions for group rings over the sphere $S[G]$, i.e., the suspension spectrum of a topological group.
The definition easily extends to the case of a morphism $R\to k$.
In the orientable case the definition goes like this:
$R\to k$ is said to be Gorenstein of dimension $d$ if:
$k$ is finitely dominated as an $R$-module, i.e., $k$ is a retract up to homotopy of a finite $R$-module (this finiteness condition shouldn't be ignored!), and
the derived mapping spectrum $\hom_R(k,R)$ is weakly equivalent as an $R$-module to $k[-d] := \Sigma^{-d}k$.
If one wishes to have an unoriented Gorenstein condition, then it seems to me one needs to replace $k[-d]$ by a twisted version of it. In the special case when $R$ is an augmented $k$-algebra spectrum, we can simply require that the $k$-module $\hom_R(k,R)$ is equivalent to $k[-d]$ as a $k$-module (but not necessarily as an $R$-module).
If $R$ is isn't a $k$-algebra, we can fix another $R$-module structure on $k$, call it $k^\xi$, and require that $\hom_R(k,R)$ is equivalent to $k^\xi[-d]$ as an $R$-module.
Returning the the group ring case $S[G]$, we have:
Theorem. Assume in addition $\pi_0(G)$ is finitely presented. Then following are equivalent:
$S[G] \to S$ is Gorenstein in dimension $d$.
$BG$ is a (finitely dominated) Poincaré duality space in dimenson $d$.
And yes, there is a parallel story over $\Bbb Z$, but it is enough to work with dgas instead of ring spectra (for example, the derived $\hom_{R}(\Bbb Z,R)$ is a dgadifferential graded module for a discrete ring homomorphism $R\to \Bbb Z$).