diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-01-24 21:54:51 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-02-09 18:06:12 +0100 |
commit | 35f7d973b3e07a1f2481c1eacc1fb0c139701913 (patch) | |
tree | 67b3b0ea5012f6f15af006afa40f12df817e3e03 /manifests | |
parent | Pacman::Repo requires pacman. (diff) | |
download | pacman-35f7d973b3e07a1f2481c1eacc1fb0c139701913.tar.gz pacman-35f7d973b3e07a1f2481c1eacc1fb0c139701913.tar.xz |
Pacman module makepkg.
Diffstat (limited to 'manifests')
-rw-r--r-- | manifests/makepkg.pp | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/manifests/makepkg.pp b/manifests/makepkg.pp new file mode 100644 index 0000000..cf020d2 --- /dev/null +++ b/manifests/makepkg.pp @@ -0,0 +1,104 @@ +type Buildenv = Struct[{ + distcc => Boolean, + color => Boolean, + ccache => Boolean, + check => Boolean, + sign => Boolean, +}] + +type PackageOptions = Struct[{ + string => Boolean, + docs => Boolean, + libtool => Boolean, + staticlibs => Boolean, + emptydirs => Boolean, + zipman => Boolean, + purge => Boolean, + debug => Boolean, + lto => Boolean, +}] + +type ChecksumTypes = Enum['md5', 'sha1', 'sha224', 'sha256', 'sha384', 'sha512', 'b2'] + +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' + Buildenv $buildenv = { + distcc => false, + color => true, + ccache => false, + check => true, + sign => false, + }, + Optional[String] $distcc_hosts = undef, # '' + Optional[String] $builddir = undef, # '/tmp/makepkg' + 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[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'), + } +} |