mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 03:53:32 +01:00
make: Rpm build machinery now installs less empty directories
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
28dfd4d4d6
commit
0b9bc94a48
7 changed files with 23 additions and 14 deletions
|
|
@ -300,39 +300,47 @@ endef
|
|||
|
||||
# --- special installation rules, that the general rules farther down
|
||||
# below don't catch for whatever reason >
|
||||
$(INSTALL_INITDIR)/%: %.init | install_dir_INIT
|
||||
$(INSTALL_INITDIR)/%: %.init | provide_dir_INIT
|
||||
$(INSTALL) -o $(INITOWNER) -g $(INITGROUP) -m $(INITMODE) $< $@
|
||||
|
||||
$(INSTALL_SYSTEMDDIR)/%.service: %.service | install_dir_SYSTEMD
|
||||
$(INSTALL_SYSTEMDDIR)/%.service: %.service | provide_dir_SYSTEMD
|
||||
$(INSTALL) -o $(SYSTEMDOWNER) -g $(SYSTEMDGROUP) -m $(SYSTEMDMODE) $< $@
|
||||
|
||||
$(INSTALL_LOGROTDIR)/%: %.logrotate | install_dir_LOGROT
|
||||
$(INSTALL_LOGROTDIR)/%: %.logrotate | provide_dir_LOGROT
|
||||
$(INSTALL) -o $(LOGROTOWNER) -g $(LOGROTGROUP) -m $(LOGROTMODE) $< $@
|
||||
|
||||
$(INSTALL_APACHE_CONFDIR)/%.conf: %.apache-conf | install_dir_APACHE_CONF
|
||||
$(INSTALL_APACHE_CONFDIR)/%.conf: %.apache-conf | provide_dir_APACHE_CONF
|
||||
$(INSTALL) -o $(APACHE_CONFOWNER) -g $(APACHE_CONFGROUP) -m $(APACHE_CONFMODE) $< $@
|
||||
|
||||
$(INSTALL_RSYSLOGDIR)/%.conf: %.rsyslog | install_dir_RSYSLOG
|
||||
$(INSTALL_RSYSLOGDIR)/%.conf: %.rsyslog | provide_dir_RSYSLOG
|
||||
$(INSTALL) -o $(RSYSLOGOWNER) -g $(RSYSLOGGROUP) -m $(RSYSLOGMODE) $< $@
|
||||
|
||||
$(INSTALL_RSYSLOGDIR)/%.bprof: rsyslog-%.bprof | install_dir_RSYSLOG
|
||||
$(INSTALL_RSYSLOGDIR)/%.bprof: rsyslog-%.bprof | provide_dir_RSYSLOG
|
||||
$(INSTALL) -o $(RSYSLOGOWNER) -g $(RSYSLOGGROUP) -m $(RSYSLOGMODE) $< $@
|
||||
|
||||
$(INSTALL_SYSCFGDIR)/%: %.sysconf | install_dir_SYSCFG
|
||||
$(INSTALL_SYSCFGDIR)/%: %.sysconf | provide_dir_SYSCFG
|
||||
$(INSTALL) -o $(INITOWNER) -g $(INITGROUP) -m $(INITMODE) $< $@
|
||||
|
||||
# --- special installation rules <
|
||||
|
||||
# saving performance, so don't expand this always
|
||||
#ifeq ($(MAKE_CMDGOAL),install)
|
||||
define std_install_rules
|
||||
|
||||
build_$(1): $$(TOPDIR)/dir_build_$(1).done $$(BUILD_$(1))
|
||||
install_dir_$(1): | $$(INSTALL_$(1)DIR)
|
||||
provide_dir_$(1): | $$(TOPDIR)/dir_install_$(1).done
|
||||
install_$(1): install_dir_$(1) $$(INSTALLED_$(1))
|
||||
install_files_$(1): provide_dir_$(1) $$(INSTALLED_$(1))
|
||||
|
||||
$$(TOPDIR)/dir_build_$(1).done:
|
||||
mkdir -p $$(BUILD_$(1)DIR)
|
||||
touch $$@
|
||||
|
||||
$$(TOPDIR)/dir_install_$(1).done:
|
||||
mkdir -p $$(INSTALL_$(1)DIR)
|
||||
touch $$@
|
||||
|
||||
$$(BUILD_$(1)DIR)/%: % $$(TOPDIR)/dir_build_$(1).done
|
||||
@if [ ! $$< -ef $$@ -a "`echo $$< | $(SED) 's/\..*//'`" != local ]; then \
|
||||
echo install -m $($(1)MODE) $$< $$@ ;\
|
||||
|
|
@ -347,6 +355,7 @@ $$(INSTALL_$(1)DIR)/%: % | $$(INSTALL_$(1)DIR)
|
|||
$$(INSTALL) -o $$($(1)OWNER) -g $$($(1)GROUP) -m $$($(1)MODE) $$< $$@
|
||||
|
||||
endef
|
||||
#endef
|
||||
|
||||
$(foreach type, $(INSTALLATION_FILE_TYPES), $(eval $(call std_install_rules,$(type))))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue