Guest User

makepkg.conf

a guest
Oct 24th, 2021
322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 7.12 KB | None | 0 0
  1. CURRENT makepkg.conf SETTINGS
  2.  
  3. These edits were taken from the Arch Wiki. I may have goobered some of them.
  4.  
  5. Notible Edits:
  6.  
  7. CFLAGS="-march=native
  8. CXXFLAGS="{$CFLAGS}
  9. BUILDENV=(!distcc color ccache check !sign)   #-- Removed the "!" before ccache
  10. BUILDDIR=/tmp/makepkg makepkg    #-- Set the BUILDDIR to a tmpfs per the Arch Wiki
  11.  
  12. PKGDEST=/home/.packages   #-- This was the default location, but I changed the setting to a hidden folder. Then
  13. I mkdir the folder in question and gave it chmod 777
  14. COMPRESSXZ=(xz -c -z --threads=0 -)
  15. COMPRESSZST=(zstd -c -z -q --threads=0 -)
  16. I gave them the "--threads=0" value per the Arch Wiki here:  https://wiki.archlinux.org/title/Ccache
  17.  
  18.  
  19. ----------------------------------------------------------------------------------------------------------------------
  20.  
  21. #!/hint/bash
  22. #
  23. # /etc/makepkg.conf
  24. #
  25.  
  26. #########################################################################
  27. # SOURCE ACQUISITION
  28. #########################################################################
  29. #
  30. #-- The download utilities that makepkg should use to acquire sources
  31. #  Format: 'protocol::agent'
  32. DLAGENTS=('file::/usr/bin/curl -qgC - -o %o %u'
  33.           'ftp::/usr/bin/curl -qgfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
  34.           'http::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
  35.           'https::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
  36.           'rsync::/usr/bin/rsync --no-motd -z %u %o'
  37.           'scp::/usr/bin/scp -C %u %o')
  38.  
  39. # Other common tools:
  40. # /usr/bin/snarf
  41. # /usr/bin/lftpget -c
  42. # /usr/bin/wget
  43.  
  44. #-- The package required by makepkg to download VCS sources
  45. #  Format: 'protocol::package'
  46. VCSCLIENTS=('bzr::bzr'
  47.             'fossil::fossil'
  48.             'git::git'
  49.             'hg::mercurial'
  50.             'svn::subversion')
  51.  
  52. #########################################################################
  53. # ARCHITECTURE, COMPILE FLAGS
  54. #########################################################################
  55. #
  56. CARCH="x86_64"
  57. CHOST="x86_64-pc-linux-gnu"
  58.  
  59. #-- Compiler and Linker Flags
  60. #CPPFLAGS=""
  61. CFLAGS="-march=native -O2 -pipe -fno-plt -fexceptions \
  62.        -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
  63.        -fstack-clash-protection -fcf-protection"
  64. CXXFLAGS="{$CFLAGS} -Wp,-D_GLIBCXX_ASSERTIONS"
  65. LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
  66. #RUSTFLAGS="-C opt-level=2 -C target-cpu=native"
  67. #-- Make Flags: change this for DistCC/SMP systems
  68. MAKEFLAGS="-j$(nproc)"
  69. #-- Debugging flags
  70. DEBUG_CFLAGS="-g -fvar-tracking-assignments"
  71. DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"
  72. #DEBUG_RUSTFLAGS="-C debuginfo=2"
  73.  
  74. #########################################################################
  75. # BUILD ENVIRONMENT
  76. #########################################################################
  77. #
  78. # Makepkg defaults: BUILDENV=(!distcc !color !ccache check !sign)
  79. #  A negated environment option will do the opposite of the comments below.
  80. #
  81. #-- distcc:   Use the Distributed C/C++/ObjC compiler
  82. #-- color:    Colorize output messages
  83. #-- ccache:   Use ccache to cache compilation
  84. #-- check:    Run the check() function if present in the PKGBUILD
  85. #-- sign:     Generate PGP signature file
  86. #
  87. BUILDENV=(!distcc color ccache check !sign)
  88. #
  89. #-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
  90. #-- specify a space-delimited list of hosts running in the DistCC cluster.
  91. #DISTCC_HOSTS=""
  92. #
  93. #-- Specify a directory for package building.
  94. BUILDDIR=/tmp/makepkg makepkg
  95.  
  96. #########################################################################
  97. # GLOBAL PACKAGE OPTIONS
  98. #   These are default values for the options=() settings
  99. #########################################################################
  100. #
  101. # Makepkg defaults: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug !lto)
  102. #  A negated option will do the opposite of the comments below.
  103. #
  104. #-- strip:      Strip symbols from binaries/libraries
  105. #-- docs:       Save doc directories specified by DOC_DIRS
  106. #-- libtool:    Leave libtool (.la) files in packages
  107. #-- staticlibs: Leave static library (.a) files in packages
  108. #-- emptydirs:  Leave empty directories in packages
  109. #-- zipman:     Compress manual (man and info) pages in MAN_DIRS with gzip
  110. #-- purge:      Remove files specified by PURGE_TARGETS
  111. #-- debug:      Add debugging flags as specified in DEBUG_* variables
  112. #-- lto:        Add compile flags for building with link time optimization
  113. #
  114. OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug !lto)
  115.  
  116. #-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2
  117. INTEGRITY_CHECK=(sha256)
  118. #-- Options to be used when stripping binaries. See `man strip' for details.
  119. STRIP_BINARIES="--strip-all"
  120. #-- Options to be used when stripping shared libraries. See `man strip' for details.
  121. STRIP_SHARED="--strip-unneeded"
  122. #-- Options to be used when stripping static libraries. See `man strip' for details.
  123. STRIP_STATIC="--strip-debug"
  124. #-- Manual (man and info) directories to compress (if zipman is specified)
  125. MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
  126. #-- Doc directories to remove (if !docs is specified)
  127. DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
  128. #-- Files to be removed from all packages (if purge is specified)
  129. PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
  130. #-- Directory to store source code in for debug packages
  131. DBGSRCDIR="/usr/src/debug"
  132.  
  133. #########################################################################
  134. # PACKAGE OUTPUT
  135. #########################################################################
  136. #
  137. # Default: put built package and cached source in build directory
  138. #
  139. #-- Destination: specify a fixed directory where all packages will be placed
  140. PKGDEST=/home/.packages
  141. #-- Source cache: specify a fixed directory where source files will be cached
  142. #SRCDEST=/home/sources
  143. #-- Source packages: specify a fixed directory where all src packages will be placed
  144. #SRCPKGDEST=/home/srcpackages
  145. #-- Log files: specify a fixed directory where all log files will be placed
  146. #LOGDEST=/home/makepkglogs
  147. #-- Packager: name/email of the person or organization building packages
  148. #PACKAGER="John Doe <[email protected]>"
  149. #-- Specify a key to use for package signing
  150. #GPGKEY=""
  151.  
  152. #########################################################################
  153. # COMPRESSION DEFAULTS
  154. #########################################################################
  155. #
  156. COMPRESSGZ=(pigz -c -f -n)
  157. COMPRESSBZ2=(bzip2 -c -f)
  158. COMPRESSXZ=(xz -c -z --threads=0 -)
  159. COMPRESSZST=(zstd -c -z -q --threads=0 -)
  160. COMPRESSLRZ=(lrzip -q)
  161. COMPRESSLZO=(lzop -q)
  162. COMPRESSZ=(compress -c -f)
  163. COMPRESSLZ4=(lz4 -q)
  164. COMPRESSLZ=(lzip -c -f)
  165.  
  166. #########################################################################
  167. # EXTENSION DEFAULTS
  168. #########################################################################
  169. #
  170. PKGEXT='.pkg.tar.zst'
  171. SRCEXT='.src.tar.gz'
  172.  
  173. #########################################################################
  174. # OTHER
  175. #########################################################################
  176. #
  177. #-- Command used to run pacman as root, instead of trying sudo and su
  178. #PACMAN_AUTH=()
  179.  
Advertisement
Add Comment
Please, Sign In to add comment