i use arch btw
1#!/usr/bin/env bash
2#
3# /etc/makepkg.conf
4#
5
6chrt -iap 0 $$
7
8#########################################################################
9# SOURCE ACQUISITION
10#########################################################################
11#
12#-- The download utilities that makepkg should use to acquire sources
13# Format: 'protocol::agent'
14# DLAGENTS=('file::/usr/bin/curl -qgC - -o %o %u'
15# 'ftp::/usr/bin/curl -qgfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
16# 'http::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
17# 'https::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
18# 'rsync::/usr/bin/rsync --no-motd -z %u %o'
19# 'scp::/usr/bin/scp -C %u %o')
20DLAGENTS=('ftp::/usr/bin/aria2c -UWget -s4 -x4 %u -o %o --follow-metalink=mem'
21 'http::/usr/bin/aria2c -UWget -s4 -x4 %u -o %o --follow-metalink=mem'
22 'https::/usr/bin/aria2c -UWget -s4 -x4 %u -o %o --follow-metalink=mem'
23 'rsync::/usr/bin/rsync --no-motd -z %u %o'
24 'scp::/usr/bin/scp -C %u %o')
25
26# Other common tools:
27# /usr/bin/snarf
28# /usr/bin/lftpget -c
29# /usr/bin/wget
30
31#-- The package required by makepkg to download VCS sources
32# Format: 'protocol::package'
33VCSCLIENTS=('bzr::breezy'
34 'fossil::fossil'
35 'git::git'
36 'hg::mercurial'
37 'svn::subversion')
38
39#########################################################################
40# ARCHITECTURE, COMPILE FLAGS
41#########################################################################
42#
43CARCH="x86_64"
44CHOST="x86_64-pc-linux-gnu"
45
46#-- Compiler and Linker Flags
47#CPPFLAGS=""
48CFLAGS="-march=native -O2 -pipe -fno-plt -fexceptions \
49 -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security \
50 -fstack-clash-protection -fcf-protection \
51 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"
52CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
53LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \
54 -Wl,-z,pack-relative-relocs -fuse-ld=mold -Wl,--separate-debug-file"
55LTOFLAGS="-flto=auto"
56#-- Make Flags: change this for DistCC/SMP systems
57MAKEFLAGS="-j8"
58#-- Debugging flags
59DEBUG_CFLAGS="-g"
60DEBUG_CXXFLAGS="$DEBUG_CFLAGS"
61
62#########################################################################
63# BUILD ENVIRONMENT
64#########################################################################
65#
66# Makepkg defaults: BUILDENV=(!distcc !color !ccache check !sign)
67# A negated environment option will do the opposite of the comments below.
68#
69#-- distcc: Use the Distributed C/C++/ObjC compiler
70#-- color: Colorize output messages
71#-- ccache: Use ccache to cache compilation
72#-- check: Run the check() function if present in the PKGBUILD
73#-- sign: Generate PGP signature file
74#
75BUILDENV=(!distcc color ccache check !sign)
76#
77#-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
78#-- specify a space-delimited list of hosts running in the DistCC cluster.
79#DISTCC_HOSTS="bas@haring.bas.sh,cpp,lzo"
80#
81#-- Specify a directory for package building.
82#BUILDDIR=/tmp/makepkg
83
84#########################################################################
85# GLOBAL PACKAGE OPTIONS
86# These are default values for the options=() settings
87#########################################################################
88#
89# Makepkg defaults: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug !lto !autodeps)
90# A negated option will do the opposite of the comments below.
91#
92#-- strip: Strip symbols from binaries/libraries
93#-- docs: Save doc directories specified by DOC_DIRS
94#-- libtool: Leave libtool (.la) files in packages
95#-- staticlibs: Leave static library (.a) files in packages
96#-- emptydirs: Leave empty directories in packages
97#-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip
98#-- purge: Remove files specified by PURGE_TARGETS
99#-- debug: Add debugging flags as specified in DEBUG_* variables
100#-- lto: Add compile flags for building with link time optimization
101#-- autodeps: Automatically add depends/provides
102#
103OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge debug lto)
104
105#-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2
106INTEGRITY_CHECK=(sha256)
107#-- Options to be used when stripping binaries. See `man strip' for details.
108STRIP_BINARIES="--strip-all"
109#-- Options to be used when stripping shared libraries. See `man strip' for details.
110STRIP_SHARED="--strip-unneeded"
111#-- Options to be used when stripping static libraries. See `man strip' for details.
112STRIP_STATIC="--strip-debug"
113#-- Manual (man and info) directories to compress (if zipman is specified)
114MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
115#-- Doc directories to remove (if !docs is specified)
116DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
117#-- Files to be removed from all packages (if purge is specified)
118PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
119#-- Directory to store source code in for debug packages
120DBGSRCDIR="/usr/src/debug"
121#-- Prefix and directories for library autodeps
122LIB_DIRS=('lib:usr/lib' 'lib32:usr/lib32')
123
124#########################################################################
125# PACKAGE OUTPUT
126#########################################################################
127#
128# Default: put built package and cached source in build directory
129#
130#-- Destination: specify a fixed directory where all packages will be placed
131#PKGDEST=/home/packages
132#-- Source cache: specify a fixed directory where source files will be cached
133#SRCDEST=/home/sources
134#-- Source packages: specify a fixed directory where all src packages will be placed
135#SRCPKGDEST=/home/srcpackages
136#-- Log files: specify a fixed directory where all log files will be placed
137#LOGDEST=/home/makepkglogs
138#-- Packager: name/email of the person or organization building packages
139#PACKAGER="John Doe <john@doe.com>"
140#-- Specify a key to use for package signing
141#GPGKEY=""
142
143#########################################################################
144# COMPRESSION DEFAULTS
145#########################################################################
146#
147COMPRESSGZ=(pigz -c -f -n)
148COMPRESSBZ2=(lbzip2 -c -f)
149COMPRESSXZ=(xz -c -z -)
150COMPRESSZST=(zstd -c -T0 --auto-threads=logical -9 -)
151COMPRESSLRZ=(lrzip -q)
152COMPRESSLZO=(lzop -q)
153COMPRESSZ=(compress -c -f)
154COMPRESSLZ4=(lz4 -q)
155COMPRESSLZ=(plzip -c -f)
156
157#########################################################################
158# EXTENSION DEFAULTS
159#########################################################################
160#
161PKGEXT='.pkg.tar.zst'
162SRCEXT='.src.tar.gz'
163
164#########################################################################
165# OTHER
166#########################################################################
167#
168#-- Command used to run pacman as root, instead of trying sudo and su
169#PACMAN_AUTH=()
170# vim: set ft=sh ts=2 sw=2 et: