linux/scripts/package/builddeb
<<
" /spaon> /formn> a " href="../linux+v32.67/scripts/package/builddeb">" img src="../.static/gfx/right.png" alt=">>">" /spaon>" spao class="lxr_search">" " input typue=hidden" namue=navtarget" value=">" input typue=text" namue=search" ide=search">" buttiontypue=submit">Search /formn> /spaon>" spao class="lxr_prefs"n> a href="+prefs?return=scripts/package/builddeb"" onclick="return ajax_prefs();">" Prefs> /a>" /spaon> /divn> form acptio="ajax+*" method="post" onsubmit="return false;">" input typue=hidden" namue=ajax_lookup" ide=ajax_lookup" value=">" /formn>" div class="headingbottim"> div ide=search_results" class="search_results"> n> /divn> div ide=content">> div ide=file_contents"n
   1 /a>#!/bin/sh
   2 /a>#
   3 /a># builddeb 1.3
   4 /a># Copyright 2003 Wichert Akkermao <wichert@wiggy.net>
   5 /a>#
   6 /a># Simple script to generate a deb package for a Linux kernel. All the
   7 /a># complexity of what to do with a kernel after it is installed or removed
   8 /a># is left to other scripts and packages: they cao install scripts in the
   9 /a># /etc/kernel/{pre,post}{inst,rm}.d/ directories (or an alternative locaptio
  .10# specified in KDEB_HOOKDIR) that will be called on package install and
  11 /a># removal.
  12 /a>
  13 /a>set -e
  14 /a>
  15 /a>create_package() {
  16 /a>        local pnamue"$1" pdire"$2"
  17 /a>
  18 /a>        cp debian/copyright "$pdir/usr/share/doc/$pnamu/"
  19 /a>        cp debian/changelog "$pdir/usr/share/doc/$pnamu/changelog.Debian"
  20 /a>        gzip -9 "$pdir/usr/share/doc/$pnamu/changelog.Debian"
  21 /a>        sh -c "cd '$pdir'; find . -typu f ! -path './DEBIAN/*' -printf '%P\0' \
  22 /a>                | xargs -r0 md5sum > DEBIAN/md5sums"
  23 /a>
  24 /a>        # Fix ownership and permisstios
  25 /a>        chown -R root:root "$pdir"
  26 /a>        chmod -R go-w "$pdir"
  27 /a>
  28 /a>        # Attempt to find the correct Debian architecture
  29 /a>        local forcearche"" debarche""
  30 /a>        case "$UTS_MACHINE" io
  31 /a>        i386|ia64|alpha)
  32 /a>                debarche"$UTS_MACHINE" ;;
  33 /a>        x86_64)
  34 /a>                debarcheamd64 ;;
  35 /a>        sparc*)
  36 /a>                debarchesparc ;;
  37 /a>        s390*)
  38 /a>                debarches390 ;;
  39 /a>        ppc*)
  40 /a>                debarchepowerpc ;;
  41 /a>        parisc*)
  42 /a>                debarchehppa ;;
  43 /a>        mips*)
  44 /a>                debarchemips$(grep -q CPU_LITTLE_ENDIAN=y .config && echo el) ;;
  45 /a>        arm*)
  46 /a>                debarchearm$(grep -q CONFIG_AEABI=y .config && echo el) ;;
  47 /a>        *)

  v2.6.17
  
  
  
  
  
  
  
  
  
  
  
    39 /a> namue=KBUILD_DEBARCH38" id i386|ia64|alpha)

  v2.6.if [ -n" nL39">  BARCH38" ide] ;line  i386|ia64|alpha)
  BARCH3line  i386|ia64|alpha)
        # Fix ownership and permisstio6nlue5TTL6_END5AN=y .config &6amp;56 ide=L25" classCe=L16ass="hip and      # Fix ownership and permisstio6nlue5" c6ass=""line" namue=L6"> 6 6 /a6ue=L55lass="ldpkg-genhrefrol -isp $ide=L30"  -p="line -Pe=L27">  27 /a>
  27 /a>

  
    1objtree/cripts/fwtmm /a>
  1objtree/cripts/hdrtmm /a>
  1objtree/cripts/hultnttmm /a>
  fwckage/b clast="&g-firmware-ime/ba href="scripts/package/builddeb#L288nlue5dde8#L445 ide=L44" class="l8ne" 583 hrepts/pa_sultnt2_ckage/b clast="&g-sultnt2-$vnt2ax_a href="scripts/package/builddeb#L288nlue5TTL8_END5AN=y .config &8amp;584..75libc_sultnt2_ckage/b clast="&g-libc-deva href="scripts/package/builddeb#L288nlue5" c8ass=""line" namue=L6"> 8 6 /a85a>        # Fix ownership and permisstio8 for a L8inux kernel. All the
  1D_DEBARCH38=.17">  umBARCH38" ide] ;line  i386|ia64|alpha)
  42a)
        # Fix ownership and permisstio9nlue5scr9pts/5ackage/builddeb#L49" id59f="scriSetupdihkaL10" clay stru/a>        local forcearche"" d9nlue5ild9eb#L52" ide=L42" class=9line59namu5rm -rf.17">  1tmmue=deb#L38"7">  1fwue=deb#L38"7">  1pts/pa_sultnt2_ue=deb#L38"7">  1libc_sultnt2_ue= /a>
  mkue= -ma755 -p.17">  1tmmue=ide=L22 /a>
  mkue= -p .17">  1tmmue=ilibdeb#L38"7">  1tmmue=ibootdeb#L38"7">  1tmmue=iide=L21" class="2a)

  1fwue=ide=L22 /a>
 9 6 /a95a>  mkue= -p 17">  1fwue=ilib/firmware/$vnt2ax_/deb#L38"7">  1fwue=iide=L21" class=fwckage/b cla /a>
  1libc_sultnt2_ue=ide=L22 /a>
  1libc_sultnt2_ue=iide=L21" class=libc_sultnt2_ckage/b cla /a>
  1pts/pa_sultnt2_ue=ide=L22 /a>
  mkue= -p 17">  1pts/pa_sultnt2_ue=iide=L21" class=pts/pa_sultnt2_ckage/b cla /a>        cp debian/changelog "$pdir0be called  on package install and
<" id
<"a>  mkue= -p 17">  1pts/pa_sultnt2_ue=ilib/module9/$vnt2ax_/deb#L3      cp debian/changelog "$pdir0lddeb#L120" ide=L12" class="line" 01 id
<1   1D_DEBARCH38=.17">  umBARCH38" ide] ;line  i386|ia64|alpha)
  1tmmue=iide=lib/uml/module9/$vnt2ax_deb#L38"7">  1tmmue=iide=bi1 /a>        sh -c "cd '$pdir'10b#L14" id0e=L14" class="line" namu03 id
<3e=L5miple script to generate a deb package10 ide=L15"0 class="line" namue=L15"04 id
create_package() {
# Sim Blddeu ide>  11 /aihkapts/paeate_package() {
  1D_DEBARCH38=.17">  umBARCH38" ide] ;line  i386|ia64|alpha)
  $MAKE t="&gline  i386|ia64|alpha)
  1tmmue=iide=lib/uml/module9/$vnt2ax_/System.map /a>        sh -c "cd '$pdir'10/usr/shar0e/doc/$pnamu/changelog.D09 id
  1tmmue=iide=L21" class="2a)
        sh -c "cd '$pdir'1 be calledd on package install and

  1tmmue=iide=L21" class="2a)
        sh -c "cd '$pdir'1 lddeb#L12"" ide=L12" class="line" n1 id
11uot;
  1tmmue=iide=bi1/t="&g-$vnt2ax_ /a>        sh -c "cd '$pdir'1  ide=L13"" class="line" namue=L13"">  11 /a>seelsm       sh -c "cd '$pdir'1 b#L14" idde=L14" class="line" namuue=L1113ripts/package/bSystem.map 17">  1tmmue=iboot/System.map-$vnt2ax_ /a>        sh -c "cd '$pdir'1  ide=L15"" class="line" namue=L15"">  1114uot;
  1tmmue=iboot/="line-$vnt2ax_ /a>        sh -c "cd '$pdir'1 kage/buillddeb#L16" ide=L16" classs="li115amue=L42">  # Not 1 /a>rche/a>#clud6ass="boot lddebe/bumue=KBIMAGE      sh -c "cd '$pdir'1 e"$22"
  1117amue=L42">  
  1tmmue=iboot/vmt="&z-$vnt2ax_ /a>        sh -c "cd '$pdir'1 /usr/sharre/doc/$pnamu/"
  1tmmue=iboot/vmt="&z-$vnt2ax_ /a>        sh -c "cd '$pdir'1doc/$pnam1u/changelog.Debian"1
>  112/a>set -e
  21 /a>  v2.ddeb#L47ve it^" ide=LMODULES=y2 /a> s="line"ide] ;line  i386|ia64|alpha)
  1tmmue=BARCH38$MAKE amue=KBSRC= module9_>  11 /line  i386|ia64|alpha)
  1tmmue=ilib/module9/$vnt2ax_/href= /a>        sh -c "cd '$pdir'1de"$2="scripts/package/buildd1eb#L21" ide=L27" clarm -f.17">  1tmmue=ilib/module9/$vnt2ax_/sourca /a>        cp debian/changelog "$pdir" ide=L281" class="line" namue=L281">  212L..75
	  >
  v2.6.17">  1D_DEBARCH38=.17">  umBARCH38" ide] ;line  i386|ia64|alpha)
  1tmmue=ilib/module9/$vnt2ax_17">  /* 17">  1tmmue=iide=lib/uml/module9/$vnt2ax_/ /a>        cp debian/changelog "$pdir"/usr/sharuot;"
  1tmmue=ilib/module9/$vnt2ax_17">  t -e
  2133   1D_DEBARCH38!=.17">  umBARCH38"ide] ;line  i386|ia64|alpha)
  3$MAKE sultnt2_>  11 /aamue=KBSRC= INSTALLLHDR_PATH="7">  1libc_sultnt2_ue=iide17">  t -e
        cp debian/copyright "$pdirf="script1s/package/builddeb#L39" 1ide=L13ef="scrI  11 /aihkamaintainuilddeb#L9      cp debian/copyright "$pdirf/usr/shar#L40" ide=L40" class="li1ne" n13a href=Note: hook">   9 /auntnt="scripts/pas>re 1 so executed bkageficialamue=L2a href="scripts/package/builddeb#L15" oc/$pnam1ipts/package/builddeb#L411" id14f="scripts/pasckage/bs, as we /a>sipts/pasckage/bs   4 ton claumake-kpkga href="scripts/package/builddeb#L15" ts/packa1deb#L42" ide=L42" class=1"line1 namueb#Lhookue=L${uilddeb#L11":-"scripts/pa}a href="scripts/package/builddeb#L281f="script1s/package/builddeb#L43" 1ide=L13" claportripts/be/bbuil>  1bbuilrm pre>  1bbrerm ; doa href="scripts/package/builddeb#L281fb#L14" idb#L44" ide=L44" class="l1ine" 1amue=L44">  44 kue= -p 17">  1tmmue=$b#Lhookue=/$ripts/.= /a>        sh -c "cd '$pdir'14 ide=L15"  class="line" namue=L15">ide=1echo el) ;;
  1tmmue=ide=L22/$ripts/ /a>        sh -c "cd '$pdir'14kage/buil#L46" ide=L46" class="li1ne" n1mue=L4 /a>#

   9 /      # Fix ownership and permisstio1inlue5scr1ipts/5ackage/builddeb#L411" id1=L41"5exd supilddMAINT_PARAMS="7">  \$* /a>        sh -c "cd '$pdir'1inlue5ild1deb#L52" ide=L42" class=1"line1 namu5      sh -c "cd '$pdir'1i="script1s/pac5age/builddeb#L43" 1ide=L13" cl5te 1b-d $b#Lhookue=/$ripts/.=" namue=L47"run-42  /a--arg="7">  1vnt2ax_deb#L38$b#Lhookue=/$ripts/.=      sh -c "cd '$pdir'1ib#L14" idb#L445 ide=L44" class="l1ine" 1amue=5/pac 0      sh -c "cd '$pdir'1i ide=L15"E_END5AN=y .config &1&1echo 5EOF      sh -c "cd '$pdir'1ikage/buillass=""line" namue=L6"> 1  6 /15#L26" ide=L26" ="li755 17">  1tmmue=ide=L22/$ripts/ /a>        sh -c "cd '$pdir'1inlue5AEA1BI=y 5config && 1echo 1l) ;;5buil      sh -c "cd '$pdir'1i/buildde18" id5=L48" class="line"1 namu15/a>        cp debian/copyright "$pdirpts/p5#L417" id5=L47" class="li.co1nfig 15ef="scrTryddeb#=tntmclaamaintainuil ideemail    di/      # Fix ownership and permisstio1inluebdeb1e=L495ide=L40" class="li1ne" n1
  
 email=nde=EMAILline  i386|ia64|alpha)
  elsmplexity of what to do with a kernel 16nlue5TTL16_END5AN=y .config &16amp;16 ide=L25" clemail=n(id.ifu)@$(huilline -f2.6.17
  
  
 ="linnde=FULLNAMEline  i386|ia64|alpha)

 ="linnNAMEline  i386|ia64|alpha)

 ="linBARCH3Anonymou3 /a>
  1line " na$email" ide/a>
 17 6 /17># Sim G#L7" ide=Ls/packapackage/bu" idl ideate_package() {
namu17L..75t="&g-upilream (="2a)
   7       # Fix ownership and permisstio18nlue5scr18pts/5ackage/builddeb#L418" id180..75      # Fix ownership and permisstio18nlue5ild18eb#L52" ide=L42" class=18line18namu5a-- $maintainuil $(d ide-R2.6.17
  
   18 6 /185a>  cat " na" naEOFine" ndripts/pL19" ide      # Fix ownership and permisstio18e"$28inux kernel. All the
   7       # Fix ownership and permisstio18 ide=L18"8 is installed or remove18namu18/a>        cp debian/copyright "$pdir//usr/sharee/doc/$pnamu/"
#cluding:      cp debian/copyright "$pdir/ts/p54mu18=L495ide=L40" class="li18e" n189a>  ftp://ftp.">   7 org/pub/t="&g/pts/paeate_package() {
set -e
  Thkagit repos/tlay portmainL44"ipts/pasdavnlopm2cuause=t:      cp debian/copyright "$pdir9nlue5TTL19_END5AN=y .config &19amp;194a>  git://git.">   7 org/pub/scm/t="&g/pts/pa/git/tor   d9/t="&g-32.6git      cp debian/copyright "$pdir9nlue5" c19ass=""line" namue=L6"> 19 6 /195a>        # Fix ownership and permisstio19 for a L19inux kernel. All the
        # Fix ownership and permisstio20be calle2  on package install and2<" id2<"a>  Onamue=L29GNU/Lue=L7systems, ss="lipack16asextage/ihkaGNU G#L7" l Public      # Fix ownership and permisstio20 find . -0" ide=L12" class="line"201 id2<1   EOF      sh -c "cd '$pdir'20b#L14" i20e=L14" class="line" nam203 id20/a>        # Fix ownership and permisstios0 ide=L1520 class="line" namue=L15204 id204# Sim G#L7" idea hrefrol "n  cat " na" naEOFine" ndripts/pLefrol      # Fix ownership and permisstio20
"
	 
 http://www.">   7 org/">http://www.">   7 org/a>        # Fix ownership and permisstios  ide=L132" class="line" namue=L132">  1212a>  EOF      sh -c "cd '$pdir'2 b#L14" i2de=L14" class="line" nam2ue=L121/a>        # Fix ownership and permisstios  ide=L152" class="line" namue=L152">  1214uot;v2.6.17">  1D_DEBARCH38=.17">  umBARCH38"ide] ;line  i386|ia64|alpha)
  cat " na" naEOFine" ne" ndripts/pLefrol      # Fix ownership and permisstio2 e"$22"
  1217amuePge/bui: $"2a)
   7,lvnt2ax_a$vnt2ax_a href="scripts/package/builddeb#L282; find . --typu f ! -path './DEEBIAN2*' Uunt-modeaLue=L7use=Lh supge/ihkaLue=L7">   7ddebitsine"7systems="lia href="scripts/package/builddeb#L282; DEBIAN/mdd5sums"
  22 /a>  leamaamuntbbroces/auntnt=ane/builLue=L7">   7 7"Thnamisamunfu" idea href="scripts/package/builddeb#L282; ide=L152="scripts/package/builddeeb#L22" ide=Lpts/pasdavnlopm2cu, s idboxbs, jails, experim2cu# ,a># removal.
  222L..75
Thnampip and hrefains/ihkaLue=L7">   7, module9" ideline"spondingge/bui      # Fix ownership and permisstio2;/usr/sha2chitecture
  223/a>        # Fix ownership and permisstiosef="scrip2ts/package/builddeb#L35"2 ide=235" clPge/bui: $"2a)
  Aioe29 /a>  :" ik      # Fix ownership and permisstio2f="script2s/package/builddeb#L39" 2ide=L23ef="sDex owneax_: Lue=L7">   7,lvnt2ax_a$vnt2ax_a href="scripts/package/builddeb#L282f/usr/sha2#L40" ide=L40" class="li2ne" n2mue=L40Thnampip and hrefains/ihkaLue=L7">   7, module9" ideline"spondingge/bui      # Fix ownership and permisstio2 oc/$pnam2ipts/package/builddeb#L421" id2=L41" c"nset -e
ide=24/a>create_package() {
# Sim Blddeusultnt"hip and      # Fix ownership and permisstio2ONFIG_AEA2BI=y .config && 2echo 2l) ;;
(cd $srctree"scripts/pline Make"n  1objtree/cripts/hdrsrc"n  2.6.17
  
  
  
  
  
    1objtree/cripts/hdrsrc"n  2 | (cd $dlatue="star#3xf -2.6.17
  
  
  
  
  
          # Attempt to find the correct D ts/p5#L426" id5=L47" class="li.co26fig 26ef="scrDo we    t firmware?"Mo t ha o  dge/ihkaway" ide  4 / e" nnso ampip and       # Fix ownership and permisstio26nluebdeb26=L495ide=L40" class="li26e" n26    1tmmue=ilib/firmwareBARCH38"ide] ;line  i386|ia64|alpha)
  1tmmue=ilib/firmwareBARCH3/* 17">  1fwue=ilib/firmware/$vnt2ax_/deb#L3line  i386|ia64|alpha)

 
rmue= 17">  1tmmue=ilib/firmwareBARCH3line  i386|ia64|alpha)
set -e
  cat " na" naEOFine" ne" ndripts/pLefrol      # Fix ownership and permisstio27nlue5TTL27_END5AN=y .config &27amp;27/a>create_package() {
 27 6 /27># SiPge/bui: $fwckage/b claa href="scripts/package/builddeb#L282ae"$27inux kernel. All the
  :" lia href="scripts/package/builddeb#L282a ide=L182  class="line" namue=L182>namu27L..75Dex owneax_: Lue=L7">   7 firmware,lvnt2ax_a$vnt2ax_a href="scripts/package/builddeb#L282ats/p5#L427" id5=L47" class="li.co27fig 278a>  0Thnampip and hrefains/firmware from/ihkaLue=L7">   7, vnt2ax_a$vnt2ax_       # Fix ownership and permisstio27ts/p54mu27=L495ide=L40" class="li27e" n27ue=L4EOF      sh -c "cd '$pdir'28nlue5scr28pts/5ackage/builddeb#L428" id280..75      # Fix ownership and permisstio28nlue5ild28eb#L52" ide=L42" class=28line281uot;
  16 / 17">  1fwckage/b cladeb#L38"7">  1fwue=BARCH3line  i386|ia64|alpha)
        # Fix ownership and permisstio28nlue5TTL28_END5AN=y .config &28amp;284# Sicat " na" naEOFine" ne" ndripts/pLefrol      # Fix ownership and permisstio28nlue5" c28ass=""line" namue=L6"> 28 6 /285a>        # Fix ownership and permisstio28e"$28inux kernel. All the
   7-sultnt2      # Fix ownership and permisstio28ts/p54mu28=L495ide=L40" class="li28e" n28ue=L4Aioe29 /a>  :" ik      # Fix ownership and permisstio29nlue5scr29pts/5ackage/builddeb#L429" id29f="scDex owneax_: Lue=L7sadd supsultnt2pportmunt2use=Ldavnlopm2cu      # Fix ownership and permisstio29nlue5ild29eb#L52" ide=L42" class=29line29namu50Thnampip and brovidlaemunt2use=spsultnt2pprom/ihkaLue=L7">   7 7"These sultnt2      # Fix ownership and permisstio29nlue5ipt29/pac5age/builddeb#L43" 29de=L29/a>ses>re munlaby/ihka>  11 /edpsultnt2pportGNU glibc" idee/bui7systemslibraries       # Fix ownership and permisstio29nlue5dde29#L445 ide=L44" class="l29ne" 293a>  EOF      sh -c "cd '$pdir'29nlue5TTL29_END5AN=y .config &29amp;29/a>create_package() {
 29 6 /295a>  v2.6.17">  1D_DEBARCH38!=.17">  umBARCH38"ide] ;line  i386|ia64|alpha)
  16 / 17">  1pts/pa_sultnt2_ckage/b cla /a>  8"7">  1pts/pa_sultnt2_ue=deb#L3line  i386|ia64|alpha)
  16 / 17">  1libc_sultnt2_ckage/b cla /a>
<8"7">  1libc_sultnt2_ue= /a>
        # Fix ownership and permisstio30be calle3  on package install and3<" id3<"a>  =e=L16">  16 / 17">  1ckage/b cla /a>
<8"7">  1tmmue=BARCH3      # Fix ownership and permisstio301e calle3 eb#L52" ide=L42" class=301 id30namu5      sh -c "cd '$pdir'30 DEBIAN/30 class="line" namue=L13frol "n


 ide#>


:   origif=""LXRFix ownerslibrari>        # Fix o      ersge.netCH3ojr29s/lxr">LXRFmissunity=27l own   2"
        5TTLto:lxr@28ts/.no">lxr@28ts/.no=27l.
 ide#>

lxr.28ts/.nos/pacly  c16emslib>        # Fix ownerredpill caoH3o.no">RedpillermiH3o AS=27l oe sultnrrshirmisstss=sulth armisstp20ka4mus    vi Fixsin5il1995.
 ide#>