Permalink
Browse files

COOK-348, update source recipe to install 1.0.1

- need to handle platforms differently
- ubuntu changed the javascript development package to xulrunner for
  lucid
- hardy isn't supported and we should return with a log message (hardy
  doesn't have sufficient library versions to install couchdb 1.0.1)
  • Loading branch information...
1 parent 74cff4b commit 4f175b9e9d8262852214f14ca29a02b0cc81342c @jtimberman jtimberman committed Aug 23, 2010
Showing with 61 additions and 38 deletions.
  1. +2 −2 attributes/default.rb
  2. +33 −33 metadata.json
  3. +1 −1 metadata.rb
  4. +25 −2 recipes/source.rb
View
@@ -17,6 +17,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-set[:couch_db][:src_checksum] = "b16f3a10b406d01552893d356cdbf7f429209f938ae7d3aa589ee704df8cb4d2"
-set[:couch_db][:src_version] = "0.9.1"
+set[:couch_db][:src_checksum] = "b74a5bfe13e3457798107509cb533d0e7df276adad526ccd5a381c1271108b1f"
+set[:couch_db][:src_version] = "1.0.1"
set[:couch_db][:src_mirror] = "http://archive.apache.org/dist/couchdb/#{couch_db.src_version}/apache-couchdb-#{couch_db.src_version}.tar.gz"
View
@@ -1,55 +1,55 @@
{
- "providing": {
- },
- "attributes": {
- },
+ "name": "couchdb",
+ "description": "Installs CouchDB package and starts service",
+ "long_description": "Installs the CouchDB package if it is available from an package repository on\nthe node. If the package repository is not available, CouchDB needs to be \ninstalled via some other method, either a backported package, or compiled \ndirectly from source. CouchDB is available on Red Hat-based systems through\nthe EPEL Yum Repository.\n",
"maintainer": "Opscode, Inc.",
- "replacing": {
- },
- "dependencies": {
- "erlang": [
-
- ]
- },
- "recipes": {
- "couchdb": "Installs and configures CouchDB package",
- "couchdb::source": "Installs and configures CouchDB from source"
- },
"maintainer_email": "cookbooks@opscode.com",
- "groupings": {
- },
- "recommendations": {
- },
+ "license": "Apache 2.0",
"platforms": {
- "rhel": [
-
+ "ubuntu": [
+ ">= 8.10"
+ ],
+ "debian": [
+ ">= 5.0"
],
"openbsd": [
],
- "debian": [
- ">= 5.0"
+ "freebsd": [
+
],
- "fedora": [
+ "rhel": [
],
"centos": [
],
- "freebsd": [
+ "fedora": [
- ],
- "ubuntu": [
- ">= 8.10"
]
},
- "license": "Apache 2.0",
- "version": "0.13.3",
+ "dependencies": {
+ "erlang": [
+
+ ]
+ },
+ "recommendations": {
+ },
"suggestions": {
},
- "name": "couchdb",
"conflicting": {
},
- "long_description": "Installs the CouchDB package if it is available from an package repository on\nthe node. If the package repository is not available, CouchDB needs to be \ninstalled via some other method, either a backported package, or compiled \ndirectly from source. CouchDB is available on Red Hat-based systems through\nthe EPEL Yum Repository.\n",
- "description": "Installs CouchDB package and starts service"
+ "providing": {
+ },
+ "replacing": {
+ },
+ "attributes": {
+ },
+ "groupings": {
+ },
+ "recipes": {
+ "couchdb": "Installs and configures CouchDB package",
+ "couchdb::source": "Installs and configures CouchDB from source"
+ },
+ "version": "0.14.0"
}
View
@@ -9,7 +9,7 @@
directly from source. CouchDB is available on Red Hat-based systems through
the EPEL Yum Repository.
EOH
-version "0.13.3"
+version "0.14.0"
depends "erlang"
recipe "couchdb", "Installs and configures CouchDB package"
recipe "couchdb::source", "Installs and configures CouchDB from source"
View
@@ -17,15 +17,38 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+if node[:platform] == "ubuntu" && node[:platform_version].to_f == 8.04
+ log "Ubuntu 8.04 does not supply sufficient development libraries via APT to install CouchDB #{node[:couch_db][:src_version]} from source."
+ return
+end
+
include_recipe "erlang"
couchdb_tar_gz = File.join(Chef::Config[:file_cache_path], "/", "apache-couchdb-#{node[:couch_db][:src_version]}.tar.gz")
+compile_flags = String.new
+dev_pkgs = Array.new
case node[:platform]
when "debian", "ubuntu"
- %w{ libmozjs-dev libicu-dev libcurl4-openssl-dev }.each do |pkg|
+
+ dev_pkgs << "libicu-dev"
+ dev_pkgs << "libcurl4-openssl-dev"
+ dev_pkgs << value_for_platform(
+ "debian" => { "default" => "libmozjs-dev" },
+ "ubuntu" => {
+ "9.04" => "libmozjs-dev",
+ "9.10" => "libmozjs-dev",
+ "default" => "xulrunner-dev"
+ }
+ )
+
+ dev_pkgs.each do |pkg|
package pkg
end
+
+ if node[:platform_version].to_f == 10.04
+ compile_flags = "--with-js-lib=/usr/lib/xulrunner-devel-1.9.2.8/lib --with-js-include=/usr/lib/xulrunner-devel-1.9.2.8/include"
+ end
end
remote_file couchdb_tar_gz do
@@ -37,7 +60,7 @@
cwd Chef::Config[:file_cache_path]
code <<-EOH
tar -zxf #{couchdb_tar_gz}
- cd apache-couchdb-#{node[:couch_db][:src_version]} && ./configure && make && make install
+ cd apache-couchdb-#{node[:couch_db][:src_version]} && ./configure #{compile_flags} && make && make install
EOH
not_if { ::FileTest.exists?("/usr/local/bin/couchdb") }
end

0 comments on commit 4f175b9

Please sign in to comment.