Get abusehelper and graphingwiki sources as tarball from bitbucket

This commit is contained in:
Ossi Salmi 2011-03-23 14:39:23 +02:00 committed by Timo Mkinen
parent 971d020496
commit fb904c4c3e
3 changed files with 44 additions and 49 deletions

View file

@ -1,24 +1,19 @@
AHELPERURL = https://bitbucket.org/clarifiednetworks/abusehelper
AHELPER = $(shell hg id -r tip $(AHELPERURL))
AHELPERSRC = /usr/local/src/abusehelper-$(AHELPER)
AHELPER = tip
AHELPERURL = https://bitbucket.org/clarifiednetworks/abusehelper/get/$(AHELPER).tar.gz
IDIOKIT = tip
IDIOKITURL = https://bitbucket.org/clarifiednetworks/idiokit/get/$(IDIOKIT).tar.gz
OUT = /srv/puppet/files/common/packages
all: tarball
all: tarball
tarball: abusehelper.tar.gz idiokit.tar.gz
.PHONY: abusehelper.tar.gz idiokit.tar.gz
tarball: $(OUT)/abusehelper.tar.gz
abusehelper.tar.gz:
@umask 022 && mkdir -p $(OUT)/abusehelper && \
cd $(OUT)/abusehelper && wget -nv -N $(AHELPERURL) && \
cd $(OUT) && ln -fs abusehelper/$(AHELPER).tar.gz abusehelper.tar.gz
$(AHELPERSRC):
( umask 022 ; mkdir -p $(AHELPERSRC) ; cd $(AHELPERSRC) && \
hg clone -r $(AHELPER) $(AHELPERURL) abusehelper )
$(OUT)/abusehelper-$(AHELPER).tar.gz: $(AHELPERSRC)
( umask 022 ; cd $(AHELPERSRC)/abusehelper && \
hg archive -S -t tgz $(OUT)/abusehelper-$(AHELPER).tar.gz )
$(OUT)/abusehelper.tar.gz: $(OUT)/abusehelper-$(AHELPER).tar.gz
( umask 022 ; cd $(OUT) && \
ln -fs abusehelper-$(AHELPER).tar.gz abusehelper.tar.gz )
clean: override AHELPER = *
clean:
rm -fr $(AHELPERSRC)
idiokit.tar.gz:
@umask 022 && mkdir -p $(OUT)/idiokit && \
cd $(OUT)/idiokit && wget -nv -N $(IDIOKITURL) && \
cd $(OUT) && ln -fs idiokit/$(IDIOKIT).tar.gz idiokit.tar.gz

View file

@ -29,7 +29,22 @@ class abusehelper {
require => File["/usr/local/src/abusehelper.tar.gz"],
before => Python::Setup::Install["/usr/local/src/abusehelper"],
}
python::setup::install { "/usr/local/src/abusehelper":
file { "/usr/local/src/idiokit.tar.gz":
ensure => present,
mode => 0644,
owner => root,
group => root,
source => "puppet:///files/packages/idiokit.tar.gz",
links => follow,
}
util::extract::tar { "/usr/local/src/idiokit":
strip => 1,
source => "/usr/local/src/idiokit.tar.gz",
require => File["/usr/local/src/idiokit.tar.gz"],
before => Python::Setup::Install["/usr/local/src/idiokit"],
}
python::setup::install { [ "/usr/local/src/abusehelper",
"/usr/local/src/idiokit", ]:
python => $operatingsystem ? {
centos => "python2.6",
default => "python",