EOX GitLab Instance

init.pp 930 Bytes
Newer Older
1
class buildtools {
2
3
4
5
	class { 'repos':
		# add to the repositories stage
		stage	=> repositories
	}
6

7
8
9
10
11
12
13
14
15
	$home = '/home/vagrant'

	File {
		owner => 'vagrant',
		group => 'vagrant',
		mode  => '0644',
	}

	package { 'rpm-build': ensure => 'latest' }
16
17
	package { 'yum-utils': ensure => 'latest' }
	package { 'mock': ensure => 'latest' }
18
19
20
	package { 'redhat-rpm-config': ensure => 'latest' }
	package { 'make': ensure => 'latest' }
	package { 'gcc': ensure => 'latest' }
21
	package { 'gcc-c++': ensure => 'latest' }
22
23
24

	file { $home: ensure => directory }
	file { "${home}/.rpmmacros":
25
26
		ensure	=> file,
		content	=> "%_topdir ${home}/rpmbuild\n",
27
28
	}
	file { "${home}/rpmbuild":
29
		ensure	=> directory,
30
	}
31
32
33
34
35
36
	file {[ "${home}/rpmbuild/BUILD",
			"${home}/rpmbuild/BUILDROOT",
			"${home}/rpmbuild/RPMS",
			"${home}/rpmbuild/SOURCES",
			"${home}/rpmbuild/SPECS",
			"${home}/rpmbuild/SRPMS" ]:
37
38
    	ensure	=> directory,
    	mode	=> '0775'
39
  }}