builddeb (159956f34ede363e67a87bea840937e242293e91) builddeb (5e73758b43c3defba2578df6d3a53e942fa6b41e)
1#!/bin/sh
2#
3# builddeb 1.3
4# Copyright 2003 Wichert Akkerman <wichert@wiggy.net>
5#
6# Simple script to generate a deb package for a Linux kernel. All the
7# complexity of what to do with a kernel after it is installed or removed
8# is left to other scripts and packages: they can install scripts in the

--- 12 unchanged lines hidden (view full) ---

21 echo -n "$2"
22 elif [ $# -ge 3 ]; then
23 echo -n "$3"
24 fi
25}
26
27create_package() {
28 local pname="$1" pdir="$2"
1#!/bin/sh
2#
3# builddeb 1.3
4# Copyright 2003 Wichert Akkerman <wichert@wiggy.net>
5#
6# Simple script to generate a deb package for a Linux kernel. All the
7# complexity of what to do with a kernel after it is installed or removed
8# is left to other scripts and packages: they can install scripts in the

--- 12 unchanged lines hidden (view full) ---

21 echo -n "$2"
22 elif [ $# -ge 3 ]; then
23 echo -n "$3"
24 fi
25}
26
27create_package() {
28 local pname="$1" pdir="$2"
29 local dpkg_deb_opts
30
29
31 mkdir -m 755 -p "$pdir/DEBIAN"
32 mkdir -p "$pdir/usr/share/doc/$pname"
33 cp debian/copyright "$pdir/usr/share/doc/$pname/"
34 cp debian/changelog "$pdir/usr/share/doc/$pname/changelog.Debian"
35 gzip -n -9 "$pdir/usr/share/doc/$pname/changelog.Debian"
36 sh -c "cd '$pdir'; find . -type f ! -path './DEBIAN/*' -printf '%P\0' \
37 | xargs -r0 md5sum > DEBIAN/md5sums"
30 export DH_OPTIONS="-p${pname} -P${pdir}"
38
31
39 # a+rX in case we are in a restrictive umask environment like 0077
40 # ug-s in case we build in a setuid/setgid directory
41 chmod -R go-w,a+rX,ug-s "$pdir"
42
43 # Create the package
44 dpkg-gencontrol -p$pname -P"$pdir"
45 dpkg-deb --root-owner-group ${KDEB_COMPRESS:+-Z$KDEB_COMPRESS} --build "$pdir" ..
32 dh_installdocs
33 dh_installchangelogs
34 dh_compress
35 dh_fixperms
36 dh_gencontrol
37 dh_md5sums
38 dh_builddeb -- ${KDEB_COMPRESS:+-Z$KDEB_COMPRESS}
46}
47
48install_linux_image () {
49 pdir=$1
50 pname=$2
51
52 rm -rf ${pdir}
53

--- 159 unchanged lines hidden ---
39}
40
41install_linux_image () {
42 pdir=$1
43 pname=$2
44
45 rm -rf ${pdir}
46

--- 159 unchanged lines hidden ---