|
@@ -79,6 +79,7 @@ if [ -n "$KDEB_PKGVERSION" ]; then
|
|
|
else
|
|
|
packageversion=$version-$revision
|
|
|
fi
|
|
|
+sourcename=$KDEB_SOURCENAME
|
|
|
tmpdir="$objtree/debian/tmp"
|
|
|
fwdir="$objtree/debian/fwtmp"
|
|
|
kernel_headers_dir="$objtree/debian/hdrtmp"
|
|
@@ -238,7 +239,7 @@ fi
|
|
|
|
|
|
# Generate a simple changelog template
|
|
|
cat <<EOF > debian/changelog
|
|
|
-linux-upstream ($packageversion) $distribution; urgency=low
|
|
|
+$sourcename ($packageversion) $distribution; urgency=low
|
|
|
|
|
|
* Custom built Linux kernel.
|
|
|
|
|
@@ -265,12 +266,16 @@ On Debian GNU/Linux systems, the complete text of the GNU General Public
|
|
|
License version 2 can be found in \`/usr/share/common-licenses/GPL-2'.
|
|
|
EOF
|
|
|
|
|
|
+
|
|
|
+build_depends="bc, kmod, cpio "
|
|
|
+
|
|
|
# Generate a control file
|
|
|
cat <<EOF > debian/control
|
|
|
-Source: linux-upstream
|
|
|
+Source: $sourcename
|
|
|
Section: kernel
|
|
|
Priority: optional
|
|
|
Maintainer: $maintainer
|
|
|
+Build-Depends: $build_depends
|
|
|
Standards-Version: 3.8.4
|
|
|
Homepage: http://www.kernel.org/
|
|
|
EOF
|
|
@@ -391,4 +396,33 @@ EOF
|
|
|
create_package "$dbg_packagename" "$dbg_dir"
|
|
|
fi
|
|
|
|
|
|
+if [ "x$1" = "xdeb-pkg" ]
|
|
|
+then
|
|
|
+ cat <<EOF > debian/rules
|
|
|
+#!/usr/bin/make -f
|
|
|
+
|
|
|
+build:
|
|
|
+ \$(MAKE)
|
|
|
+
|
|
|
+binary-arch:
|
|
|
+ \$(MAKE) KDEB_SOURCENAME=${sourcename} KDEB_PKGVERSION=${packageversion} bindeb-pkg
|
|
|
+
|
|
|
+clean:
|
|
|
+ rm -rf debian/*tmp
|
|
|
+ mv debian/ debian.backup # debian/ might be cleaned away
|
|
|
+ \$(MAKE) clean
|
|
|
+ mv debian.backup debian
|
|
|
+
|
|
|
+binary: binary-arch
|
|
|
+EOF
|
|
|
+ mv ${sourcename}.tar.gz ../${sourcename}_${version}.orig.tar.gz
|
|
|
+ tar caf ../${sourcename}_${packageversion}.debian.tar.gz debian/{copyright,rules,changelog,control}
|
|
|
+ dpkg-source -cdebian/control -ldebian/changelog --format="3.0 (custom)" --target-format="3.0 (quilt)" \
|
|
|
+ -b / ../${sourcename}_${version}.orig.tar.gz ../${sourcename}_${packageversion}.debian.tar.gz
|
|
|
+ mv ${sourcename}_${packageversion}*dsc ..
|
|
|
+ dpkg-genchanges > ../${sourcename}_${packageversion}_${debarch}.changes
|
|
|
+else
|
|
|
+ dpkg-genchanges -b > ../${sourcename}_${packageversion}_${debarch}.changes
|
|
|
+fi
|
|
|
+
|
|
|
exit 0
|