~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/scripts/package/PKGBUILD

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /scripts/package/PKGBUILD (Version linux-6.12-rc7) and /scripts/package/PKGBUILD (Version linux-6.1.116)


  1 # SPDX-License-Identifier: GPL-2.0-only           
  2 # Maintainer: Thomas Weißschuh <linux@weisssch    
  3 # Contributor: Jan Alexander Steffens (heftig)<    
  4                                                   
  5 pkgbase=${PACMAN_PKGBASE:-linux-upstream}         
  6 pkgname=("${pkgbase}")                            
  7                                                   
  8 _extrapackages=${PACMAN_EXTRAPACKAGES-headers     
  9 for pkg in $_extrapackages; do                    
 10         pkgname+=("${pkgbase}-${pkg}")            
 11 done                                              
 12                                                   
 13 pkgver="${KERNELRELEASE//-/_}"                    
 14 # The PKGBUILD is evaluated multiple times.       
 15 # Running scripts/build-version from here woul    
 16 pkgrel="${KBUILD_REVISION}"                       
 17 pkgdesc='Upstream Linux'                          
 18 url='https://www.kernel.org/'                     
 19 # Enable flexible cross-compilation               
 20 arch=(${CARCH})                                   
 21 license=(GPL-2.0-only)                            
 22 makedepends=(                                     
 23         bc                                        
 24         bison                                     
 25         cpio                                      
 26         flex                                      
 27         gettext                                   
 28         kmod                                      
 29         libelf                                    
 30         openssl                                   
 31         pahole                                    
 32         perl                                      
 33         python                                    
 34         rsync                                     
 35         tar                                       
 36 )                                                 
 37 options=(!debug !strip !buildflags !makeflags)    
 38                                                   
 39 _prologue() {                                     
 40         # MAKEFLAGS from makepkg.conf override    
 41         # Bypass this override with a custom v    
 42         export MAKEFLAGS="${KBUILD_MAKEFLAGS}"    
 43                                                   
 44         # Kbuild works in the output directory    
 45         cd "$(dirname "${BASH_SOURCE[0]}")"       
 46 }                                                 
 47                                                   
 48 build() {                                         
 49         _prologue                                 
 50                                                   
 51         ${MAKE} KERNELRELEASE="${KERNELRELEASE    
 52 }                                                 
 53                                                   
 54 _package() {                                      
 55         pkgdesc="The ${pkgdesc} kernel and mod    
 56                                                   
 57         local modulesdir="${pkgdir}/usr/${MODL    
 58                                                   
 59         _prologue                                 
 60                                                   
 61         echo "Installing boot image..."           
 62         # systemd expects to find the kernel h    
 63         # https://github.com/systemd/systemd/c    
 64         install -Dm644 "$(${MAKE} -s image_nam    
 65                                                   
 66         # Used by mkinitcpio to name the kerne    
 67         echo "${pkgbase}" > "${modulesdir}/pkg    
 68                                                   
 69         echo "Installing modules..."              
 70         ${MAKE} INSTALL_MOD_PATH="${pkgdir}/us    
 71                 DEPMOD=true modules_install       
 72                                                   
 73         if [ -d "${srctree}/arch/${SRCARCH}/bo    
 74                 echo "Installing dtbs..."         
 75                 ${MAKE} INSTALL_DTBS_PATH="${m    
 76         fi                                        
 77                                                   
 78         # remove build link, will be part of -    
 79         rm -f "${modulesdir}/build"               
 80 }                                                 
 81                                                   
 82 _package-headers() {                              
 83         pkgdesc="Headers and scripts for build    
 84                                                   
 85         local builddir="${pkgdir}/usr/${MODLIB    
 86                                                   
 87         _prologue                                 
 88                                                   
 89         if grep -q CONFIG_MODULES=y include/co    
 90                 echo "Installing build files..    
 91                 "${srctree}/scripts/package/in    
 92         fi                                        
 93                                                   
 94         echo "Installing System.map and config    
 95         mkdir -p "${builddir}"                    
 96         cp System.map "${builddir}/System.map"    
 97         cp .config "${builddir}/.config"          
 98                                                   
 99         echo "Adding symlink..."                  
100         mkdir -p "${pkgdir}/usr/src"              
101         ln -sr "${builddir}" "${pkgdir}/usr/sr    
102 }                                                 
103                                                   
104 _package-api-headers() {                          
105         pkgdesc="Kernel headers sanitized for     
106         provides=(linux-api-headers)              
107         conflicts=(linux-api-headers)             
108                                                   
109         _prologue                                 
110                                                   
111         ${MAKE} headers_install INSTALL_HDR_PA    
112 }                                                 
113                                                   
114 _package-debug(){                                 
115         pkgdesc="Non-stripped vmlinux file for    
116                                                   
117         local debugdir="${pkgdir}/usr/src/debu    
118         local builddir="${pkgdir}/usr/${MODLIB    
119                                                   
120         _prologue                                 
121                                                   
122         install -Dt "${debugdir}" -m644 vmlinu    
123         mkdir -p "${builddir}"                    
124         ln -sr "${debugdir}/vmlinux" "${buildd    
125 }                                                 
126                                                   
127 for _p in "${pkgname[@]}"; do                     
128         eval "package_$_p() {                     
129                 $(declare -f "_package${_p#$pk    
130                 _package${_p#$pkgbase}            
131         }"                                        
132 done                                              
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php