Permalink
Browse files

source skeleton

  • Loading branch information...
1 parent 458781a commit dfa5e1b2f2d1e76df03b4aeb42064623086e7ec5 @kitplummer committed Jun 21, 2012
Showing with 53 additions and 4 deletions.
  1. +10 −4 manifests/init.pp
  2. +43 −0 manifests/source.pp
View
@@ -11,17 +11,21 @@
package { "virtuoso-vad-isparql": ensure => installed, }
package { "virtuoso-vad-ods": ensure => installed, }
package { "virtuoso-vad-tutorial": ensure => installed, }
+ $servicename = "virtuoso-opensource-6.1"
}
default: {
- ### Get, build and install from source code
+ include virtuoso::source
+ $servicename = "virtuoso"
}
}
file { "/etc/default/virtuoso-opensource-6.1":
owner => root,
group => root,
content => template("virtuoso/virtuoso-opensource.erb"),
- notify => Service["virtuoso-opensource-6.1"],
+ notify => $operatingsystem ? {
+ ubuntu => Service[$servicename],
+ }
require => $operatingsystem ? {
ubuntu => Package["virtuoso-opensource"],
}
@@ -31,13 +35,15 @@
owner => root,
group => root,
content => template("virtuoso/virtuoso.ini.erb"),
- notify => Service["virtuoso-opensource-6.1"],
+ notify => $operatingsystem ? {
+ ubuntu => Service[$servicename],
+ }
require => $operatingsystem ? {
ubuntu => Package["virtuoso-opensource"],
}
}
- service { "virtuoso-opensource-6.1":
+ service { $servicename:
ensure => running,
enable => true,
hasrestart => true,
View
@@ -0,0 +1,43 @@
+class virtuoso::source {
+ ### Get, build and install from source code
+ package { "gcc": ensure => installed, },
+ package { "gmake": ensure => installed, }
+ package { "autoconf": ensure => installed, }
+ package { "automake": ensure => installed, }
+ package { "libtool": ensure => installed, }
+ package { "flex": ensure => installed, }
+ package { "bison": ensure => installed, }
+ package { "gperf": ensure => installed, }
+ package { "gawk": ensure => installed, }
+ package { "m4": ensure => installed, }
+ package { "make": ensure => installed, }
+ package { "openssl-devel": ensure => installed, }
+ package { "readline-devel": ensure => installed, }
+ package { "wget": ensure => installed, }
+
+ exec { "wget https://downloads.sourceforge.net/project/virtuoso/virtuoso/6.1.5/virtuoso-opensource-6.1.5.tar.gz?r=&ts=1340319716&use_mirror=voxel":
+ cwd => "/tmp",
+ creates => "/tmp/virtuoso-opensource-6.1.5.tar.gz",
+ path => ["/usr/bin", "/bin"]
+ } ->
+ exec { "tar zxvf virtuoso-opensource-6.1.5.tar.gz":
+ cwd => "/tmp",
+ creates => "/tmp/virtuoso-opensource-6.1.5",
+ path => ["/usr/bin/", "/bin"]
+ } ->
+ exec { "./autogen.sh":
+ cwd => "/tmp/virtuoso-opensource-6.1.5",
+ creates => "/tmp/virtuoso-opensource-6.1.5",
+ path => ["/usr/bin/", "/bin"]
+ } ->
+ exec { "./configure":
+ cwd => "/tmp/virtuoso-opensource-6.1.5",
+ creates => "/tmp/virtuoso-opensource-6.1.5",
+ path => ["/usr/bin/", "/bin"]
+ } ->
+ exec { "make && make install":
+ cwd => "/tmp/virtuoso-opensource-6.1.5",
+ creates => "/tmp/virtuoso-opensource-6.1.5",
+ path => ["/usr/bin/", "/bin"]
+ } ->
+}

0 comments on commit dfa5e1b

Please sign in to comment.