Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 149502
b: refs/heads/master
c: 3e2ab25
h: refs/heads/master
v: v3
  • Loading branch information
Frans Pop authored and Sam Ravnborg committed Jun 9, 2009
1 parent f4a5a4c commit 8a14374
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4f66199b4b372a530333d0f25aeb5d80362241ed
refs/heads/master: 3e2ab2563a599c3d3fd03952c056af09fc03b74a
37 changes: 20 additions & 17 deletions trunk/scripts/package/builddeb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@

set -e

create_package() {
local pname="$1" pdir="$2"

# Fix ownership and permissions
chown -R root:root "$pdir"
chmod -R go-w "$pdir"

# Create the package
dpkg-gencontrol -isp -p$pname -P"$pdir"
dpkg --build "$pdir" ..
}

# Some variables and settings used throughout the script
version=$KERNELRELEASE
revision=$(cat .version)
Expand Down Expand Up @@ -77,13 +89,16 @@ linux ($version-$revision) unstable; urgency=low
EOF

# Generate a control file
if [ "$ARCH" = "um" ]; then
cat <<EOF > debian/control
cat <<EOF > debian/control
Source: linux
Section: base
Priority: optional
Maintainer: $name
Standards-Version: 3.6.1
EOF

if [ "$ARCH" = "um" ]; then
cat <<EOF >> debian/control
Package: $packagename
Provides: kernel-image-$version, linux-image-$version
Expand All @@ -100,12 +115,7 @@ Description: User Mode Linux kernel, version $version
EOF

else
cat <<EOF > debian/control
Source: linux
Section: base
Priority: optional
Maintainer: $name
Standards-Version: 3.6.1
cat <<EOF >> debian/control
Package: $packagename
Provides: kernel-image-$version, linux-image-$version
Expand All @@ -118,10 +128,6 @@ EOF

fi

# Fix some ownership and permissions
chown -R root:root "$tmpdir"
chmod -R go-w "$tmpdir"

# Do we have firmware? Move it out of the way and build it into a package.
if [ -e "$tmpdir/lib/firmware" ]; then
mv "$tmpdir/lib/firmware" "$fwdir/lib/"
Expand All @@ -134,12 +140,9 @@ Description: Linux kernel firmware, version $version
This package contains firmware from the Linux kernel, version $version
EOF

dpkg-gencontrol -isp -p$fwpackagename -P"$fwdir"
dpkg --build "$fwdir" ..
create_package "$fwpackagename" "$fwdir"
fi

# Perform the final magic
dpkg-gencontrol -isp -p$packagename
dpkg --build "$tmpdir" ..
create_package "$packagename" "$tmpdir"

exit 0

0 comments on commit 8a14374

Please sign in to comment.