summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRudolf J Streif <rstreif@jaguarlandrover.com>2016-02-19 19:00:24 +0000
committerRudolf J Streif <rstreif@jaguarlandrover.com>2016-02-19 19:00:24 +0000
commitabee27880cb70cbc755a1bba0f5f0721159bfff8 (patch)
treeac5c1ebbdbbf2211588f126059dd382bbba136df /Makefile
parente705de160d54b9a73d7d7d9a18af44bf49d3c730 (diff)
downloadrvi_core-abee27880cb70cbc755a1bba0f5f0721159bfff8.tar.gz
Added template for Raspbian build and packaging
Added raspbian_template directory which contains the Debian build and packaging for Raspbian. Added raspbian_package target to makefile. Signed-off-by: Rudolf J Streif <rstreif@jaguarlandrover.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 1c594cc..72bbb4b 100644
--- a/Makefile
+++ b/Makefile
@@ -71,6 +71,9 @@ ubuntu_clean:
debian_clean:
rm -rf ./debian_build
+raspbian_clean:
+ rm -rf ./raspbian_build
+
rpm_clean:
rm -rf ./rpm/BUILD/* \
./rpm/BUILDROOT/* \
@@ -137,6 +140,28 @@ debian_package: clean debian_clean escript
(cd ./debian_build/rvi-$(VERSION); debuild -uc -us)
+# Create a raspbian package
+raspbian_package: clean raspbian_clean escript
+ install --mode=0755 -d ./raspbian_build
+
+# Pack up all relevant files, and debian/, necessary for a build.
+# Add rvi-$(VERSION) at the beginning of each file so
+# that they get packed up into a correctly named subdirectory
+#
+ tar czf ./raspbian_build/rvi_$(VERSION).orig.tar.gz \
+ --exclude-vcs --transform="s|^|./rvi-$(VERSION)/|" \
+ $(SRC_LIST) \
+ raspbian_template
+ rm -rf raspbian/missing-sources
+# Unpack the created tar file
+ (cd ./raspbian_build; tar xf rvi_$(VERSION).orig.tar.gz)
+# Move the debian template to be the debian package
+ mv ./raspbian_build/rvi-$(VERSION)/raspbian_template ./raspbian_build/rvi-$(VERSION)/debian
+ install -d -m 0755 ./raspbian_build/rvi-$(VERSION)/debian/missing-sources
+# Descend into the unpacked directory and build.
+ (cd ./raspbian_build/rvi-$(VERSION); debuild --prepend-path /usr/local/bin -uc -us)
+
+
rpm: rpmclean rpm_tarball
rpmbuild --define "_topdir $$PWD/rpm" -ba rpm/SPECS/rvi-$(VERSION).spec