From: Maxim Mamontov Date: Fri, 4 Feb 2011 14:54:18 +0000 (+0200) Subject: Зміни у системі установки/видалення X-Git-Tag: 2.407-rc3~182 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/d614b065a35df8f3adaa4a4afc0d7a6cb02eef97?ds=sidebyside;hp=--cc Зміни у системі установки/видалення Для створення каталогів додано змінну DIR_MODE (там де вона потрібна). Прибрано зайве створення каталогів /usr/sbin і подібних. --- d614b065a35df8f3adaa4a4afc0d7a6cb02eef97 diff --git a/projects/rlm_stg/Makefile b/projects/rlm_stg/Makefile index deaf437e..20530c52 100644 --- a/projects/rlm_stg/Makefile +++ b/projects/rlm_stg/Makefile @@ -53,14 +53,13 @@ distclean: clean install: install-bin install-bin: - mkdir -m $(BIN_MODE) -p $(PREFIX)/usr/lib install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/$(PROG) $(MAKE) -C $(DIR_LIBSRC) install uninstall: uninstall-bin uninstall-bin: - rm -f $(PREFIX)/usr/sbin/$(PROG) + rm -f $(PREFIX)/usr/lib/$(PROG) ifneq ($(MAKECMDGOALS),distclean) ifneq ($(MAKECMDGOALS),clean) diff --git a/projects/rscriptd/Makefile b/projects/rscriptd/Makefile index 03e95fa7..ff08de0d 100644 --- a/projects/rscriptd/Makefile +++ b/projects/rscriptd/Makefile @@ -56,13 +56,12 @@ distclean: clean install: install-bin install-data install-bin: - mkdir -m $(BIN_MODE) -p $(PREFIX)/usr/sbin install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG) $(MAKE) -C $(DIR_LIBSRC) install install-data: # Install etc - mkdir -m $(DATA_MODE) -p $(PREFIX)/etc/stargazer + mkdir -m $(DIR_MODE) -p $(PREFIX)/etc/stargazer install -m $(DATA_MODE) -o $(OWNER) ./rscriptd.conf $(PREFIX)/etc/stargazer/rscriptd.conf uninstall: uninstall-bin uninstall-data diff --git a/projects/rscriptd/build b/projects/rscriptd/build index 38302ee3..53916ebf 100755 --- a/projects/rscriptd/build +++ b/projects/rscriptd/build @@ -13,6 +13,7 @@ CONFFILE="../../Makefile.conf" PREFIX="/" BIN_MODE=0755 DATA_MODE=0644 +DIR_MODE=0755 OWNER=root if [ -z $1 ] @@ -138,6 +139,7 @@ echo "LDFLAGS=$LDFLAGS" >> $CONFFILE echo "PREFIX=$PREFIX" >> $CONFFILE echo "BIN_MODE=$BIN_MODE" >> $CONFFILE echo "DATA_MODE=$DATA_MODE" >> $CONFFILE +echo "DIR_MODE=$DIR_MODE" >> $CONFFILE echo "OWNER=$OWNER" >> $CONFFILE $MAKE $MAKEOPTS diff --git a/projects/sgauth/Makefile b/projects/sgauth/Makefile index 7f597b95..12c7b9fc 100644 --- a/projects/sgauth/Makefile +++ b/projects/sgauth/Makefile @@ -56,13 +56,12 @@ distclean: clean install: install-bin install-data install-bin: - mkdir -m $(BIN_MODE) -p $(PREFIX)/usr/sbin install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG) $(MAKE) -C $(DIR_LIBSRC) install install-data: # Install etc - mkdir -m $(DATA_MODE) -p $(PREFIX)/etc + mkdir -m $(DIR_MODE) -p $(PREFIX)/etc install -m $(DATA_MODE) -o $(OWNER) ./sgauth.conf $(PREFIX)/etc/sgauth.conf uninstall: uninstall-bin uninstall-data @@ -72,7 +71,7 @@ uninstall-bin: uninstall-data: # Uninstall etc - rm -f $(PREFIX)/etc/stargazer/sgauth.conf + rm -f $(PREFIX)/etc/sgauth.conf ifneq ($(MAKECMDGOALS),distclean) diff --git a/projects/sgauth/build b/projects/sgauth/build index e61b957c..eef6026f 100755 --- a/projects/sgauth/build +++ b/projects/sgauth/build @@ -13,6 +13,7 @@ CONFFILE="../../Makefile.conf" PREFIX="/" BIN_MODE=0755 DATA_MODE=0644 +DIR_MODE=0755 OWNER=root if [ -z $1 ] diff --git a/projects/sgconf/Makefile b/projects/sgconf/Makefile index f9f0042b..6cc8962f 100644 --- a/projects/sgconf/Makefile +++ b/projects/sgconf/Makefile @@ -63,22 +63,17 @@ clean: distclean: clean rm -f ../../Makefile.conf -install: install-bin install-data +install: install-bin install-bin: - mkdir -m $(BIN_MODE) -p $(PREFIX)/usr/sbin install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG) $(MAKE) -C $(DIR_LIBSRC) install -install-data: - uninstall: uninstall-bin uninstall-data uninstall-bin: rm -f $(PREFIX)/usr/sbin/$(PROG) -uninstall-data: - ifneq ($(MAKECMDGOALS),distclean) ifneq ($(MAKECMDGOALS),clean) diff --git a/projects/sgconf_xml/Makefile b/projects/sgconf_xml/Makefile index 60288877..33989ae2 100644 --- a/projects/sgconf_xml/Makefile +++ b/projects/sgconf_xml/Makefile @@ -69,19 +69,11 @@ install-bin: install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG) $(MAKE) -C $(DIR_LIBSRC) install -install-data: - # Install etc - install -m $(DATA_MODE) -o $(OWNER) -D $(ETC_DIR)/sgconf.conf $(PREFIX)/etc/stargazer/sgconf.conf - uninstall: uninstall-bin uninstall-data uninstall-bin: rm -f $(PREFIX)/usr/sbin/$(PROG) -uninstall-data: - # Uninstall etc - rm -f $(PREFIX)/etc/stargazer/sgconf.conf - ifneq ($(MAKECMDGOALS),distclean) ifneq ($(MAKECMDGOALS),clean) diff --git a/projects/stargazer/Makefile b/projects/stargazer/Makefile index a0f2edca..1e7e70d4 100644 --- a/projects/stargazer/Makefile +++ b/projects/stargazer/Makefile @@ -73,16 +73,15 @@ distclean: clean install: install-bin install-data install-bin: - mkdir -m $(BIN_MODE) -p $(PREFIX)/usr/sbin install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG) $(MAKE) -C $(DIR_LIBSRC) install $(MAKE) -C $(DIR_PLUGINS) install install-data: # Install etc - mkdir -m $(DATA_MODE) -p $(PREFIX)/etc/stargazer - mkdir -m $(DATA_MODE) -p $(PREFIX)/etc/stargazer/conf-available.d - mkdir -m $(DATA_MODE) -p $(PREFIX)/etc/stargazer/conf-enabled.d + mkdir -m $(DIR_MODE) -p $(PREFIX)/etc/stargazer + mkdir -m $(DIR_MODE) -p $(PREFIX)/etc/stargazer/conf-available.d + mkdir -m $(DIR_MODE) -p $(PREFIX)/etc/stargazer/conf-enabled.d install -m $(DATA_MODE) -o $(OWNER) $(ETC_DIR)/stargazer.conf $(PREFIX)/etc/stargazer/stargazer.conf install -m $(DATA_MODE) -o $(OWNER) $(ETC_DIR)/conf-available.d/*.conf $(PREFIX)/etc/stargazer/conf-available.d ln -s $(PREFIX)/etc/stargazer/conf-available.d/mod_ao.conf $(PREFIX)/etc/stargazer/conf-enabled.d/mod_ao.conf @@ -100,9 +99,9 @@ endif install -m $(BIN_MODE) -o $(OWNER) $(ETC_DIR)/On* $(PREFIX)/etc/stargazer/ # Install file db - mkdir -m $(DATA_MODE) -p $(PREFIX)/var/stargazer/admins - mkdir -m $(DATA_MODE) -p $(PREFIX)/var/stargazer/tariffs - mkdir -m $(DATA_MODE) -p $(PREFIX)/var/stargazer/users/test + mkdir -m $(DIR_MODE) -p $(PREFIX)/var/stargazer/admins + mkdir -m $(DIR_MODE) -p $(PREFIX)/var/stargazer/tariffs + mkdir -m $(DIR_MODE) -p $(PREFIX)/var/stargazer/users/test install -m $(DATA_MODE) -o $(OWNER) $(VAR_DIR)/admins/admin.adm $(PREFIX)/var/stargazer/admins/admin.adm install -m $(DATA_MODE) -o $(OWNER) $(VAR_DIR)/tariffs/tariff.tf $(PREFIX)/var/stargazer/tariffs/tariff.tf install -m $(DATA_MODE) -o $(OWNER) $(VAR_DIR)/users/test/conf $(PREFIX)/var/stargazer/users/test/conf diff --git a/projects/stargazer/build b/projects/stargazer/build index cda3b5e0..637dc739 100755 --- a/projects/stargazer/build +++ b/projects/stargazer/build @@ -17,6 +17,10 @@ BIN_MODE=0755 DATA_MODE=0644 +# Dir access bits + +DIR_MODE=0755 + # Binaries and data files owner OWNER=root @@ -394,6 +398,7 @@ echo "LIB_THREAD=$LIB_THREAD" >> $CONFFILE echo "PREFIX=$PREFIX" >> $CONFFILE echo "BIN_MODE=$BIN_MODE" >> $CONFFILE echo "DATA_MODE=$DATA_MODE" >> $CONFFILE +echo "DIR_MODE=$DIR_MODE" >> $CONFFILE echo "OWNER=$OWNER" >> $CONFFILE echo "VAR_DIR=$VAR_DIR" >> $CONFFILE echo "ETC_DIR=$ETC_DIR" >> $CONFFILE diff --git a/projects/stargazer/plugins/Makefile.in b/projects/stargazer/plugins/Makefile.in index 7e01585e..87e0c4ce 100644 --- a/projects/stargazer/plugins/Makefile.in +++ b/projects/stargazer/plugins/Makefile.in @@ -23,7 +23,7 @@ clean: rm -f deps $(PROG) *.o tags *.*~ install: - mkdir -m $(BIN_MODE) -p $(PREFIX)/usr/lib/stg + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib/stg install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/stg/$(PROG) uninstall: diff --git a/stglibs/Makefile.in b/stglibs/Makefile.in index c6db5f99..714a99ea 100644 --- a/stglibs/Makefile.in +++ b/stglibs/Makefile.in @@ -67,7 +67,7 @@ clean: done install: $(PROG) - mkdir -m $(BIN_MODE) -p $(PREFIX)/usr/lib/stg + mkdir -m $(DIR_MODE) -p $(PREFIX)/usr/lib/stg install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/stg/$(PROG) uninstall: