Skip to content

Commit

Permalink
fix: Don't depend on GNU install during 'make install'
Browse files Browse the repository at this point in the history
Closes #637
  • Loading branch information
g-bougard committed Feb 19, 2019
1 parent fc829c6 commit 4472423
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 2 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Revision history for FusionInventory agent
core:
* fix some cases where a file handle was not closed
* win32: fix a handle leak case when agent was running as service
* Fix #637: Don't depend on GNU install during "make install" to support
more Unix systems

inventory:
* win32 antivirus support update:
Expand Down
20 changes: 9 additions & 11 deletions Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -239,24 +239,22 @@ sub install {
$install .= <<'EOF';
config_install : pure_install
install -d -m 755 $(DESTDIR)$(SYSCONFDIR)
if [ -f $(DESTDIR)/$(SYSCONFDIR)/agent.cfg ]; then \
install -m 644 etc/agent.cfg $(DESTDIR)$(SYSCONFDIR)/agent.cfg.new; \
$(MKPATH) $(DESTDIR)$(SYSCONFDIR)
$(NOECHO) $(CHMOD) $(PERM_DIR) $(DESTDIR)$(SYSCONFDIR)
if $(TEST_F) $(DESTDIR)/$(SYSCONFDIR)/agent.cfg; then \
$(RM_F) $(DESTDIR)$(SYSCONFDIR)/agent.cfg.new; \
$(CP) etc/agent.cfg $(DESTDIR)$(SYSCONFDIR)/agent.cfg.new; \
$(CHMOD) $(PERM_RW) $(DESTDIR)$(SYSCONFDIR)/agent.cfg.new; \
else \
install -m 644 etc/agent.cfg $(DESTDIR)$(SYSCONFDIR)/agent.cfg; \
$(CP) etc/agent.cfg $(DESTDIR)$(SYSCONFDIR)/agent.cfg; \
$(CHMOD) $(PERM_RW) $(DESTDIR)$(SYSCONFDIR)/agent.cfg; \
fi
$(ABSPERLRUN) -pi \
-e "s|=> undef, # SYSCONFDIR.*|=> '$(SYSCONFDIR)',|;" \
$(DESTDIR)$(DATADIR)/lib/FusionInventory/Agent/Config.pm
data_install : pure_install
install -d -m 755 $(DESTDIR)$(DATADIR)
install -m 644 share/pci.ids $(DESTDIR)$(DATADIR)/
install -m 644 share/usb.ids $(DESTDIR)$(DATADIR)/
install -m 644 share/sysobject.ids $(DESTDIR)$(DATADIR)/
install -m 644 share/edid.ids $(DESTDIR)$(DATADIR)/
install -d -m 755 $(DESTDIR)$(DATADIR)/html
install -m 644 share/html/* $(DESTDIR)$(DATADIR)/html
$(MOD_INSTALL) "share" "$(DESTDIR)$(DATADIR)"
setup_install : pure_install
# Cleanup setup file to only really needed hash during install
Expand Down

0 comments on commit 4472423

Please sign in to comment.