diff --git a/.gitattributes b/.gitattributes index 5cac576a9d..ff2719f2d9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1635,7 +1635,6 @@ debian/changelog svneol=native#text/plain debian/compat svneol=native#text/plain debian/control svneol=native#text/plain debian/copyright svneol=native#text/plain -debian/dirs svneol=native#text/plain debian/docs svneol=native#text/plain debian/install.sh svneol=native#text/plain debian/lazarus-doc.install svneol=native#text/plain @@ -1644,9 +1643,6 @@ debian/lazarus-ide.links svneol=native#text/plain debian/lazarus-ide.menu svneol=native#text/plain debian/lazarus-src.install svneol=native#text/plain debian/lazarus.substvars svneol=native#text/plain -debian/links svneol=native#text/plain -debian/menu svneol=native#text/plain -debian/move-usr-lib.sh svneol=native#text/plain debian/orig-tar.sh svneol=native#text/plain debian/overrides/lazarus-src svneol=native#text/plain debian/patches/01_topmakefile.diff svneol=native#text/plain diff --git a/debian/dirs b/debian/dirs deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/debian/lazarus-doc.install b/debian/lazarus-doc.install index b4b7a603e4..ff9f7b438b 100644 --- a/debian/lazarus-doc.install +++ b/debian/lazarus-doc.install @@ -1 +1 @@ -/usr/share/doc/lazarus +/usr/share/doc/lazarus/lcl diff --git a/debian/links b/debian/links deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/debian/menu b/debian/menu deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/debian/move-usr-lib.sh b/debian/move-usr-lib.sh deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/debian/rules b/debian/rules index ecf6cd1b33..8be6531632 100755 --- a/debian/rules +++ b/debian/rules @@ -5,6 +5,15 @@ DEB_DH_BUILDDEB_ARGS := -- -Z bzip2 export DH_ALWAYS_EXCLUDE := COPYING:LICENSE export LANG:=C +# Documentation type to use chm/html +ifeq (${DEBDOCTYPE},) +DOCTYPE=html +# HTML Converter chmdocs or htmldocs for (default) +CONVERTER=${DOCTYPE}docs +else +DOCTYPE=${DEBDOCTYPE} +CONVERTER=${DOCTYPE}docs +endif # Define FPC ifndef FPC FPC=/usr/bin/fpc @@ -18,8 +27,8 @@ DEB_UPSTREAM_VERSION:=$(shell echo $(DEB_VERSION) | cut -f 1 -d -) CURDIR:=$(shell pwd) BUILD_DIR=$(CURDIR)/debian/build INSTALL_DIR=$(CURDIR)/debian/tmp -DOC_DIR=${INSTALL_DIR}/usr/share/doc/lazarus -SRC_DIR=$(INSTALL_DIR)/usr/lib/lazarus +DOC_DIR=${INSTALL_DIR}/usr/share/doc/lazarus/${DEB_UPSTREAM_MAIN_VERSION} +SRC_DIR=$(INSTALL_DIR)/usr/lib/lazarus/${DEB_UPSTREAM_MAIN_VERSION} # Get utils ifndef MKDIR MKDIR=mkdir -p @@ -29,10 +38,10 @@ CP=cp -Rfpl endif RM:=rm -rf ifndef LAZBUILD -LAZBUILD=lazbuild +LAZBUILD=${CURDIR}/lazbuild endif # Set default compilation options -BUILDOPTS=PP=$(FPC) +BUILDOPTS= INSTALLOPTS=INSTALL_PREFIX=$(INSTALL_DIR)/usr # Get fpcmake from path if none is specified. ifndef FPCMAKE @@ -69,17 +78,18 @@ clean-patched: dh_testroot ${RM} lazarus startlazarus lazbuild $(MAKE) distclean ${BUILDOPTS} + $(MAKE) -C docs/html clean find '(' -name '*.a' -or -name '*.o' -or -name '*.so' -or -name '*.ppu' ')' -exec ${RM} '{}' ';' dh_prep patch: patch-stamp patch-stamp: - quilt push -a || test $$? = 2 + test ! -s ${QUILT_PATCHES}/series || quilt push -a touch patch-stamp unpatch: - quilt pop -a || test $$? = 2 + test ! -s ${QUILT_PATCHES}/series || quilt pop -a rm -rf patch-stamp debian/patched ################### @@ -179,7 +189,7 @@ build-doc: patch debian-files build-doc-stamp build-doc-stamp: @echo "--- Building Documentation" dh_testdir - #$(MAKE) -C docs $(CONVERTER) $(BUILDOPTS) FPDOC=$(NEWFPDOC) + $(MAKE) -C docs/html ${CONVERTER} touch build-doc-stamp install-doc: build-doc install-doc-stamp @@ -187,8 +197,7 @@ install-doc-stamp: @echo "--- Installing Documentation" dh_testdir dh_testroot - install -d ${DOC_DIR} - ${CP} -t ${DOC_DIR} docs/* + ${MAKE} -C docs/html ${DOCTYPE}install INSTALL_PREFIX=${INSTALL_DIR}/usr INSTALL_DOCDIR=${DOC_DIR} touch install-doc-stamp ###################