Steven Spielberg is producing a movie version of Gay Talese’s upcoming novel “The Voyeur’s Motel” for DreamWorks with Sam Mendes directing.

Mendes will produce through his Neal Street Productions company. Mendes, who directed the James Bond movies “Skyfall” and “Spectre,” has directed a trio of titles for DreamWorks — his debut on “American Beauty,” “The Road to Perdition” and “Revolutionary Road.”

DreamWorks won an auction for the rights to Talese’s novel. CAA brokered the auction.

The story centers on Colorado resident Gerald Foos, who opened a hotel so he could watch guests having sex. Foos had reached out to Talese in 1980 with the following note:

“Dear Mr. Talese: Since learning of your long awaited study of coast-to-coast sex in America, which will be included in your soon to be published book, ‘Thy Neighbor’s Wife,’ I feel I have important information that I could contribute to its contents or to contents of a future book.”

An excerpt of “The Voyeur’s Motel” ran in the April 11 issue of the New Yorker. The novel will be published July 12 by Grove Press.

CAA brokered the deal on behalf of Mendes and Talese. Mendes is also represented by attorney Melanie Cook of Ziffren Brittenham. Talese is represented for publishing by Lynn Nesbit of Janklow & Nesbit.

The news was first reported by Deadline Hollywood.