Permalink
Browse files

Added uninstall target.

Using uninstall to clean up after RPM generation.
  • Loading branch information...
graziano
graziano committed Oct 27, 2009
1 parent 6f95eff commit 116504e9441ca42b79a17aecd44150e03e40c905
View
@@ -44,6 +44,7 @@ INSTALL = @INSTALL@
ANT = @ANT@ -e
WSDL2C = @WSDL2C@
JAVA_HOME = @JAVA_HOME@
+RM = @RM@
# compile time configurations
euca_theme = @INTERFACE_THEME@
View
@@ -55,6 +55,11 @@ install: deploy
@for subdir in $(SUBDIRS); do \
(cd $$subdir && $(MAKE) $@) || exit $$? ; done
+uninstall:
+ @$(RM) -f $(etcdir)/eucalyptus/eucalyptus-version
+ @for subdir in $(SUBDIRS); do \
+ (cd $$subdir && $(MAKE) $@) || exit $$? ; done
+
clean:
@for subdir in $(SUBDIRS); do \
(cd $$subdir && $(MAKE) $@) || exit $$? ; done
View
@@ -69,3 +69,9 @@ install: build
deploy: install
+uninstall:
+ make -C modules/storage-controller/native uninstall
+ make -C modules/bootstrap uninstall
+ $(RM) -rf $(etcdir)/eucalyptus/cloud.d
+ $(RM) -rf $(datarootdir)/eucalyptus/*jar
+ $(RM) -rf $(vardir)/eucalyptus/webapps
@@ -49,5 +49,7 @@ install:
$(INSTALL) -m 0755 eucalyptus-cloud $(sbindir)/eucalyptus-cloud
clean:
- rm -f $(OBJS) eucalyptus-cloud
+ @$(RM) -f $(OBJS) eucalyptus-cloud
+uninstall:
+ @$(RM) -f $(sbindir)/eucalyptus-cloud
@@ -21,3 +21,6 @@ clean:
install:
mkdir -p $(EUCALYPTUS)/usr/lib/eucalyptus/
cp $(LIBDIR)/$(LVM2_SO) $(EUCALYPTUS)/usr/lib/eucalyptus/
+
+uninstall:
+ rm -r $(EUCALYPTUS)/usr/lib/eucalyptus/$(LVM2_SO)
View
@@ -82,3 +82,8 @@ distclean: clean
install: deploy
@$(INSTALL) -m 0555 $(CLIENTKILLALL) $(sbindir)
@$(INSTALL) cc-client-policy.xml $(vardir)/lib/eucalyptus/keys/
+
+uninstall:
+ @$(RM) -f $(sbindir)/$(CLIENTKILLALL)
+ @$(RM) -f $(vardir)/lib/eucalyptus/keys/cc-client-policy.xml
+ @$(RM) -rf $(AXIS2C_SERVICES)/$(SERVICE_NAME)
View
@@ -108,6 +108,7 @@ AC_PROG_AWK
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_MAKE_SET
+AC_PATH_PROG(RM, rm):w
# let's search for WSDL2C.sh
# we cannot use AC_PROG_PATH because WSDL2C.sh is not executable
@@ -233,6 +234,7 @@ AC_DEFINE_UNQUOTED(EUCA_VERSION, "$EUCA_VERSION")
AC_SUBST(EUCA_VERSION)
AC_SUBST(TOP)
AC_SUBST(ANT)
+AC_SUBST(RM)
AC_SUBST(WSDL2C)
AC_SUBST(JAVA_HOME)
AC_SUBST(AXIS2C_HOME)
View
@@ -19,7 +19,7 @@
Summary: Elastic Utility Computing Architecture
Name: eucalyptus
-Version: 1.6-devel
+Version: 1.6.1
Release: 1
License: BSD
Group: Applications/System
@@ -170,13 +170,10 @@ make install
ls /usr/share/eucalyptus/*jar|grep -v eucalyptus-walrus|grep -v eucalyptus-storagecontroller|grep -v eucalyptus-interface > jar_list
%clean
-rm -rf /etc/eucalyptus /usr/lib/eucalyptus /usr/share/eucalyptus
-rm -rf /var/lib/eucalyptus /var/run/eucalyptus /var/log/eucalyptus
-rm -rf /usr/sbin/euca_conf /usr/sbin/euca_sync_key /usr/sbin/euca_killall
-rm -rf /usr/sbin/eucalytpus-cloud $RPM_BUILD_DIR/eucalyptus
-rm -f /etc/init.d/eucalyptus-cloud /etc/init.d/eucalyptus-nc
-rm -rf /etc/init.d/eucalyptus-cc /etc/init.d/eucalyptus-sc
-rm -rf /etc/init.d/eucalyptus-walrus
+make uninstall
+rm -rf $RPM_BUILD_DIR/eucalyptus
+rm -rf /var/lib/eucalyptus
+rm -rf /etc/eucalyptus
%files
%doc LICENSE INSTALL README CHANGELOG
@@ -205,13 +202,13 @@ rm -rf /etc/init.d/eucalyptus-walrus
%files cloud
/etc/init.d/eucalyptus-cloud
-/usr/share/eucalyptus/eucalyptus-cloud-%{version}.jar
+/usr/share/eucalyptus/eucalyptus-cloud-*.jar
%files walrus
-/usr/share/eucalyptus/eucalyptus-walrus-%{version}.jar
+/usr/share/eucalyptus/eucalyptus-walrus-*.jar
%files sc
-/usr/share/eucalyptus/eucalyptus-storagecontroller-%{version}.jar
+/usr/share/eucalyptus/eucalyptus-storagecontroller-*.jar
%files cc
/opt/euca-axis2c/services/EucalyptusCC
View
@@ -67,3 +67,6 @@ distclean:
rm -rf generated $(SERVICE_SO) *.o $(CLIENT) *~* *#*
install:
+
+uninstall:
+ @$(RM) -rf $(AXIS2C_SERVICES)/$(SERVICE_NAME)
View
@@ -19,3 +19,6 @@ distclean:
install:
deploy:
+
+uninstall:
+
View
@@ -101,3 +101,9 @@ distclean:
install: deploy
$(INSTALL) nc-client-policy.xml $(vardir)/lib/eucalyptus/keys/
$(INSTALL) -m 0755 test_nc $(sbindir)/euca_test_nc
+
+uninstall:
+ $(RM) -f $(vardir)/lib/eucalyptus/keys/nc-client-policy.xml
+ $(RM) -f $(sbindir)/euca_test_nc
+ $(RM) -rf $(AXIS2C_SERVICES)/$(SERVICE_NAME)
+
View
@@ -46,3 +46,5 @@ install:
deploy:
+uninstall:
+
View
@@ -11,7 +11,7 @@ build: all
deploy:
clean:
- rm -f *~ *.o
+ $(RM) -f *~ *.o
distclean:
@echo "removing generated files scripts ..."
@@ -43,3 +43,22 @@ install: build
@$(INSTALL) -m 755 euca_conf $(sbindir)
@$(INSTALL) -m 755 euca_sync_key $(sbindir)
+uninstall:
+ @$(RM) -f $(etcdir)/init.d/eucalyptus-cloud
+ @$(RM) -f $(etcdir)/init.d/eucalyptus-nc
+ @$(RM) -f $(etcdir)/init.d/eucalyptus-cc
+ @$(RM) -f $(etcdir)/eucalyptus/httpd*
+ @$(RM) -f $(etcdir)/eucalyptus/eucalyptus.conf
+ @$(RM) -f $(etcdir)/eucalyptus/vtunall.conf.template
+ @$(RM) -f $(datarootdir)/eucalyptus/add_key.pl
+ @$(RM) -f $(datarootdir)/eucalyptus/gen_libvirt_xml
+ @$(RM) -f $(datarootdir)/eucalyptus/gen_kvm_libvirt_xml
+ @$(RM) -f $(datarootdir)/eucalyptus/detach.pl
+ @$(RM) -f $(datarootdir)/eucalyptus/partition2disk
+ @$(RM) -f $(datarootdir)/eucalyptus/get_xen_info
+ @$(RM) -f $(datarootdir)/eucalyptus/get_sys_info
+ @$(RM) -f $(datarootdir)/eucalyptus/euca_ipt
+ @$(RM) -f $(datarootdir)/eucalyptus/populate_arp.pl
+ @$(RM) -f $(sbindir)/euca_conf
+ @$(RM) -f $(sbindir)/euca_sync_key
+
View
@@ -32,3 +32,7 @@ install:
deploy:
+uninstall:
+ @$(RM) -f $(usrdir)/lib/eucalyptus/euca_rootwrap
+ @$(RM) -f $(usrdir)/lib/eucalyptus/euca_mountwrap
+

0 comments on commit 116504e

Please sign in to comment.