diff --git a/Makefile b/Makefile index 6848ca4..e8a5a69 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,8 @@ SHELL=/bin/bash install: install -d -m 0755 "${DESTDIR}"/usr/share/environ.d/mc install -m 0644 port_base.cnf "${DESTDIR}"/usr/share/environ.d/mc/port_base.cnf ;\ + install -d -m 0755 "${DESTDIR}"/usr/share/environ.d/mc/data + install -m 0644 t/data/city.mmdb "${DESTDIR}"/usr/share/environ.d/mc/data/city.mmdb ;\ for d in local source; do \ test -d $$d || continue ;\ mkdir -p "${DESTDIR}"/usr/share/environ.d/mc/$$d ;\ @@ -20,6 +22,6 @@ install: for dd in $$d/* ; do \ test -L $$dd || continue ;\ l=$$(basename $$dd) ; \ - ln -fs "${DESTDIR}"/usr/share/environ.d/$$l/local/ "${DESTDIR}"/usr/share/environ.d/mc/$$d/$$l ; \ + ( cd "${DESTDIR}"/usr/share/environ.d/mc/$$d; ln -sf ../../$$l/local/ $$l ) ; \ done \ done diff --git a/local/gen_env.sh.m4 b/local/gen_env.sh.m4 index 80988ab..bcf2c3b 100644 --- a/local/gen_env.sh.m4 +++ b/local/gen_env.sh.m4 @@ -9,8 +9,11 @@ else echo export TEST_PG='${__dbi//\/pg\//\/db\//}' fi +mmdb=__workdir/../t/data/city.mmdb +test -f $mmdb || mmdb=/usr/share/environ.d/mc/data/city.mmdb + echo "export MIRRORCACHE_ROOT=__workdir/dt -export MIRRORCACHE_CITY_MMDB=__workdir/../t/data/city.mmdb +export MIRRORCACHE_CITY_MMDB=$mmdb export MOJO_LISTEN=http://*:__port export MIRRORCACHE_AUTH_URL='' export MIRRORCACHE_PERMANENT_JOBS=''