From 175ddc3f6e6fec97ffe51b943c02079818be8721 Mon Sep 17 00:00:00 2001 From: roktas <roktas@788f1e2b-df1e-0410-8736-df70ead52e1b> Date: Sun, 7 Oct 2007 21:43:44 +0000 Subject: [PATCH] Makefile: - New variables to make use in debian/rules: DATADIR, DOCDIR. Cabal uses $prefix/pandoc-$VERSION/doc for the documentation files, where as the Debian package uses $prefix/doc/pandoc. We need these variables to resolve the conflict. debian/rules: - Set and export DATADIR, DOCDIR which controls the installation of document files at install-program target. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1045 788f1e2b-df1e-0410-8736-df70ead52e1b --- Makefile | 8 +++++--- debian/rules | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 742b86129..e3129aa39 100644 --- a/Makefile +++ b/Makefile @@ -46,6 +46,8 @@ destdir := # Fallback to defaults but allow to get the values from environment. PREFIX ?= $(prefix) DESTDIR ?= $(destdir) +DATADIR ?= $(PKGID) +DOCDIR ?= $(PKGID)/doc #------------------------------------------------------------------------------- # Installation paths @@ -54,8 +56,8 @@ DESTPATH := $(DESTDIR)$(PREFIX) BINPATH := $(DESTPATH)/bin DATAPATH := $(DESTPATH)/share MANPATH := $(DATAPATH)/man -PKGDATAPATH := $(DATAPATH)/$(PKGID) -PKGDOCPATH := $(PKGDATAPATH)/doc +PKGDATAPATH := $(DATAPATH)/$(DATADIR) +PKGDOCPATH := $(DATAPATH)/$(DOCDIR) #------------------------------------------------------------------------------- # Generic Makefile variables @@ -190,7 +192,7 @@ uninstall-program: uninstall-exec uninstall-doc .PHONY: install-all uninstall-all # Full installation through Cabal: main + wrappers + user docs + lib + lib docs -install-all: install-program +install-all: build-all install-program destdir=$(DESTDIR); \ # Older Cabal versions have no '--destdir' option. if $(BUILDCMD) copy --help | grep -q '\-\-destdir'; then \ diff --git a/debian/rules b/debian/rules index aeb66d74e..8e3dc240f 100755 --- a/debian/rules +++ b/debian/rules @@ -12,6 +12,8 @@ THIS := $(shell sed -ne 's/^Source: \(.*\)/\1/p' debian/control) PREFIX := /usr DESTDIR := debian/$(THIS) +DATADIR := $(THIS) +DOCDIR := doc/$(THIS) # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 @@ -29,7 +31,7 @@ HCFLAGS+=-O0 endif # Export all variables which will be used in various stages of build process. -export PREFIX DESTDIR HCFLAGS +export PREFIX DESTDIR DATADIR DOCDIR HCFLAGS configure: configure-stamp configure-stamp: