pdfpages rotate odd pages 180º
Here is a suggestion using a file step1.tex as intermediate file.
\documentclass[landscape]{article}
\usepackage{pgffor}
\usepackage{etoolbox}
\usepackage{pdfpages}
\usepackage{filecontents}
\begin{filecontents*}{\jobname-step1.tex}
\documentclass[a4paper,landscape]{article}
\usepackage{pdfpages}
\begin{document}
\includepdf[nup=2x1,pages=-,booklet,noautoscale,frame]{phi.pdf}
\end{document}
\end{filecontents*}
\immediate\write18{pdflatex \jobname-step1}% compiles \jobname-step1.tex
\begin{document}
\pdfximage{\jobname-step1.pdf}% counts pages in \jobname-step1.pdf
\foreach \p in {1,...,\the\pdflastximagepages}{%
\ifnumodd{\p}%
{\includepdf[pages=\p,angle=180]{\jobname-step1}}%
{\includepdf[pages=\p]{\jobname-step1}}%
}
\end{document}
Note that pdflatex --shell-escape
is needed. Or you have to comment the line \immediate...
and compile the file \jobname-step1
separatly.