blob: 52b7444e7d0127c363857b7d4f626b0f46951f9d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# Maintainer: James An <james@jamesan.ca>
pkgname=solr-conf-drupal
_pkgname=search_api_solr
pkgver=20151208
_pkgvers=(7.x-1.9
8.x-1.0-alpha1)
pkgrel=1
pkgdesc="Configuration files to enable Drupal 7.x or 8.x to use Solr 3.x, 4.x, or 5.x as its search provider"
arch=('any')
url="http://drupal.org/project/$_pkgname"
license=('GPL')
depends=('solr>=3' 'solr<=5')
optdepends=(
'drupal: Solr client for these configuration files'
'aegir: meta-Drupal hosting platform'
'solr-undertow: high performance servlet container for Solr')
# The mapping-ISOLatin1Accent.txt file is identical in all occurrences in the Solr repo across the head of all its supported branches (3-5.x)
source=("https://raw.githubusercontent.com/apache/lucene-solr/master/solr/example/example-DIH/solr/solr/ "
"https://www.drupal.org/files/issues/2711685-support-solr6-3.patch"
'0293cb23527acb1e8a307539a8d68021'
"https://www.drupal.org/files/issues/2711685-support-solr6-${_pkgname//_/-}-4.patch"
"http://ftp.drupal.org/files/projects/$_pkgname-${_pkgvers[0]}.tar.gz"
"http://ftp.drupal.org/files/projects/$_pkgname-${_pkgvers[1]}.tar.gz")
md5sums=('f33510d7ab9f75bc8dc5e49d72acea2a'
'479dea32043f12575838eaa6de62f248'
'40fccb08f08b0014ff884504ddb7616c')
noextract=("${source[@]%%::*}")
prepare() {
for _pkgver in "${_pkgvers[@]}"; do
echo $_pkgver
ver_drupal="${_pkgver%%-*}"
install -dm755 "$ver_drupal"
tar --extract --file="$_pkgname-$_pkgver.tar.gz" --strip-components=1 --directory="$ver_drupal" --overwrite
done
}
package() {
# Traverse and install conf files for Drupal 7.x and 8.x, and for Solr 1.4 (Drupal 8.x only), 3.x, 4.x, and 5.x.
for ver_drupal in "${_pkgvers[@]%%-*}"; do
for ver_solr in $(basename -a $ver_drupal/solr-conf/*); do
for file in $(basename -a $ver_drupal/solr-conf/$ver_solr/*); do
install -Dm644 "$ver_drupal/solr-conf/$ver_solr/$file" "$pkgdir/etc/solr/configsets/solr-$ver_solr-drupal-$ver_drupal/conf/$file"
done
install -Dm644 mapping-ISOLatin1Accent.txt "$pkgdir/etc/solr/configsets/solr-$ver_solr-drupal-$ver_drupal/conf/mapping-ISOLatin1Accent.txt"
done
done
}
#~ Create new core with drupal config set
#~ http://localhost:8983/solr/admin/cores?action=CREATE&name=coreX&configSet=solr-5.x-drupal-7.x
|