aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichał Łyszczek <michal.lyszczek@bofc.pl>2017-12-25 21:56:43 +0100
committerMichał Łyszczek <michal.lyszczek@bofc.pl>2017-12-25 21:56:43 +0100
commitd2e7e07e4419b3e64b83a3837b855f132cfbc00e (patch)
tree4960fe37e379ee1b507ba40de96849ef5348e1e3
parent4f5fc6e472d6623bd2aadd0c954d9c5e83ee3864 (diff)
downloadbuilder-tc-d2e7e07e4419b3e64b83a3837b855f132cfbc00e.tar.gz
builder-tc-d2e7e07e4419b3e64b83a3837b855f132cfbc00e.tar.bz2
builder-tc-d2e7e07e4419b3e64b83a3837b855f132cfbc00e.zip
Added script to create opkg package
-rw-r--r--Makefile2
-rw-r--r--control.template11
-rwxr-xr-xcreate-package.sh27
3 files changed, 40 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 444f139..0a600ea 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,8 @@ unexport LD_LIBRARY_PATH
all:
ct-ng build
+ ./fix-toolchain-paths.sh
+ ./create-package.sh
nconfig:
ct-ng nconfig
diff --git a/control.template b/control.template
new file mode 100644
index 0000000..d7a1e6a
--- /dev/null
+++ b/control.template
@@ -0,0 +1,11 @@
+Package: native-toolchain
+Version: 6.4.0
+Description: gcc and library family to build software on host
+Section: extras
+Priority: optional
+Maintainer: Michał Łyszczek
+License: gpl2
+Architecture: ${ARCH}
+Homepage: kurwinet.pl
+Depends:
+Source: N/A
diff --git a/create-package.sh b/create-package.sh
new file mode 100755
index 0000000..f92cce4
--- /dev/null
+++ b/create-package.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+umask 022
+
+arch=`grep CT_HOST=\" .config | cut -f2 -d\" | cut -f1 -d-`
+tc_path=`grep CT_PREFIX_DIR=\" .config | cut -f2 -d\"`
+tc_type=`grep CT_TOOLCHAIN_TYPE=\" .config | cut -f2 -d\"`
+
+if [ "$tc_type" != "canadian" ]
+then
+ echo "pacakge can be created only for canadian builds, this is ${tc_type} build"
+ exit 0
+fi
+
+rm -rf tmp
+mkdir tmp
+mkdir tmp/CONTROL
+mkdir tmp/usr
+
+cp -r ${tc_path} tmp/usr/native-toolchain
+chmod a+rX -R tmp/usr/native-toolchain
+cp control.template tmp/CONTROL/control
+sed -i "s/\${ARCH}/${arch}/g" tmp/CONTROL/control
+
+opkg-build -O -o root -g root tmp .
+
+rm -rf tmp