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
|
# File 'manifests/dev.pp', line 1
class varnish::dev {
$package_name = $::osfamily ? {
'Debian' => 'libvarnish-dev',
'RedHat' => 'varnish-libs-devel',
}
package { 'varnish-dev':
ensure => present,
name => $package_name,
}
# libvarnish-dev is broken on debian-squeeze. This is the workaround.
# Details: http://mailman.verplant.org/pipermail/collectd/2010-June/003877.html
if ($::lsbdistcodename == 'squeeze' and $::varnish_version == '2.1.3') {
File {
ensure => link,
notify => Exec['refresh ldconfig'],
require => Package['varnish-dev'],
}
file {
'/usr/lib/libvarnish.so':
ensure => link,
target => '/usr/lib/libvarnish.so.1.0.0';
'/usr/lib/libvarnishapi.so':
ensure => link,
target => '/usr/lib/libvarnishapi.so.1.0.0';
'/usr/lib/libvarnishcompat.so':
ensure => link,
target => '/usr/lib/libvarnishcompat.so.1.0.0';
}
$module_path = get_module_path($module_name)
file { '/usr/lib/pkgconfig/varnishapi.pc':
ensure => file,
content => file("${module_path}/files/usr/lib/pkgconfig/varnishapi.pc"),
}
exec { 'refresh ldconfig':
refreshonly => true,
command => 'ldconfig',
}
}
}
|