summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames An2015-08-04 17:33:58 -0400
committerJames An2015-08-04 17:33:58 -0400
commit05f5666efc9f620dd9a2c519ccc771a5dbe7b5fe (patch)
tree6be4a6e5cd884967c20e64db38f48b7131103f78
parent5ac80ee90aafbadbb1abc249308bd63fa8a55117 (diff)
downloadaur-05f5666efc9f620dd9a2c519ccc771a5dbe7b5fe.tar.gz
Added support for Solr 3.x, 4.x, and 5.x.
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD49
2 files changed, 45 insertions, 20 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b2d780a3ec47..acc23b9c4eb7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,18 +1,20 @@
pkgbase = solr-conf-drupal
- pkgdesc = Configuration files to enable Drupal to use Solr as its search provider
- pkgver = 7.x_1.8
- pkgrel = 2
+ 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
+ pkgver = 1
+ pkgrel = 1
url = http://drupal.org/project/search_api_solr
- arch = i686
- arch = x86_64
arch = any
license = GPL
- depends = solr>=5
+ depends = solr>=3
+ depends = solr<=5
optdepends = drupal: Solr client for these configuration files
optdepends = aegir: meta-Drupal hosting platform
+ optdepends = solr-undertow: high performance servlet container for Solr
source = http://ftp.drupal.org/files/projects/search_api_solr-7.x-1.8.zip
- source = mapping-ISOLatin1Accent.txt
+ source = https://github.com/amateescu/search_api_solr/archive/8.x-1.x.zip
+ source = https://raw.githubusercontent.com/apache/lucene-solr/branch_5x/solr/core/src/test-files/solr/collection1/conf/mapping-ISOLatin1Accent.txt
md5sums = ea3f8918a37f5d581def933921870e2d
+ md5sums = 304538fdbbb7f32e8858cf1d661f8ea6
md5sums = 9f3c8a60a4f09327fad22aeff082c2b3
pkgname = solr-conf-drupal
diff --git a/PKGBUILD b/PKGBUILD
index 3f8035620126..941c03a8d416 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,31 +2,54 @@
_pkgname=search_api_solr
pkgname=solr-conf-drupal
-pkgver=7.x_1.8
-pkgrel=2
-pkgdesc="Configuration files to enable Drupal to use Solr as its search provider"
-arch=('i686' 'x86_64' 'any')
+pkgver=1
+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>=5')
+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'
)
source=(
- "http://ftp.drupal.org/files/projects/$_pkgname-${pkgver/_/-}.zip"
- 'mapping-ISOLatin1Accent.txt' # From the solr 5.2.1 source tarball: solr-5.2.1/server/solr/configsets/sample_techproducts_configs/conf
+ "http://ftp.drupal.org/files/projects/$_pkgname-7.x-1.8.zip"
+ "https://github.com/amateescu/$_pkgname/archive/8.x-1.x.zip"
+ "https://raw.githubusercontent.com/apache/lucene-solr/branch_5x/solr/core/src/test-files/solr/collection1/conf/mapping-ISOLatin1Accent.txt"
+ # 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)
)
md5sums=('ea3f8918a37f5d581def933921870e2d'
+ '304538fdbbb7f32e8858cf1d661f8ea6'
'9f3c8a60a4f09327fad22aeff082c2b3')
-package() {
- cd "$_pkgname/solr-conf/5.x"
+prepare() {
+ [ -d "7.x" ] && rm -rf "7.x"
+ [ -d "8.x" ] && rm -rf "8.x"
+ mv -f "$_pkgname" "7.x"
+ mv -f "$_pkgname-8.x-1.x" "8.x"
+}
- for file in *; do
- install -Dm644 $file "$pkgdir/etc/solr/drupal/conf/$file"
+package() {
+ # Traverse and install conf files for Drupal 7.x and 8.x, and for Solr 3.x, 4.x, and 5.x.
+ for ver_drupal in *.x; 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-undertow/configsets/drupal-$ver_drupal-solr-$ver_solr/conf/$file"
+ done
+ install -Dm644 mapping-ISOLatin1Accent.txt "$pkgdir/etc/solr-undertow/configsets/drupal-$ver_drupal-solr-$ver_solr/conf/mapping-ISOLatin1Accent.txt"
+ done
done
- install -Dm644 "$srcdir/mapping-ISOLatin1Accent.txt" "$pkgdir/etc/solr/drupal/conf/mapping-ISOLatin1Accent.txt"
- chown 521:521 "$pkgdir/etc/solr/drupal"
+ chown 521:521 "$pkgdir/etc/solr-undertow"
}
+
+#~ solr.xml solr attributes
+#~ <bool name="shareSchema">true</bool>
+#~ <logging>
+ #~ <bool name="enabled">${logging:true}</bool>
+#~ </logging>
+
+#~ Create new core with drupal config set
+#~ http://localhost:8983/solr/admin/cores?action=CREATE&name=facet&instanceDir=/etc/solr-undertow/cores/facet&configSet=drupal-7.x