Add RSTTOMAN to configure path to rst2man (Closes: #140)

This commit is contained in:
Sebastian Ramacher 2012-03-08 18:23:44 +01:00
parent cc0e59825c
commit 114cc32fd8
2 changed files with 14 additions and 14 deletions

View file

@ -129,20 +129,18 @@ install: all install-headers po
$(ECHO) installing executable file $(ECHO) installing executable file
$(QUIET)mkdir -p ${DESTDIR}${PREFIX}/bin $(QUIET)mkdir -p ${DESTDIR}${PREFIX}/bin
$(QUIET)install -m 755 ${PROJECT} ${DESTDIR}${PREFIX}/bin $(QUIET)install -m 755 ${PROJECT} ${DESTDIR}${PREFIX}/bin
ifneq "$(wildcard ${RSTTOMAN})" ""
$(ECHO) installing manual pages $(ECHO) installing manual pages
$(QUIET)mkdir -p ${DESTDIR}${MANPREFIX}/man1 $(QUIET)mkdir -p ${DESTDIR}${MANPREFIX}/man1 ${DESTDIR}${MANPREFIX}/man5
$(QUIET)set -e && if which rst2man > /dev/null ; then \ $(QUIET)sed "s/VERSION/${VERSION}/g" < ${PROJECT}.1.rst > ${PROJECT}-v.1.rst
mkdir -p ${DESTDIR}${MANPREFIX}/man1 ; \ $(QUIET)${RSTTOMAN} ${PROJECT}-v.1.rst > ${DESTDIR}${MANPREFIX}/man1/${PROJECT}.1
sed "s/VERSION/${VERSION}/g" < ${PROJECT}.1.rst > ${PROJECT}-v.1.rst ; \ $(QUIET)rm ${PROJECT}-v.1.rst
rst2man ${PROJECT}-v.1.rst > ${DESTDIR}${MANPREFIX}/man1/${PROJECT}.1 ; \ $(QUIET)sed "s/VERSION/${VERSION}/g" < ${PROJECT}rc.5.rst > ${PROJECT}rc-v.5.rst
rm -f ${PROJECT}-v.1.rst ; \ $(QUIET)${RSTTOMAN} ${PROJECT}rc-v.5.rst > ${DESTDIR}${MANPREFIX}/man5/${PROJECT}rc.5
mkdir -p ${DESTDIR}${MANPREFIX}/man5 ; \ $(QUIET)rm ${PROJECT}rc-v.5.rst
sed "s/VERSION/${VERSION}/g" < ${PROJECT}rc.5.rst > ${PROJECT}rc-v.5.rst ; \ $(QUIET)chmod 644 ${DESTDIR}${MANPREFIX}/man1/${PROJECT}.1
rst2man ${PROJECT}rc-v.5.rst > ${DESTDIR}${MANPREFIX}/man5/${PROJECT}rc.5 ; \ $(QUIET)chmod 644 ${DESTDIR}${MANPREFIX}/man5/${PROJECT}rc.5
rm -f ${PROJECT}rc-v.5.rst ; \ endif
chmod 644 ${DESTDIR}${MANPREFIX}/man1/${PROJECT}.1 ; \
chmod 644 ${DESTDIR}${MANPREFIX}/man5/${PROJECT}rc.5 ; \
fi
$(QUIET)mkdir -p ${DESTDIR}${DESKTOPPREFIX} $(QUIET)mkdir -p ${DESTDIR}${DESKTOPPREFIX}
$(ECHO) installing desktop file $(ECHO) installing desktop file
$(QUIET)install -m 644 ${PROJECT}.desktop ${DESTDIR}${DESKTOPPREFIX} $(QUIET)install -m 644 ${PROJECT}.desktop ${DESTDIR}${DESKTOPPREFIX}

View file

@ -23,10 +23,12 @@ INCLUDEDIR ?= ${PREFIX}/include
# plugin directory # plugin directory
PLUGINDIR ?= ${LIBDIR}/zathura PLUGINDIR ?= ${LIBDIR}/zathura
# locale directory # locale directory
LOCALEDIR ?= ${PREFIX}/share/locale LOCALEDIR ?= ${PREFIX}/share/locale
# rst2man
RSTTOMAN ?= /usr/bin/rst2man
# libs # libs
GTK_INC ?= $(shell pkg-config --cflags gtk+-${ZATHURA_GTK_VERSION}.0) GTK_INC ?= $(shell pkg-config --cflags gtk+-${ZATHURA_GTK_VERSION}.0)
GTK_LIB ?= $(shell pkg-config --libs gtk+-${ZATHURA_GTK_VERSION}.0 gthread-2.0) GTK_LIB ?= $(shell pkg-config --libs gtk+-${ZATHURA_GTK_VERSION}.0 gthread-2.0)