summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2015-05-12 00:11:16 (GMT)
committerChristian Pointner <equinox@helsinki.at>2015-05-12 00:11:30 (GMT)
commit17c62fa8decb49ea2cdea67e690bf3acac2a2a6d (patch)
treea4c00db4f283d1b9d038f12a6a385adb0c39a600 /src
parentd71335b6ccb2b71e846736bc8e7e8a3ccc954b7f (diff)
installing *.lua file into /usr/share/rhnop and not lib
Diffstat (limited to 'src')
-rw-r--r--src/Makefile32
-rwxr-xr-xsrc/configure16
-rw-r--r--src/nopsyncd.c6
3 files changed, 27 insertions, 27 deletions
diff --git a/src/Makefile b/src/Makefile
index e9af20a..d9d7506 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -77,20 +77,20 @@ install-bin: $(EXECUTABLE)
$(INSTALL) -m 755 noprml $(DESTDIR)$(BINDIR)
$(INSTALL) -m 755 nopcollectd $(DESTDIR)$(BINDIR)
$(SED) -e 's#^conffile = "nopcollectd#conffile = "$(ETCDIR)/rhnop/nopcollectd#' -i $(DESTDIR)$(BINDIR)/nopcollectd
- $(SED) -e 's#_rhnoplibdir_/?.lua#$(LIBDIR)/?.lua#' -i $(DESTDIR)$(BINDIR)/nopcollectd
+ $(SED) -e 's#_rhnoplibdir_/?.lua#$(DATAROOTDIR)/rhnop/?.lua#' -i $(DESTDIR)$(BINDIR)/nopcollectd
$(INSTALL) -m 755 nopsysstated $(DESTDIR)$(BINDIR)
$(SED) -e 's#^conffile = "nopsysstated#conffile = "$(ETCDIR)/rhnop/nopsysstated#' -i $(DESTDIR)$(BINDIR)/nopsysstated
- $(SED) -e 's#_rhnoplibdir_/?.lua#$(LIBDIR)/?.lua#' -i $(DESTDIR)$(BINDIR)/nopsysstated
+ $(SED) -e 's#_rhnoplibdir_/?.lua#$(DATAROOTDIR)/rhnop/?.lua#' -i $(DESTDIR)$(BINDIR)/nopsysstated
install-lib:
- $(INSTALL) -d $(DESTDIR)$(LIBDIR)
- $(INSTALL) -m 644 conf.lua $(DESTDIR)$(LIBDIR)
- $(INSTALL) -m 644 db.lua $(DESTDIR)$(LIBDIR)
- $(INSTALL) -m 644 playlog.lua $(DESTDIR)$(LIBDIR)
- $(INSTALL) -m 644 rddb.lua $(DESTDIR)$(LIBDIR)
- $(INSTALL) -m 644 qlistener.lua $(DESTDIR)$(LIBDIR)
- $(SED) -e 's#^conffile = "nopsyncd#conffile = "$(ETCDIR)/rhnop/nopsyncd#' -i $(DESTDIR)$(LIBDIR)/qlistener.lua
- $(INSTALL) -m 644 tcpserver.lua $(DESTDIR)$(LIBDIR)
+ $(INSTALL) -d $(DESTDIR)$(DATAROOTDIR)/rhnop
+ $(INSTALL) -m 644 conf.lua $(DESTDIR)$(DATAROOTDIR)/rhnop
+ $(INSTALL) -m 644 db.lua $(DESTDIR)$(DATAROOTDIR)/rhnop
+ $(INSTALL) -m 644 playlog.lua $(DESTDIR)$(DATAROOTDIR)/rhnop
+ $(INSTALL) -m 644 rddb.lua $(DESTDIR)$(DATAROOTDIR)/rhnop
+ $(INSTALL) -m 644 qlistener.lua $(DESTDIR)$(DATAROOTDIR)/rhnop
+ $(SED) -e 's#^conffile = "nopsyncd#conffile = "$(ETCDIR)/rhnop/nopsyncd#' -i $(DESTDIR)$(DATAROOTDIR)/rhnop/qlistener.lua
+ $(INSTALL) -m 644 tcpserver.lua $(DESTDIR)$(DATAROOTDIR)/rhnop
install-etc:
$(INSTALL) -d $(DESTDIR)$(ETCDIR)/rhnop
@@ -109,12 +109,12 @@ remove-bin:
rm -f $(DESTDIR)$(BINDIR)/nopsysstated
remove-lib:
- rm -f $(DESTDIR)$(LIBDIR)/conf.lua
- rm -f $(DESTDIR)$(LIBDIR)/db.lua
- rm -f $(DESTDIR)$(LIBDIR)/playlog.lua
- rm -f $(DESTDIR)$(LIBDIR)/rddb.lua
- rm -f $(DESTDIR)$(LIBDIR)/qlistener.lua
- rm -f $(DESTDIR)$(LIBDIR)/tcpserver.lua
+ rm -f $(DESTDIR)$(DATAROOTDIR)/rhnop/conf.lua
+ rm -f $(DESTDIR)$(DATAROOTDIR)/rhnop/db.lua
+ rm -f $(DESTDIR)$(DATAROOTDIR)/rhnop/playlog.lua
+ rm -f $(DESTDIR)$(DATAROOTDIR)/rhnop/rddb.lua
+ rm -f $(DESTDIR)$(DATAROOTDIR)/rhnop/qlistener.lua
+ rm -f $(DESTDIR)$(DATAROOTDIR)/rhnop/tcpserver.lua
remove-etc:
diff --git a/src/configure b/src/configure
index dd60d70..1cd11fd 100755
--- a/src/configure
+++ b/src/configure
@@ -32,7 +32,7 @@ LUA_VER=''
PREFIX='/usr/local'
BINDIR=''
ETCDIR=''
-LIBDIR=''
+DATAROOTDIR=''
print_usage() {
echo "configure --help print this"
@@ -40,7 +40,7 @@ print_usage() {
echo " --prefix=<PREFIX> the installation prefix (default: /usr/local)"
echo " --bindir=<DIR> the path to the bin directory (default: $PREFIX/bin)"
echo " --sysconfdir=<DIR> the path to the system configuration directory (default: $PREFIX/etc)"
- echo " --libdir=<DIR> the path to the lua library directory (default: $PREFIX/lib/rhnop)"
+ echo " --datarootdir=<DIR> the path to the native lua libs (default: $PREFIX/share)"
echo " --with-lua=<DIR> use this lua tree instead of system default"
echo " --lua-version=nnn set fixed Lua version for automatic detection (501 -> 5.1, 502 -> 5.2)"
echo " --use-clang use clang/llvm as compiler/linker"
@@ -64,8 +64,8 @@ do
--sysconfdir=*)
ETCDIR=${arg#--sysconfdir=}
;;
- --libdir=*)
- LIBDIR=${arg#--libdir=}
+ --datarootdir=*)
+ DATAROOTDIR=${arg#--datarootdir=}
;;
--with-lua=*)
LUA_DIR=${arg#--with-lua=}
@@ -210,8 +210,8 @@ if [ -z "$ETCDIR" ]; then
ETCDIR=$PREFIX/etc
fi
-if [ -z "$LIBDIR" ]; then
- LIBDIR=$PREFIX/lib/rhnop
+if [ -z "$DATAROOTDIR" ]; then
+ DATAROOTDIR=$PREFIX/share
fi
cat > include.mk <<EOF
@@ -232,7 +232,7 @@ SED := sed
PREFIX := '$PREFIX'
BINDIR := '$BINDIR'
ETCDIR := '$ETCDIR'
-LIBDIR := '$LIBDIR'
+DATAROOTDIR := '$DATAROOTDIR'
EOF
cat > config.h <<EOF
@@ -251,7 +251,7 @@ cat > config.h <<EOF
#define PREFIX "$PREFIX"
#define BINDIR "$BINDIR"
#define ETCDIR "$ETCDIR"
-#define LIBDIR "$LIBDIR"
+#define DATAROOTDIR "$DATAROOTDIR"
#endif
EOF
diff --git a/src/nopsyncd.c b/src/nopsyncd.c
index d4f3c08..f3fcc22 100644
--- a/src/nopsyncd.c
+++ b/src/nopsyncd.c
@@ -33,8 +33,8 @@
#include "config.h"
#define LUA_MAIN_LOOP_FUNC "main_loop"
-#define QLISTENER LIBDIR"/qlistener.lua"
-#define TCPSERVER LIBDIR"/tcpserver.lua"
+#define QLISTENER DATAROOTDIR"/rhnop/qlistener.lua"
+#define TCPSERVER DATAROOTDIR"/rhnop/tcpserver.lua"
#if LUA_VERSION_NUM > 501
static const luaL_Reg nopsyncd_lualibs[] = {
@@ -92,7 +92,7 @@ int init_main_loop(lua_State *L, const char* filename)
return -1;
}
- lua_pushstring(L, LIBDIR);
+ lua_pushstring(L, DATAROOTDIR);
lua_setglobal(L, "rhnoplibdir");
ret = lua_pcall(L, 0, 0, 0);