Signed-off-by: Stefan Schantl stefan.schantl@ipfire.org --- Makefile.am | 17 +++++++++++++++-- Readme.debian | 21 +++++++++++++++++++++ dist/debian-build-script.sh | 15 +++++++++++++++ 3 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 Readme.debian create mode 100755 dist/debian-build-script.sh
diff --git a/Makefile.am b/Makefile.am index 5922770..ee1c36f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -429,10 +429,23 @@ upload-man: $(MANPAGES_HTML) $(DEBIAN_TARBALL_NAME): dist cp -v $(distdir).tar.xz $@
-.PHONY: debian -debian: $(DEBIAN_TARBALL_NAME) +.PHONY: debian-prepare +debian-prepare: $(DEBIAN_TARBALL_NAME) mkdir -pv debian-build/$(PACKAGE_NAME)-$(PACKAGE_VERSION)/debian cp -avf $(DEBIAN_TARBALL_NAME) debian-build cp -avf debian/* debian-build/$(PACKAGE_NAME)-$(PACKAGE_VERSION)/debian cd debian-build && tar -xvf $(DEBIAN_TARBALL_NAME) + +.PHONY: debian +debian: debian-prepare cd debian-build/$(PACKAGE_NAME)-$(PACKAGE_VERSION) && debuild -us -uc + +.PHONY: debian-all +debian-all: debian-prepare + cd debian-build/$(PACKAGE_NAME)-$(PACKAGE_VERSION) && ../../dist/debian-build-script.sh + +.PHONY: debian-clean-all +debian-clean-all: + if [ -d debian-build ] ; then \ + rm -rvf debian-build ; \ + fi; diff --git a/Readme.debian b/Readme.debian new file mode 100644 index 0000000..1c10928 --- /dev/null +++ b/Readme.debian @@ -0,0 +1,21 @@ +In order to build libloc for debian the following tools are required. + +* In case you want to create packages for the current running machine + "debbuild" is required. + + Type "make debian" to start the build process. + +* If you want to build libloc for several different architectures + "sbuild" is required and needs to be configured. + + Please refer to "https://wiki.debian.org/sbuild" to get more details + how to install and setup this tool. + + It is strongly recomended to use the apt-cache-ng tool, when building + to avoid downloading the required packages several times and to speed-up + the entire build process. + + The details for which distribution and architecture can be adjusted by + editing the "dist/debian-build-script.sh" file. + + Afterwards the build can be launched with "make debian-all". diff --git a/dist/debian-build-script.sh b/dist/debian-build-script.sh new file mode 100755 index 0000000..d8e99bc --- /dev/null +++ b/dist/debian-build-script.sh @@ -0,0 +1,15 @@ + +ARCHITECTURES=( amd64 arm64 i386 armhf riscv64 ) +DISTRIBUTIONS=( buster ) + +# Loop through the array of distributions. +for distribution in "${DISTRIBUTIONS[@]}" +do + : + # Loop through the array of architectures. + for arch in "${ARCHITECTURES[@]}" + do + : + sbuild -d "$distribution" --host=$arch + done +done