Add a %_rundir macro to the platform files.

The default value is /run, it can be changed with the --with-rundir
configure option.

Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
This commit is contained in:
Michael Schroeder 2014-05-07 09:12:46 +03:00 committed by Panu Matilainen
parent 68bddc353a
commit 13a1ef9fb5
2 changed files with 8 additions and 0 deletions

View File

@ -826,6 +826,13 @@ AC_SUBST(RPMCANONVENDOR)
AC_SUBST(RPMCANONOS) AC_SUBST(RPMCANONOS)
AC_SUBST(RPMCANONGNU) AC_SUBST(RPMCANONGNU)
RUNDIR="/run"
AC_ARG_WITH([rundir],
AS_HELP_STRING([--with-rundir=RUNDIR], [specify run-time variable directory]),
[RUNDIR=$withval])
AC_DEFINE_UNQUOTED([RUNDIR],["${RUNDIR}"],[run-time variable directory])
AC_SUBST(RUNDIR)
if test X"$prefix" = XNONE ; then if test X"$prefix" = XNONE ; then
usrprefix="$ac_default_prefix" usrprefix="$ac_default_prefix"
else else

View File

@ -44,6 +44,7 @@
%_initddir %{_sysconfdir}/rc.d/init.d %_initddir %{_sysconfdir}/rc.d/init.d
# Deprecated misspelling, present for backwards compatibility. # Deprecated misspelling, present for backwards compatibility.
%_initrddir %{_initddir} %_initrddir %{_initddir}
%_rundir @RUNDIR@
%_defaultdocdir %{_datadir}/doc %_defaultdocdir %{_datadir}/doc