6 #########################################################################
8 #########################################################################
10 #-- The download utilities that makepkg should use to acquire sources
11 # Format: 'protocol::agent'
12 DLAGENTS
=('file::/usr/bin/curl -qgC - -o %o %u'
13 'ftp::/usr/bin/curl -qgfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
14 'http::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
15 'https::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
16 'rsync::/usr/bin/rsync --no-motd -z %u %o'
17 'scp::/usr/bin/scp -C %u %o')
24 #-- The package required by makepkg to download VCS sources
25 # Format: 'protocol::package'
26 VCSCLIENTS
=('bzr::bzr'
32 #########################################################################
33 # ARCHITECTURE, COMPILE FLAGS
34 #########################################################################
37 CHOST
="x86_64-pc-linux-gnu"
39 #-- Compiler and Linker Flags
41 CFLAGS
="-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions \
42 -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
43 -fstack-clash-protection -fcf-protection"
44 CXXFLAGS
="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
45 LDFLAGS
="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
47 #RUSTFLAGS="-C opt-level=2"
48 #-- Make Flags: change this for DistCC/SMP systems
52 DEBUG_CXXFLAGS
="$DEBUG_CFLAGS"
53 #DEBUG_RUSTFLAGS="-C debuginfo=2"
55 #########################################################################
57 #########################################################################
59 # Makepkg defaults: BUILDENV=(!distcc !color !ccache check !sign)
60 # A negated environment option will do the opposite of the comments below.
62 #-- distcc: Use the Distributed C/C++/ObjC compiler
63 #-- color: Colorize output messages
64 #-- ccache: Use ccache to cache compilation
65 #-- check: Run the check() function if present in the PKGBUILD
66 #-- sign: Generate PGP signature file
68 BUILDENV
=(!distcc color
!ccache check
!sign
)
70 #-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
71 #-- specify a space-delimited list of hosts running in the DistCC cluster.
74 #-- Specify a directory for package building.
75 #BUILDDIR=/tmp/makepkg
77 #########################################################################
78 # GLOBAL PACKAGE OPTIONS
79 # These are default values for the options=() settings
80 #########################################################################
82 # Makepkg defaults: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug !lto)
83 # A negated option will do the opposite of the comments below.
85 #-- strip: Strip symbols from binaries/libraries
86 #-- docs: Save doc directories specified by DOC_DIRS
87 #-- libtool: Leave libtool (.la) files in packages
88 #-- staticlibs: Leave static library (.a) files in packages
89 #-- emptydirs: Leave empty directories in packages
90 #-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip
91 #-- purge: Remove files specified by PURGE_TARGETS
92 #-- debug: Add debugging flags as specified in DEBUG_* variables
93 #-- lto: Add compile flags for building with link time optimization
95 OPTIONS
=(strip docs
!libtool
!staticlibs emptydirs zipman purge
!debug
!lto
)
97 #-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2
98 INTEGRITY_CHECK
=(sha256
)
99 #-- Options to be used when stripping binaries. See `man strip' for details.
100 STRIP_BINARIES
="--strip-all"
101 #-- Options to be used when stripping shared libraries. See `man strip' for details.
102 STRIP_SHARED
="--strip-unneeded"
103 #-- Options to be used when stripping static libraries. See `man strip' for details.
104 STRIP_STATIC
="--strip-debug"
105 #-- Manual (man and info) directories to compress (if zipman is specified)
106 MAN_DIRS
=({usr
{,/local}{,/share
},opt
/*}/{man
,info
})
107 #-- Doc directories to remove (if !docs is specified)
108 DOC_DIRS
=(usr
/{,local
/}{,share
/}{doc
,gtk-doc
} opt
/*/{doc
,gtk-doc
})
109 #-- Files to be removed from all packages (if purge is specified)
110 PURGE_TARGETS
=(usr
/{,share
}/info
/dir .packlist
*.pod
)
111 #-- Directory to store source code in for debug packages
112 DBGSRCDIR
="/usr/src/debug"
114 #########################################################################
116 #########################################################################
118 # Default: put built package and cached source in build directory
120 #-- Destination: specify a fixed directory where all packages will be placed
121 #PKGDEST=/home/packages
122 #-- Source cache: specify a fixed directory where source files will be cached
123 #SRCDEST=/home/sources
124 #-- Source packages: specify a fixed directory where all src packages will be placed
125 #SRCPKGDEST=/home/srcpackages
126 #-- Log files: specify a fixed directory where all log files will be placed
127 #LOGDEST=/home/makepkglogs
128 #-- Packager: name/email of the person or organization building packages
129 #PACKAGER="John Doe <john@doe.com>"
130 #-- Specify a key to use for package signing
133 #########################################################################
134 # COMPRESSION DEFAULTS
135 #########################################################################
137 COMPRESSGZ
=(gzip -c -f -n)
138 COMPRESSBZ2
=(bzip2 -c -f)
139 COMPRESSXZ
=(xz
-c -z -)
140 COMPRESSZST
=(zstd
-c -z -q -)
141 COMPRESSLRZ
=(lrzip
-q)
142 COMPRESSLZO
=(lzop
-q)
143 COMPRESSZ
=(compress -c -f)
145 COMPRESSLZ
=(lzip
-c -f)
147 #########################################################################
149 #########################################################################
151 PKGEXT
='.pkg.tar.zst'
154 #########################################################################
156 #########################################################################
158 #-- Command used to run pacman as root, instead of trying sudo and su