summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMagnus Feuer <mfeuer@jaguarllandrover.com>2016-02-01 15:56:28 -0800
committerMagnus Feuer <mfeuer@jaguarllandrover.com>2016-02-01 15:56:28 -0800
commit52e8b1a77a8c19b1fba5b3f9a344e6f90f30e993 (patch)
tree8f09047016f45142834facf7089b2c613d2bfa44 /Makefile
parent713055c80b3a683b1225284512dae3b370bd2410 (diff)
downloadrvi_core-52e8b1a77a8c19b1fba5b3f9a344e6f90f30e993.tar.gz
First stab at debian build
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile36
1 files changed, 32 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 90bfd73..2932bbe 100644
--- a/Makefile
+++ b/Makefile
@@ -69,6 +69,9 @@ clean: rpmclean
ubuntu_clean:
rm -rf ./ubuntu_build
+debian_clean:
+ rm -rf ./debian_build
+
rpm_clean:
rm -rf ./rpm/BUILD/* \
./rpm/BUILDROOT/* \
@@ -92,26 +95,51 @@ rpm_tarball: rpmclean clean
scripts/rvi.service scripts/rvi.sh \
components priv/config/rvi_sample.config scripts/rvi_instball.sh src \
-# Create an ubuntu 14.04 tarball
+# Create an ubuntu package
ubuntu_package: clean ubuntu_clean escript
install --mode=0755 -d ./ubuntu_build
-# Pack up all relevant files, and debian/, necessary for a build.
+# Pack up all relevant files, and ubuntu/, necessary for a build.
# Add rvi-$(VERSION) at the beginning of each file so
# that theu get packed up into a correctly named subdirectory
#
tar czf ./ubuntu_build/rvi_$(VERSION).orig.tar.gz \
--exclude-vcs --transform="s|^|./rvi-$(VERSION)/|" \
$(SRC_LIST) \
- debian \
+ ubuntu_template \
scripts/rvi.init.ubuntu
- rm -rf debian/missing-sources
+ rm -rf ubuntu/missing-sources
# Unpack the created tar file
(cd ./ubuntu_build; tar xf rvi_$(VERSION).orig.tar.gz)
+# Move the ubuntu template to be the debian package
+ mv ./ubuntu_build/rvi-$(VERSION)/ubuntu_template ./ubuntu_build/rvi-$(VERSION)/debian
install -d -m 0755 ./ubuntu_build/rvi-$(VERSION)/debian/missing-sources
# Descend into the unpacked directory and build.
(cd ./ubuntu_build/rvi-$(VERSION); debuild -uc -us)
+# Create a debian package
+debian_package: clean debian_clean escript
+ install --mode=0755 -d ./debian_build
+
+# Pack up all relevant files, and debian/, necessary for a build.
+# Add rvi-$(VERSION) at the beginning of each file so
+# that theu get packed up into a correctly named subdirectory
+#
+ tar czf ./debian_build/rvi_$(VERSION).orig.tar.gz \
+ --exclude-vcs --transform="s|^|./rvi-$(VERSION)/|" \
+ $(SRC_LIST) \
+ debian_template \
+ scripts/rvi.init.debian
+ rm -rf debian/missing-sources
+# Unpack the created tar file
+ (cd ./debian_build; tar xf rvi_$(VERSION).orig.tar.gz)
+# Move the debian template to be the debian package
+ mv ./debian_build/rvi-$(VERSION)/debian_template ./debian_build/rvi-$(VERSION)/debian
+ install -d -m 0755 ./debian_build/rvi-$(VERSION)/debian/missing-sources
+# Descend into the unpacked directory and build.
+ (cd ./debian_build/rvi-$(VERSION); debuild -uc -us)
+
+
rpm: rpmclean rpm_tarball
rpmbuild --define "_topdir $$PWD/rpm" -ba rpm/SPECS/rvi-$(VERSION).spec