In a spec file: # Create pkgconfig file cat > emacs.pc << EOF sitepkglispdir=%{site_lisp} sitestartdir=%{site_lisp}/site-start.d The value of %{site_lisp} is not expanded when written into the file. How do I fix this?