Commit 29389483 authored by Michal Privoznik's avatar Michal Privoznik

Install libvirt-php.ini more wisely

Instead of creating the file directly under the installation
directory, lets just create it locally and copy afterwards.
Signed-off-by: 's avatarMichal Privoznik <mprivozn@redhat.com>
parent 5b9d7659
......@@ -148,5 +148,5 @@ AC_SUBST([SHLIB_FLAGS])
AC_SUBST([PHPIZE])
AC_SUBST([PHPCONFIG])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([$PACKAGE.spec])
AC_CONFIG_FILES([libvirt-php.spec])
AC_OUTPUT
......@@ -6,23 +6,24 @@ WL=@WL@
SHLIB_FLAGS=@SHLIB_FLAGS@
install-exec-local:
$(MKDIR_P) $(DESTDIR)$(PHPEDIR)
$(MKDIR_P) $(DESTDIR)$(PHPCDIR)
$(INSTALL) -m 644 -D .libs/$(PACKAGE).so $(DESTDIR)$(PHPEDIR)/$(PACKAGE).so
$(INSTALL) -m 755 -d $(DESTDIR)$(PHPCDIR)
$(ECHO) "extension=$(PACKAGE).so" > $(DESTDIR)$(PHPCDIR)/libvirt-php.ini
$(ECHO) >> $(DESTDIR)$(PHPCDIR)/libvirt-php.ini
$(ECHO) "[libvirt]" >> $(DESTDIR)$(PHPCDIR)/libvirt-php.ini
$(ECHO) "; Path to ISO images for VM installations" >> $(DESTDIR)$(PHPCDIR)/libvirt-php.ini
$(ECHO) "libvirt.iso_path=/var/lib/libvirt/images" >> $(DESTDIR)$(PHPCDIR)/libvirt-php.ini
$(ECHO) "; Path where disk images for new VMs should be created" >> $(DESTDIR)$(PHPCDIR)/libvirt-php.ini
$(ECHO) "libvirt.image_path=/var/lib/libvirt/images" >> $(DESTDIR)$(PHPCDIR)/libvirt-php.ini
$(ECHO) "; Limit maximum number of libvirt connections" >> $(DESTDIR)$(PHPCDIR)/libvirt-php.ini
$(ECHO) "libvirt.max_connections=5" >> $(DESTDIR)$(PHPCDIR)/libvirt-php.ini
$(MKDIR_P) $(DESTDIR)$(prefix)$(PHPEDIR)
$(MKDIR_P) $(DESTDIR)$(prefix)$(PHPCDIR)
$(INSTALL) -m 644 -D .libs/$(PACKAGE).so $(DESTDIR)$(prefix)$(PHPEDIR)/$(PACKAGE).so
$(INSTALL) -m 755 -d $(DESTDIR)$(prefix)$(PHPCDIR)
$(ECHO) "extension=$(PACKAGE).so" > libvirt-php.ini
$(ECHO) >> libvirt-php.ini
$(ECHO) "[libvirt]" >> libvirt-php.ini
$(ECHO) "; Path to ISO images for VM installations" >> libvirt-php.ini
$(ECHO) "libvirt.iso_path=/var/lib/libvirt/images" >> libvirt-php.ini
$(ECHO) "; Path where disk images for new VMs should be created" >> libvirt-php.ini
$(ECHO) "libvirt.image_path=/var/lib/libvirt/images" >> libvirt-php.ini
$(ECHO) "; Limit maximum number of libvirt connections" >> libvirt-php.ini
$(ECHO) "libvirt.max_connections=5" >> libvirt-php.ini
$(INSTALL) -m 644 -D libvirt-php.ini $(DESTDIR)$(prefix)$(PHPCDIR)/$(PACKAGE).ini
uninstall-local:
$(RM) -f $(DESTDIR)$(PHPCDIR)/$(PACKAGE).ini
$(RM) -f $(DESTDIR)$(PHPEDIR)/$(PACKAGE).so
$(RM) -f $(DESTDIR)$(prefix)$(PHPCDIR)/$(PACKAGE).ini
$(RM) -f $(DESTDIR)$(prefix)$(PHPEDIR)/$(PACKAGE).so
AM_CFLAGS = \
$(PHPINC) $(LIBXML_CFLAGS) \
......@@ -43,3 +44,5 @@ libvirt_php_la_SOURCES = \
libvirt_php_la_CFLAGS = \
$(AM_CFLAGS) \
-DCOMPILE_DL_LIBVIRT=1
CLEANFILES = libvirt-php.ini
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment