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 = tip
AHELPER = $(shell hg id -r tip $(AHELPERURL)) AHELPERURL = https://bitbucket.org/clarifiednetworks/abusehelper/get/$(AHELPER).tar.gz
AHELPERSRC = /usr/local/src/abusehelper-$(AHELPER) IDIOKIT = tip
IDIOKITURL = https://bitbucket.org/clarifiednetworks/idiokit/get/$(IDIOKIT).tar.gz
OUT = /srv/puppet/files/common/packages 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): idiokit.tar.gz:
( umask 022 ; mkdir -p $(AHELPERSRC) ; cd $(AHELPERSRC) && \ @umask 022 && mkdir -p $(OUT)/idiokit && \
hg clone -r $(AHELPER) $(AHELPERURL) abusehelper ) cd $(OUT)/idiokit && wget -nv -N $(IDIOKITURL) && \
cd $(OUT) && ln -fs idiokit/$(IDIOKIT).tar.gz idiokit.tar.gz
$(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)

View file

@ -29,7 +29,22 @@ class abusehelper {
require => File["/usr/local/src/abusehelper.tar.gz"], require => File["/usr/local/src/abusehelper.tar.gz"],
before => Python::Setup::Install["/usr/local/src/abusehelper"], 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 ? { python => $operatingsystem ? {
centos => "python2.6", centos => "python2.6",
default => "python", default => "python",

View file

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