From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 72AA01381F3 for ; Wed, 10 Jul 2013 16:17:01 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 36EF4E0A5B; Wed, 10 Jul 2013 16:16:58 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7879EE0A53 for ; Wed, 10 Jul 2013 16:16:57 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 508D533E8F9 for ; Wed, 10 Jul 2013 16:16:56 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id C575EE546A for ; Wed, 10 Jul 2013 16:16:53 +0000 (UTC) From: "André Erdmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "André Erdmann" Message-ID: <1373463586.afd77696349d7d68ad26680564e00e62943f05cf.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:master commit in: / X-VCS-Repository: proj/R_overlay X-VCS-Files: Makefile roverlay-9999.ebuild X-VCS-Directories: / X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: afd77696349d7d68ad26680564e00e62943f05cf X-VCS-Branch: master Date: Wed, 10 Jul 2013 16:16:53 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 3ca57675-0351-44e4-a623-dfd325744ef7 X-Archives-Hash: f49dc3db18076fb0e15435c984233353 Message-ID: <20130710161653.cJdx82d9s0d2rIayXwMVR8eLOmYx8VLPhm55pmNYuv0@z> commit: afd77696349d7d68ad26680564e00e62943f05cf Author: André Erdmann mailerd de> AuthorDate: Wed Jul 10 13:39:46 2013 +0000 Commit: André Erdmann mailerd de> CommitDate: Wed Jul 10 13:39:46 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=afd77696 update ebuild, Makefile --- Makefile | 143 ++++++++++++++++++++++++++++++++------------------- roverlay-9999.ebuild | 37 +++++++------ 2 files changed, 112 insertions(+), 68 deletions(-) diff --git a/Makefile b/Makefile index 3981a92..0ad337e 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,15 @@ # Some make targets for testing / distribution -# DESTDIR := -BINDIR := $(DESTDIR)/usr/local/bin +DESTDIR := / +DESTTREE := $(DESTDIR)usr/ + +DATADIR := $(DESTTREE)share +BINDIR := $(DESTTREE)bin +CONFDIR := $(DESTDIR)etc + +BUILDDIR := ./tmp + + PYMOD_FILE_LIST := ./roverlay_files.list MANIFEST := MANIFEST @@ -9,6 +17,7 @@ MANIFEST_TMP := $(MANIFEST).tmp MANIFEST_GEN := ./scripts/create_manifest.sh +GEN_SETUP_PY := ./scripts/gen_setuppy.sh SETUP_PY := ./setup.py PKG_DISTDIR := ./release @@ -22,32 +31,39 @@ PYDOC_SH = ./scripts/do_pydoc.sh RST_HTML = ./scripts/roverlay_rst2html.sh -DOCDIR := ./doc +SRC_DOCDIR := ./doc -SELFDOC := $(DOCDIR)/pydoc +SELFDOC := $(SRC_DOCDIR)/pydoc -.PHONY: $(MANIFEST_TMP) $(MANIFEST) \ - default \ - clean-log clean distclean _pyclean _pydoc_clean \ - run-test run-sync test \ - pydoc $(SELFDOC) docs htmldoc html \ - pyver \ - install install-all \ +.PHONY: default \ + clean clean-log _pyclean _pydoc_clean distclean \ + docs pydoc htmldoc \ + check test \ + generate-files \ + generate-doc generate-setuppy generate-manifest \ + release dist \ + compress-config \ + install-all install \ install-roverlay install-pymodules \ - uninstall uninstall-all \ + install-data install-config-common \ + install-config-compressed install-config \ + uninstall-all uninstall \ uninstall-roverlay uninstall-pymodules default: @false -pyver: - @$(PYTHON) --version +check: + @true -clean-log: - rm -rf -- $(LOGDIR) +test: ./run_tests.sh + ./run_tests.sh clean: - rm -rf build/ + rm -rf ./build/ $(BUILDDIR)/ + +clean-log: + rm -rf -- $(LOGDIR) _pyclean: find . -name "*.pyc" -or -name "*.pyo" -delete @@ -58,56 +74,48 @@ _pydoc_clean: distclean: clean _pyclean _pydoc_clean -# generates docs in $(DOCDIR)/ -$(DOCDIR): - @mkdir $(DOCDIR) - -$(DOCDIR)/html: $(DOCDIR) - @mkdir $(DOCDIR)/html - -docs: $(SELFDOC) htmldoc - -$(SELFDOC)/roverlay: - test -d $(SELFDOC) || mkdir -p $(SELFDOC) - @ln -s ../../roverlay $(SELFDOC)/roverlay +$(BUILDDIR): + @install -d $(BUILDDIR) # generates selfdocs (using pydoc) in $(SELFDOC)/ -$(SELFDOC): $(SELFDOC)/roverlay +$(SELFDOC): + @install -d $(SELFDOC)/roverlay + @ln -sfT ../../roverlay $(SELFDOC)/roverlay $(PYDOC_SH) $(SELFDOC) # alias to $(SELFDOC) pydoc: $(SELFDOC) -html: $(DOCDIR)/html $(DOCDIR)/rst/usage.rst - $(RST_HTML) $(DOCDIR)/rst/usage.rst $(DOCDIR)/html/usage.html +htmldoc: $(SRC_DOCDIR)/rst/usage.rst + @install -d $(SRC_DOCDIR)/html + $(RST_HTML) $(SRC_DOCDIR)/rst/usage.rst $(SRC_DOCDIR)/html/usage.html -htmldoc: html +generate-doc: pydoc htmldoc -# sync all repos -run-sync: $(ROVERLAY_MAIN) - $(PYTHON) $(ROVERLAY_MAIN) sync +generate-setuppy: $(GEN_SETUP_PY) + $(GEN_SETUP_PY) -# this is the 'default' test run command -run-test: $(ROVERLAY_MAIN) - $(PYTHON) $(ROVERLAY_MAIN) --nosync --stats -O /tmp/overlay - -# sync and do a test run afterwards -test: run-sync run-test - -$(MANIFEST_TMP): $(MANIFEST_GEN) +generate-manifest: $(MANIFEST_GEN) $(MANIFEST_GEN) > $(MANIFEST_TMP) - -# creates a MANIFEST file for setup.py -$(MANIFEST): $(MANIFEST_TMP) mv -- $(MANIFEST_TMP) $(MANIFEST) +generate-files: generate-setuppy htmldoc pydoc generate-manifest + + # creates a src tarball (.tar.bz2) # !!! does not include config files -release: $(MANIFEST) $(SETUP_PY) +release: generate-files @echo "Note: the release tarball does not include any config files!" - @test -d $(PKG_DISTDIR) || @mkdir -- $(PKG_DISTDIR) + @install -d $(PKG_DISTDIR) ./$(SETUP_PY) sdist --dist-dir=$(PKG_DISTDIR) --formats=bztar +dist: distclean release + +compress-config: $(BUILDDIR) + @install -d $(BUILDDIR)/config + cp -vLr -p --no-preserve=ownership config/simple-deprules.d $(BUILDDIR)/config/ + bzip2 $(BUILDDIR)/config/simple-deprules.d/* + bzip2 -k -c config/license.map > $(BUILDDIR)/config/license.map install-roverlay: ./roverlay.py install -T -D -- ./roverlay.py $(BINDIR)/roverlay @@ -115,17 +123,48 @@ install-roverlay: ./roverlay.py install-pymodules: ./setup.py $(PYTHON) ./setup.py install --record $(PYMOD_FILE_LIST) -install-all: install +install-config-common: + install -m 0755 -d $(CONFDIR)/roverlay + install -m 0644 -t $(CONFDIR)/roverlay \ + config/description_fields.conf config/repo.list + install -m 0644 -T \ + config/R-overlay.conf.install $(CONFDIR)/roverlay/R-overlay.conf + +install-config-compressed: install-config-common + cp -vLr -p --no-preserve=ownership \ + $(BUILDDIR)/config/simple-deprules.d $(BUILDDIR)/config/license.map \ + $(CONFDIR)/roverlay/ + +install-config: install-config-common + cp -vLr -p --no-preserve=ownership \ + config/simple-deprules.d config/license.map \ + $(CONFDIR)/roverlay/ + + +# license.map deprules + +install-data: + install -m 0755 -d \ + $(DATADIR)/roverlay/shlib $(DATADIR)/roverlay/hooks \ + $(DATADIR)/roverlay/eclass + + install -m 0644 -t $(DATADIR)/roverlay/hooks files/hooks/*.sh + install -m 0644 -t $(DATADIR)/roverlay/shlib files/shlib/*.sh + chmod 0775 $(DATADIR)/roverlay/hooks/mux.sh + + install -m 0644 -t $(DATADIR)/roverlay/eclass files/eclass/*.eclass install: install-pymodules install-roverlay +install-all: install + uninstall-roverlay: rm -vf -- $(BINDIR)/roverlay uninstall-pymodules: $(PYMOD_FILE_LIST) xargs rm -vrf < $(PYMOD_FILE_LIST) -uninstall-all: uninstall - uinstall: @false + +uninstall-all: uninstall diff --git a/roverlay-9999.ebuild b/roverlay-9999.ebuild index 68c23fe..40266c8 100644 --- a/roverlay-9999.ebuild +++ b/roverlay-9999.ebuild @@ -1,10 +1,12 @@ -# Copyright 1999-2012 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ -EAPI="4" +EAPI=4 + # python < 2.7 is not supported PYTHON_COMPAT="python2_7 python3_1 python3_2" +PYTHON_USE="ssl" inherit base python-distutils-ng git-2 @@ -14,39 +16,42 @@ DESCRIPTION="Automatically generated overlay of R packages (SoC2012)" HOMEPAGE="http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=summary" SRC_URI="" -LICENSE="GPL-2" +LICENSE="GPL-2+" SLOT="0" -IUSE="bzip2" +IUSE="bzip2 +prebuilt-documentation" KEYWORDS="" -DEPEND="" -RDEPEND="${DEPEND:-} +DEPEND="!prebuilt-documentation? ( >=dev-python/docutils-0.9 )" +RDEPEND=" sys-apps/portage virtual/python-argparse " -_CONFDIR=/etc/${PN} - python_prepare_all() { if use bzip2; then einfo "USE=bzip2: Compressing dependency rule files" - bzip2 config/simple-deprules.d/* || die "Cannot compress dependency rules!" + emake BUILDDIR="${S}/tmp" compress-config fi sed -f misc/sed_expression_roverlay_installed roverlay.py -i || \ die "sed expression, roverlay.py" base_src_prepare } +src_compile() { + python-distutils-ng_src_compile + + if ! use prebuilt-documentation; then + emake htmldoc + fi +} + python_install_all() { - newbin roverlay.py roverlay + #newbin roverlay.py roverlay - insinto "${_CONFDIR}" - doins config/description_fields.conf config/repo.list - doins -r config/simple-deprules.d/ - doins -r files/eclass/ - newins config/R-overlay.conf.install R-overlay.conf + # hooks etc. into /usr/share (architecture-independent data) + emake BUILDDIR="${S}/tmp" DESTDIR="${D}" \ + install-data $(usex bzip2 install-config{-compressed,}) - doman doc/man/roverlay.1 dohtml doc/html/* }