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",

View file

@ -1,34 +1,19 @@
GWIKIURL = http://svn.graphingwiki.webfactional.com/trunk
GWIKI = $(shell svn info $(GWIKIURL) | awk '/^Revision:/ { print $$2 }')
GWIKISRC = /usr/local/src/graphingwiki-$(GWIKI)
GWIKI = tip
GWIKIURL = https://bitbucket.org/clarifiednetworks/graphingwiki/get/$(GWIKI).tar.gz
MOIN = 1.8.8
MOINURL = http://static.moinmo.in/files/moin-$(MOIN).tar.gz
OUT = /srv/puppet/files/common/packages
all: tarball
all: tarball
tarball: graphingwiki.tar.gz moin.tar.gz
.PHONY: graphingwiki.tar.gz moin.tar.gz
tarball: $(OUT)/graphingwiki.tar.gz $(OUT)/moin.tar.gz
graphingwiki.tar.gz:
@umask 022 && mkdir -p $(OUT)/graphingwiki && \
cd $(OUT)/graphingwiki && wget -nv -N $(GWIKIURL) && \
cd $(OUT) && ln -fs graphingwiki/$(GWIKI).tar.gz graphingwiki.tar.gz
$(GWIKISRC):
( umask 022 ; mkdir -p $(GWIKISRC) && cd $(GWIKISRC) && \
svn export -r $(GWIKI) $(GWIKIURL) graphingwiki )
$(OUT)/graphingwiki-$(GWIKI).tar.gz: $(GWIKISRC)
( umask 022 ; mkdir -p $(OUT) && cd $(GWIKISRC) && \
tar zcvf $(OUT)/graphingwiki-$(GWIKI).tar.gz graphingwiki )
$(OUT)/graphingwiki.tar.gz: $(OUT)/graphingwiki-$(GWIKI).tar.gz
( umask 022 ; cd $(OUT) && \
ln -fs graphingwiki-$(GWIKI).tar.gz graphingwiki.tar.gz )
$(OUT)/moin-$(MOIN).tar.gz:
( umask 022 ; mkdir -p $(OUT) && cd $(OUT) && \
wget -N $(MOINURL) )
$(OUT)/moin.tar.gz: $(OUT)/moin-$(MOIN).tar.gz
( umask 022 ; cd $(OUT) && \
ln -fs moin-$(MOIN).tar.gz moin.tar.gz )
clean: override GWIKI = *
clean:
rm -fr $(GWIKISRC)
moin.tar.gz:
@umask 022 && mkdir -p $(OUT)/moin && \
cd $(OUT)/moin && wget -nv -N $(MOINURL) && \
cd $(OUT) && ln -fs moin/moin-$(MOIN).tar.gz moin.tar.gz