summaryrefslogtreecommitdiff
path: root/manifests/makepkg.pp
blob: 789298ab8f6273b7fa86a5e3590a1ac6539d5d51 (plain)
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
class pacman::makepkg (
  # protocol: agent
  Hash[String, String] $dlagents = {
    'file'  => '/usr/bin/curl -gqC - -o %o %u',
    'ftp'   => '/usr/bin/curl -gqfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u',
    'http'  => '/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u',
    'https' => '/usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o %o %u',
    'rsync' => '/usr/bin/rsync --no-motd -z %u %o',
    'scp'   => '/usr/bin/scp -C %u %o',
  },
  # protocol: package
  Hash[String,String] $vcsclients = {
    'bzr' => 'bzr',
    'git' => 'git',
    'hg'  => 'mercurial',
    'svn' => 'subversion',
  },
  String $carch = 'x86_64',
  String $chost = 'x86_64-pc-linux-gnu',
  Optional[String] $cppflags = undef, # ''
  String $cflags = '-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions
        -Wp,-D_FORTIFY_SOURCE=2
        -Wformat -Werror=format-security
        -fstack-clash-protection -fcf-protection',
  String $cxxflags = '$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS',
  String $ldflags = '-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now',
  Optional[String] $rustflags = undef, # '-C opt-level=2',
  Optional[String] $makeflags = undef, # '-j2'
  String $debug_cflags = '-g -fvar-tracking-assignments',
  String $debug_cxxflags = '-g -fvar-tracking-assignments',
  Optional[String] $debug_rustflags = undef, # '-C debuginfo=2'
  Pacman::Buildenv $buildenv = {
    distcc => false,
    color  => true,
    ccache => false,
    check  => true,
    sign   => false,
  },
  Optional[String] $distcc_hosts = undef, # ''
  Optional[String] $builddir = undef, # '/tmp/makepkg'
  Pacman::PackageOptions $options = {
    string     => true,
    docs       => true,
    libtool    => false,
    staticlibs => false,
    emptydirs  => true,
    zipman     => true,
    purge      => true,
    debug      => false,
    lto        => false, # This is fairly new...
  },
  Array[Pacman::ChecksumTypes] $integrity_check = [ 'sha256' ],
  String $strip_binaries = '--strip-all',
  String $strip_shared = '--strip-unneeded',
  String $strip_static = '--strip-debug',
  Array[String] $man_dirs = [ '{usr{,/local}{,/share},opt/*}/{man,info}' ],
  Array[String] $doc_dirs = [ 'usr/{,local/}{,share/}{doc,gtk-doc}', 'opt/*/{doc,gtk-doc}' ],
  Array[String] $purge_targets = [ 'usr/{,share}/info/dir', '.packlist', '*.pod' ],
  String $dbgsrcdir = '/usr/src/debug',
  Optional[String] $pkgdest = undef, # /home/packages
  Optional[String] $srcdest = undef, # /home/soruces
  Optional[String] $srcpkgdest = undef, # /home/srcpackages
  Optional[String] $logdest = undef, # /home/makepkglogs
  Optional[String] $packager = undef, # John Doe <john@doe.com>
  Optional[String] $gpgkey = undef, # ""
  String $compressgz  = 'gzip -c -f -n',
  String $compressbz2 = 'bzip2 -c -f',
  String $compressxz  = 'xz -c -z -',
  String $compresszst = 'zstd -c -z -q -',
  String $compresslrz = 'lrzip -q',
  String $compresslzo = 'lzop -q',
  String $compressz   = 'compress -c -f',
  String $compresslz4 = 'lz4 -q',
  String $compresslz  = 'lzip -c -f',
  String $pkgext = '.pkg.tar.zst',
  String $srcext = '.src.tar.gz',
  Optional[String] $pacman_auth = undef, # ''
) {
  file { '/etc/makepkg.conf':
    content => epp('pacman/makepkg.conf.epp'),
  }
}