Advertisement
Guest User

makepkg

a guest
Oct 26th, 2021
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 6.31 KB | None | 0 0
  1. #!/hint/bash
  2. #
  3. # /etc/makepkg.conf
  4. #
  5.  
  6. #########################################################################
  7. # SOURCE ACQUISITION
  8. #########################################################################
  9. #
  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')
  18.  
  19. # Other common tools:
  20. # /usr/bin/snarf
  21. # /usr/bin/lftpget -c
  22. # /usr/bin/wget
  23.  
  24. #-- The package required by makepkg to download VCS sources
  25. #  Format: 'protocol::package'
  26. VCSCLIENTS=('bzr::bzr'
  27.             'fossil::fossil'
  28.             'git::git'
  29.             'hg::mercurial'
  30.             'svn::subversion')
  31.  
  32. #########################################################################
  33. # ARCHITECTURE, COMPILE FLAGS
  34. #########################################################################
  35. #
  36. CARCH="x86_64"
  37. CHOST="x86_64-pc-linux-gnu"
  38.  
  39. #-- Compiler and Linker Flags
  40. #CPPFLAGS=""
  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"
  46. #RUSTFLAGS="-C opt-level=2"
  47. #-- Make Flags: change this for DistCC/SMP systems
  48. #MAKEFLAGS="-j2"
  49. MAKEFLAGS="-j20 -Wno-error -w -s"
  50. #-- Debugging flags
  51. DEBUG_CFLAGS="-g -fvar-tracking-assignments"
  52. DEBUG_CXXFLAGS="-g -fvar-tracking-assignments"
  53. #DEBUG_RUSTFLAGS="-C debuginfo=2"
  54.  
  55. #########################################################################
  56. # BUILD ENVIRONMENT
  57. #########################################################################
  58. #
  59. # Makepkg defaults: BUILDENV=(!distcc !color !ccache check !sign)
  60. #  A negated environment option will do the opposite of the comments below.
  61. #
  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
  67. #
  68. BUILDENV=(!distcc color !ccache check !sign)
  69. #
  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.
  72. #DISTCC_HOSTS=""
  73. #
  74. #-- Specify a directory for package building.
  75. #BUILDDIR=/tmp/makepkg
  76.  
  77. #########################################################################
  78. # GLOBAL PACKAGE OPTIONS
  79. #   These are default values for the options=() settings
  80. #########################################################################
  81. #
  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.
  84. #
  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
  94. #
  95. OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge !debug !lto)
  96.  
  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"
  113.  
  114. #########################################################################
  115. # PACKAGE OUTPUT
  116. #########################################################################
  117. #
  118. # Default: put built package and cached source in build directory
  119. #
  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
  131. #GPGKEY=""
  132.  
  133. #########################################################################
  134. # COMPRESSION DEFAULTS
  135. #########################################################################
  136. #
  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)
  144. COMPRESSLZ4=(lz4 -q)
  145. COMPRESSLZ=(lzip -c -f)
  146.  
  147. #########################################################################
  148. # EXTENSION DEFAULTS
  149. #########################################################################
  150. #
  151. PKGEXT='.pkg.tar.zst'
  152. SRCEXT='.src.tar.gz'
  153.  
  154. #########################################################################
  155. # OTHER
  156. #########################################################################
  157. #
  158. #-- Command used to run pacman as root, instead of trying sudo and su
  159. #PACMAN_AUTH=()
  160.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement