summaryrefslogtreecommitdiff
path: root/sci-astronomy
diff options
context:
space:
mode:
authorCtibor <ctibor.brancik@seznam.cz>2015-03-11 19:48:17 +0100
committerCtibor <ctibor.brancik@seznam.cz>2015-03-11 19:48:17 +0100
commit23f4378be3691b9daf57bde6ec079c56bd1ef688 (patch)
treec25aeb64f3d14a5812e0503c386ebd22f2f9f69c /sci-astronomy
parentf22ce6e5487c67584ab2ba2efb54283d7127d025 (diff)
downloadbrancik-overlay-23f4378be3691b9daf57bde6ec079c56bd1ef688.tar.gz
brancik-overlay-23f4378be3691b9daf57bde6ec079c56bd1ef688.tar.bz2
Installation paths for sci-astronomy/astrometry should now respect FHS.
Diffstat (limited to 'sci-astronomy')
-rw-r--r--sci-astronomy/astrometry/astrometry-0.52-r1.ebuild (renamed from sci-astronomy/astrometry/astrometry-0.52.ebuild)28
-rw-r--r--sci-astronomy/astrometry/files/0.52-fix_installation_paths.patch50
-rw-r--r--sci-astronomy/astrometry/files/0.52-respect-user-flags.patch (renamed from sci-astronomy/astrometry/files/0.52-respect-user-flags)0
3 files changed, 65 insertions, 13 deletions
diff --git a/sci-astronomy/astrometry/astrometry-0.52.ebuild b/sci-astronomy/astrometry/astrometry-0.52-r1.ebuild
index d42bfb5..d8e5b07 100644
--- a/sci-astronomy/astrometry/astrometry-0.52.ebuild
+++ b/sci-astronomy/astrometry/astrometry-0.52-r1.ebuild
@@ -37,9 +37,10 @@ DEPEND="${RDEPEND}
S="${WORKDIR}/${MYP}"
-PATCHES=( "${FILESDIR}/0.52-as-needed.patch" "${FILESDIR}/0.52-respect-user-flags.patch" )
-
src_prepare() {
+ epatch "${FILESDIR}"/0.52-as-needed.patch
+ epatch "${FILESDIR}"/0.52-respect-user-flags.patch
+ epatch "${FILESDIR}"/0.52-fix_installation_paths.patch
python_fix_shebang "${S}"
sed "s|python setup-util.py|${EPYTHON} setup-util.py|" "${S}"/util/Makefile -i || die
sed "s|python setup.py|${EPYTHON} setup.py|" "${S}"/{libkd,sdss,blind}/Makefile -i || die
@@ -71,21 +72,22 @@ src_compile() {
}
src_install() {
- # TODO: install in standard directories to respect FHS
export INSTALL_DIR="${ED}"/usr
+ export DATA_INSTALL_DIR="${INSTALL_DIR}"/share/"${PF}"/data
+ export BIN_INSTALL_DIR="${INSTALL_DIR}"/bin
+ export INCLUDE_INSTALL_DIR="${INSTALL_DIR}"/include/"${PF}"
+ export LIB_INSTALL_DIR="${INSTALL_DIR}"/lib
+ python_export python2.7
+ export PY_BASE_INSTALL_DIR="${LIB_INSTALL_DIR}"/"${EPYTHON}"/"${PF}"
+ export PY_BASE_LINK_DIR=../lib/"${EPYTHON}"/"${PF}"
+ export ETC_INSTALL_DIR="${INSTALL_DIR}"/share/"${PF}"/etc
+ export DOC_INSTALL_DIR="${INSTALL_DIR}"/share/doc/"${PF}"
+ export UPS_INSTALL_DIR="${DOC_INSTALL_DIR}"/ups
+ export EXAMPLES_INSTALL_DIR="${DOC_INSTALL_DIR}"/examples
+
emake install-core
use extra && emake -C blind install-extra
# remove cfitsio duplicates
rm ${INSTALL_DIR}/bin/{fitscopy,imcopy,listhead} || die
-
- # remove license file
- rm ${INSTALL_DIR}/doc/LICENSE || die
- dodoc ${INSTALL_DIR}/doc/*
- rm -r ${INSTALL_DIR}/doc || die
- if use examples; then
- mv ${INSTALL_DIR}/examples "${ED}"/usr/share/doc/${PF} || die
- else
- rm -r ${INSTALL_DIR}/examples || die
- fi
} \ No newline at end of file
diff --git a/sci-astronomy/astrometry/files/0.52-fix_installation_paths.patch b/sci-astronomy/astrometry/files/0.52-fix_installation_paths.patch
new file mode 100644
index 0000000..088dd46
--- /dev/null
+++ b/sci-astronomy/astrometry/files/0.52-fix_installation_paths.patch
@@ -0,0 +1,50 @@
+diff -wurN astrometry.net-0.52/Makefile astrometry.net-0.52.fix-paths/Makefile
+--- astrometry.net-0.52/Makefile 2015-03-06 21:26:45.000000000 +0100
++++ astrometry.net-0.52.fix-paths/Makefile 2015-03-11 19:30:45.513371808 +0100
+@@ -122,18 +122,18 @@
+ install-core:
+ mkdir -p '$(DATA_INSTALL_DIR)'
+ mkdir -p '$(BIN_INSTALL_DIR)'
+- mkdir -p '$(INSTALL_DIR)/doc'
++ mkdir -p '$(DOC_INSTALL_DIR)'
+ mkdir -p '$(INCLUDE_INSTALL_DIR)'
+ mkdir -p '$(LIB_INSTALL_DIR)'
+- mkdir -p '$(INSTALL_DIR)/examples'
++ mkdir -p '$(EXAMPLES_INSTALL_DIR)'
+ mkdir -p '$(PY_BASE_INSTALL_DIR)'
+- mkdir -p '$(INSTALL_DIR)/ups'
+- cp ups/astrometry_net.table-dist '$(INSTALL_DIR)/ups/astrometry_net.table'
+- cp ups/astrometry_net.cfg '$(INSTALL_DIR)/ups'
++ mkdir -p '$(UPS_INSTALL_DIR)'
++ cp ups/astrometry_net.table-dist '$(UPS_INSTALL_DIR)/astrometry_net.table'
++ cp ups/astrometry_net.cfg '$(UPS_INSTALL_DIR)/'
+ cp __init__.py '$(PY_BASE_INSTALL_DIR)'
+- cp CREDITS LICENSE README.md '$(INSTALL_DIR)/doc'
+- cp report.txt '$(INSTALL_DIR)/doc'
+- cp demo/* '$(INSTALL_DIR)/examples'
++ cp CREDITS LICENSE README.md '$(DOC_INSTALL_DIR)/'
++ cp report.txt '$(DOC_INSTALL_DIR)/'
++ cp demo/* '$(EXAMPLES_INSTALL_DIR)/'
+ $(MAKE) -C util install-core
+ $(MAKE) -C catalogs install
+ $(MAKE) -C libkd install
+diff -wurN astrometry.net-0.52/util/makefile.common astrometry.net-0.52.fix-paths/util/makefile.common
+--- astrometry.net-0.52/util/makefile.common 2015-03-06 21:26:45.000000000 +0100
++++ astrometry.net-0.52.fix-paths/util/makefile.common 2015-03-11 19:16:37.893728999 +0100
+@@ -22,16 +22,6 @@
+ # Put INSTALL_DIR in the environment of commands run by Make.
+ export INSTALL_DIR
+
+-# Installation subdirs
+-
+-PY_BASE_INSTALL_DIR := $(INSTALL_DIR)/lib/python/astrometry
+-INCLUDE_INSTALL_DIR := $(INSTALL_DIR)/include/astrometry
+-LIB_INSTALL_DIR := $(INSTALL_DIR)/lib
+-BIN_INSTALL_DIR := $(INSTALL_DIR)/bin
+-DATA_INSTALL_DIR := $(INSTALL_DIR)/data
+-PY_BASE_LINK_DIR := ../lib/python/astrometry
+-ETC_INSTALL_DIR ?= $(INSTALL_DIR)/etc
+-
+ # If your build system stages an install in one place (say, a temp
+ # dir) and then copies everything to the final install place, (eg,
+ # debian), set *_INSTALL_DIR to the staging place and *_FINAL_DIR to
diff --git a/sci-astronomy/astrometry/files/0.52-respect-user-flags b/sci-astronomy/astrometry/files/0.52-respect-user-flags.patch
index 6902310..6902310 100644
--- a/sci-astronomy/astrometry/files/0.52-respect-user-flags
+++ b/sci-astronomy/astrometry/files/0.52-respect-user-flags.patch