Skip to content
Snippets Groups Projects
Commit fe60e9c2 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

port 18d1c2a7a1794c7f63caff35cfc6c2e53e93e3a2 from Pd-l2ork: debuild:...

port 18d1c2a7a1794c7f63caff35cfc6c2e53e93e3a2 from Pd-l2ork: debuild: Auto-detect all submodules in the package
parent e0ba79ed
No related branches found
No related tags found
No related merge requests found
# This is a GNU Makefile. Special tools needed: GNU make and awk, git.
# Make Debian packages. This builds a package from the current HEAD in a # Make Debian packages. This builds a package from the current HEAD in a
# subdirectory named $(debdist). It also creates the source archive that goes # subdirectory named $(debdist). It also creates the source archive that goes
# along with it. All files will be created in the toplevel source directory. # along with it. All files will be created in the debuild directory.
# To make this work, you need to have the Debian package toolchain (debuild # To make this work, you need to have the Debian package toolchain (debuild
# and friends) installed. You should also set the DEBEMAIL environment (or # and friends) installed. You should also set the DEBEMAIL environment (or
...@@ -32,7 +33,7 @@ ...@@ -32,7 +33,7 @@
# and 3. # and 3.
# The Debian version gets derived from the date and serial number of the last # The Debian version gets derived from the date and serial number of the last
# commit. # commit. You can print it with 'make debversion'.
debversion = $(shell git log -1 --format=%cd --date=short | sed -e 's/-//g')+git$(shell git rev-list --count HEAD) debversion = $(shell git log -1 --format=%cd --date=short | sed -e 's/-//g')+git$(shell git rev-list --count HEAD)
# Debian revision number of the package. # Debian revision number of the package.
debrevision = 1 debrevision = 1
...@@ -40,15 +41,19 @@ debrevision = 1 ...@@ -40,15 +41,19 @@ debrevision = 1
debsrc = pd-l2ork_$(debversion).orig.tar.gz debsrc = pd-l2ork_$(debversion).orig.tar.gz
debdist = pd-l2ork-$(debversion) debdist = pd-l2ork-$(debversion)
# Submodules (Gem, etc.). # Submodules (Gem, etc.). You can list them with 'make submodules'.
submodules = Gem externals/miXed $(addprefix l2ork_addons/, cwiid fftease3.0-32bit lyonpotpourri rtcmix-in-pd) #submodules = Gem externals/miXed $(addprefix l2ork_addons/, cwiid fftease3.0-32bit lyonpotpourri rtcmix-in-pd)
submodules = $(sort $(shell git -C .. config --file .gitmodules --get-regexp path | awk '{ print $$2 }'))
# This is used for automatically generated debian/changelog entries (cf. 'make # This is used for automatically generated debian/changelog entries (cf. 'make
# debchange'). Adjust as needed. # debchange'). Adjust as needed.
debmsg = "Build from latest upstream source." debmsg = "Build from latest upstream source."
debprio = "low" debprio = "low"
.PHONY: debversion debchange debclean deb debsrc deb-us debsrc-us .PHONY: submodules debversion debchange debclean deb debsrc deb-us debsrc-us
submodules:
@echo $(submodules)
debversion: debversion:
@echo $(debversion) @echo $(debversion)
...@@ -91,8 +96,7 @@ $(debsrc): ...@@ -91,8 +96,7 @@ $(debsrc):
git -C .. archive --format=tar.gz --prefix=$(debdist)/ HEAD | tar xfz - git -C .. archive --format=tar.gz --prefix=$(debdist)/ HEAD | tar xfz -
# Grab the submodules. # Grab the submodules.
for x in $(submodules); do (cd $(debdist) && rm -rf $$x && git -C ../../$$x archive --format=tar.gz --prefix=$$x/ HEAD | tar xfz -); done for x in $(submodules); do (cd $(debdist) && rm -rf $$x && git -C ../../$$x archive --format=tar.gz --prefix=$$x/ HEAD | tar xfz -); done
# The build script tries to grab this during compilation which doesn't work on # Grab wiringPi. This isn't a submodule yet, so needs to be handled separately.
# Launchpad. Why isn't this a submodule?
git -C $(debdist)/l2ork_addons/raspberry_pi/disis_gpio clone "git://git.drogon.net/wiringPi" git -C $(debdist)/l2ork_addons/raspberry_pi/disis_gpio clone "git://git.drogon.net/wiringPi"
rm -rf $(debdist)/l2ork_addons/raspberry_pi/disis_gpio/wiringPi/.git rm -rf $(debdist)/l2ork_addons/raspberry_pi/disis_gpio/wiringPi/.git
# Create the source tarball. # Create the source tarball.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment