Для створення каталогів додано змінну DIR_MODE (там де вона потрібна).
Прибрано зайве створення каталогів /usr/sbin і подібних.
install: install-bin
install-bin:
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:
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)
ifneq ($(MAKECMDGOALS),distclean)
ifneq ($(MAKECMDGOALS),clean)
install: install-bin install-data
install-bin:
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
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
install -m $(DATA_MODE) -o $(OWNER) ./rscriptd.conf $(PREFIX)/etc/stargazer/rscriptd.conf
uninstall: uninstall-bin uninstall-data
PREFIX="/"
BIN_MODE=0755
DATA_MODE=0644
PREFIX="/"
BIN_MODE=0755
DATA_MODE=0644
echo "PREFIX=$PREFIX" >> $CONFFILE
echo "BIN_MODE=$BIN_MODE" >> $CONFFILE
echo "DATA_MODE=$DATA_MODE" >> $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
echo "OWNER=$OWNER" >> $CONFFILE
$MAKE $MAKEOPTS
install: install-bin install-data
install-bin:
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
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
install -m $(DATA_MODE) -o $(OWNER) ./sgauth.conf $(PREFIX)/etc/sgauth.conf
uninstall: uninstall-bin uninstall-data
uninstall-data:
# Uninstall etc
uninstall-data:
# Uninstall etc
- rm -f $(PREFIX)/etc/stargazer/sgauth.conf
+ rm -f $(PREFIX)/etc/sgauth.conf
ifneq ($(MAKECMDGOALS),distclean)
ifneq ($(MAKECMDGOALS),distclean)
PREFIX="/"
BIN_MODE=0755
DATA_MODE=0644
PREFIX="/"
BIN_MODE=0755
DATA_MODE=0644
distclean: clean
rm -f ../../Makefile.conf
distclean: clean
rm -f ../../Makefile.conf
-install: install-bin install-data
- 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 -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)
$(MAKE) -C $(DIR_LIBSRC) install
uninstall: uninstall-bin uninstall-data
uninstall-bin:
rm -f $(PREFIX)/usr/sbin/$(PROG)
uninstall: uninstall-bin uninstall-data
uninstall-bin:
rm -f $(PREFIX)/usr/sbin/$(PROG)
ifneq ($(MAKECMDGOALS),distclean)
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(MAKECMDGOALS),distclean)
ifneq ($(MAKECMDGOALS),clean)
install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/sbin/$(PROG)
$(MAKE) -C $(DIR_LIBSRC) install
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: 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)
ifneq ($(MAKECMDGOALS),distclean)
ifneq ($(MAKECMDGOALS),clean)
install: install-bin install-data
install-bin:
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
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
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
install -m $(BIN_MODE) -o $(OWNER) $(ETC_DIR)/On* $(PREFIX)/etc/stargazer/
# Install file db
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
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
+# Dir access bits
+
+DIR_MODE=0755
+
# Binaries and data files owner
OWNER=root
# Binaries and data files owner
OWNER=root
echo "PREFIX=$PREFIX" >> $CONFFILE
echo "BIN_MODE=$BIN_MODE" >> $CONFFILE
echo "DATA_MODE=$DATA_MODE" >> $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
echo "OWNER=$OWNER" >> $CONFFILE
echo "VAR_DIR=$VAR_DIR" >> $CONFFILE
echo "ETC_DIR=$ETC_DIR" >> $CONFFILE
rm -f deps $(PROG) *.o tags *.*~
install:
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:
install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
uninstall:
- 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:
install -m $(BIN_MODE) -o $(OWNER) -s $(PROG) $(PREFIX)/usr/lib/stg/$(PROG)
uninstall: