summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2014-11-28 18:16:18 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2014-12-08 10:29:39 +0100
commit10bf3914d28949a4d6468bdfffc3c5e377393e61 (patch)
treea1a4339eb198ab67b6dd370a2c56ec7f0524447a /scripts
parentd7a03eace06675fef7c0472cc7ebf9649dce4b12 (diff)
downloadOSELAS.Toolchain-10bf3914d28949a4d6468bdfffc3c5e377393e61.tar.gz
OSELAS.Toolchain-10bf3914d28949a4d6468bdfffc3c5e377393e61.tar.xz
make_deb.sh: rework to add dependencies
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/make_deb.sh60
1 files changed, 47 insertions, 13 deletions
diff --git a/scripts/make_deb.sh b/scripts/make_deb.sh
index 32625f4..a744a83 100755
--- a/scripts/make_deb.sh
+++ b/scripts/make_deb.sh
@@ -32,27 +32,61 @@ main() {
rm -rf "${debian_tmp}"
fi
- mkdir -p "${debian_tmp}/DEBIAN"
+ mkdir -p "${debian_tmp}"/{tmp,debian}
- cat <<EOF > "${debian_tmp}/DEBIAN/control"
-Package: ${package}
-Version: ${version}
-Priority: optional
-Architecture: ${arch}
-Essential: no
-Section: devel
+ cat <<EOF > "${debian_tmp}/debian/control"
+Source: oselas.toolchain
Maintainer: Pengutronix <ptxdist@pengutronix.de>
-Description: ${package}
-Origin: pengutronix.de
+Uploaders: $(git config user.name) <$(git config user.email)>
+Section: devel
+Priority: optional
+Origin: pengutronix
Homepage: http://www.pengutronix.de/oselas/toolchain/
Bugs: mailto:bugs@pengutronix.de
+
+Package: ${package}
+Architecture: ${arch}
+Depends: \${shlibs:Depends}
+Description: ${package}
+EOF
+ cat <<EOF > "${debian_tmp}/debian/changelog"
+oselas.toolchain (${version}) unstable; urgency=low
+
+ * New upstream release.
+
+ -- $(git config user.name) <$(git config user.email)> $(date -R)
+EOF
+ cat <<EOF > "${debian_tmp}/debian/compat"
+9
EOF
-#Depends: autoconf, automake, libtool, flex, bison, gcc, g++, python-dev, libncurses5-dev, gawk, pkg-config, make, diff, patch, quilt
# copy data
- tar -C "${destdir}" --exclude=gcc-first -c "${prefix}" | tar -C "${debian_tmp}" -x
+ echo "Copy data..."
+ tar -C "${destdir}" --exclude=gcc-first -c "${prefix}" | tar -C "${debian_tmp}/tmp" -x
+
+ (
+ cd "${debian_tmp}"
+
+ # generate dependencies
+ echo "Generate dependencies..."
+ local sysroot="$(ptxd_get_ptxconf PTXCONF_SYSROOT_TARGET)"
+ sysroot="${debian_tmp}/tmp${sysroot#${PTX_AUTOBUILD_DESTDIR}}"
+ local other="$(ptxd_get_ptxconf PTXCONF_SYSROOT_CROSS)"
+ other="${debian_tmp}/tmp${other#${PTX_AUTOBUILD_DESTDIR}}/$(ptxd_get_ptxconf PTXCONF_GNU_TARGET)"
+
+ fakeroot dh_shlibdeps \
+ -P"${debian_tmp}/tmp" \
+ -l"${sysroot}/lib:${sysroot}/usr/lib:${sysroot}/usr/lib/gconv:${other}/lib" \
+ -- \
+ -T"${debian_tmp}/substvars" &&
+
+ # generate DEBIAN/control
+ dpkg-gencontrol \
+ -P"${debian_tmp}/tmp" \
+ -T"${debian_tmp}/substvars"
+ ) || exit
# make a deb out of it
- echo dpkg-deb --build -Zxz "${debian_tmp}" "${deb}" | fakeroot
+ echo dpkg-deb --build -Zxz "${debian_tmp}/tmp" "${deb}" | fakeroot
rm -rf "${debian_tmp}"
}