diff options
author | Daniel Joseph Barnhart Clark <dclark@pobox.com> | 2006-08-24 03:21:17 +0000 |
---|---|---|
committer | Daniel Joseph Barnhart Clark <dclark@pobox.com> | 2006-08-24 03:21:17 +0000 |
commit | 144f1344adf60815c8c57e93b5ed0acf98bbc40f (patch) | |
tree | f9035e2b49da8139e99cc858ea1d2939f8a9cdc0 /encap/src/bcfg2-site/Makefile | |
parent | 12b22256f2430dbdbb59a6119eb7732ba942fca1 (diff) | |
download | bcfg2-144f1344adf60815c8c57e93b5ed0acf98bbc40f.tar.gz bcfg2-144f1344adf60815c8c57e93b5ed0acf98bbc40f.tar.bz2 bcfg2-144f1344adf60815c8c57e93b5ed0acf98bbc40f.zip |
EncapPackages: A bunch of changes, including but not limited to:
* Cleaner directory structure
* Numerous Makefile improvements
* Makefile no longer tied to specific versions of encap packages
(except in the case of python-apt, which is distro-specific)
* Automatic dependancy generation from encap package files
* bcfg2-site pretty much done
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2103 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'encap/src/bcfg2-site/Makefile')
-rw-r--r-- | encap/src/bcfg2-site/Makefile | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/encap/src/bcfg2-site/Makefile b/encap/src/bcfg2-site/Makefile index e42ff2eb6..1f9063d9e 100644 --- a/encap/src/bcfg2-site/Makefile +++ b/encap/src/bcfg2-site/Makefile @@ -7,7 +7,7 @@ CHEETAH = /usr/local/lib/bcfg2/bin/cheetah # Main -.PHONY : all clean fill copy fix encap test cheetah +.PHONY : all clean distclean fill copy fix encap install test cheetah .SUFFIXES : BD = /usr/local @@ -23,36 +23,46 @@ clean : done; \ done +distclean : clean + -rm *-encap-*.tar.gz + fill : clean $(CHEETAH) fill -R --oext out copy : fill EN=`cat bcfg2-site-RENAME/encapname.out` && \ - ( test ! -d $$ED/bcfg2-site-$${EN} || rm -rf $$ED/bcfg2-site-$${EN} ) && \ + ( test ! -d $(ED)/bcfg2-site-$${EN} || rm -rf $(ED)/bcfg2-site-$${EN} ) && \ for SRC in `find bcfg2-site-RENAME | grep -v svn | grep -v tmpl`; do \ - DEST=$$ED/`printf "$$SRC" | sed s/RENAME/$$EN/g | sed s/\.out//g`; \ + DEST=$(ED)/`printf "$$SRC" | sed s/RENAME/$$EN/g | sed s/\.out//g`; \ if [ -d $$SRC ]; then mkdir $$DEST; else cp $$SRC $$DEST; fi; \ done fix : copy - EN="$$ED/bcfg2-site-`cat bcfg2-site-RENAME/encapname.out`" && \ + EN="$(ED)/bcfg2-site-`cat bcfg2-site-RENAME/encapname.out`" && \ chown -R 0 $$EN && chgrp -R 0 $$EN && \ find $$EN -type d | xargs -n1 chmod 0755 && \ find $$EN -type f | xargs -n1 chmod 0644 && \ chmod 0600 $$EN/etc/ostiary.cfg && \ chmod 0600 $$EN/etc/bcfg2.conf && \ chmod 0755 $$EN/sbin/ost-bcfg2.sh && \ - chmod 0755 $$EN/postinstall && \ - chmod 0755 $$EN/preinstall + chmod 0755 $$EN/postinstall encap : fix EN="bcfg2-site-`cat bcfg2-site-RENAME/encapname.out`" && \ - cd $$ED && \ + cd $(ED) && \ ( test ! -f $${EN}-encap-*.tar.gz || rm $${EN}-encap-*.tar.gz ) && \ mkencap -c $$EN EN="bcfg2-site-`cat bcfg2-site-RENAME/encapname.out`" && \ - mv $$ED/$${EN}-encap-*.tar.gz . + mv $(ED)/$${EN}-encap-*.tar.gz ./ +install : fix + -(EN="bcfg2-site-`cat bcfg2-site-RENAME/encapname.out`" && \ + epkg -q -r $(ED)/$$EN) + EN="bcfg2-site-`cat bcfg2-site-RENAME/encapname.out`" && \ + cd $(ED) && \ + epkg -q -i $(ED)/$$EN && \ + test -h $(BD)/var/encap/$$EN + test : : $(PATH) $(CHEETAH) test |