solr: Install pysolr
This commit is contained in:
parent
1a445d019b
commit
04cdd05fb3
2 changed files with 24 additions and 3 deletions
|
@ -5,14 +5,23 @@ VERSION = 4.2.1
|
||||||
TARGET = solr-$(VERSION).tgz
|
TARGET = solr-$(VERSION).tgz
|
||||||
SOURCE = http://ftp.funet.fi/pub/mirrors/apache.org/lucene/solr/$(VERSION)/solr-$(VERSION).tgz
|
SOURCE = http://ftp.funet.fi/pub/mirrors/apache.org/lucene/solr/$(VERSION)/solr-$(VERSION).tgz
|
||||||
|
|
||||||
|
PYSOLRVERSION = 2.0.15
|
||||||
|
PYSOLRSOURCE = https://pypi.python.org/packages/source/p/pysolr/pysolr-$(PYSOLRVERSION).tar.gz
|
||||||
|
PYSOLRTARGET = pysolr-$(PYSOLRVERSION).tar.gz
|
||||||
|
|
||||||
all: download manifest
|
all: download manifest
|
||||||
download: $(PACKAGES)/$(TARGET)
|
download: $(PACKAGES)/$(TARGET) $(PACKAGES)/$(PYSOLRTARGET)
|
||||||
manifest: $(MANIFESTS)/solr.pp
|
manifest: $(MANIFESTS)/solr.pp
|
||||||
|
|
||||||
$(PACKAGES)/$(TARGET):
|
$(PACKAGES)/$(TARGET):
|
||||||
@umask 022; echo $@; \
|
@umask 022; echo $@; \
|
||||||
test -f $@ || curl -o $@ $(SOURCE)
|
test -f $@ || curl -o $@ $(SOURCE)
|
||||||
|
|
||||||
$(MANIFESTS)/solr.pp: $(PACKAGES)/$(TARGET)
|
$(PACKAGES)/$(PYSOLRTARGET):
|
||||||
@umask 022; echo $@; \
|
@umask 022; echo $@; \
|
||||||
echo '$$solr_package_latest = "$(TARGET)"' > $@
|
test -f $@ || curl -o $@ $(PYSOLRSOURCE)
|
||||||
|
|
||||||
|
$(MANIFESTS)/solr.pp: $(PACKAGES)/$(TARGET) $(PACKAGES)/$(PYSOLRTARGET)
|
||||||
|
@umask 022; echo $@; \
|
||||||
|
echo '$$solr_package_latest = "$(TARGET)"' > $@ && \
|
||||||
|
echo '$$pysolr_package_latest = "$(PYSOLRTARGET)"' >> $@
|
||||||
|
|
|
@ -180,4 +180,16 @@ class solr {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if !$pysolr_package {
|
||||||
|
if $pysolr_package_latest {
|
||||||
|
$pysolr_package = $pysolr_package_latest
|
||||||
|
} else {
|
||||||
|
fail("Must define \$pysolr_package or \$pysolr_package_latest")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
python::setup::install { "/usr/local/src/pysolr":
|
||||||
|
source => "puppet:///files/packages/${pysolr_package}",
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue