From patchwork Tue May 12 11:50:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schantl X-Patchwork-Id: 3071 Return-Path: Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by web04.haj.ipfire.org (Postfix) with ESMTPS id 49Lx2g2Sv2z3xQr for ; Tue, 12 May 2020 11:50:51 +0000 (UTC) Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail02.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail01.ipfire.org (Postfix) with ESMTPS id 49Lx2f706Hz24X; Tue, 12 May 2020 11:50:50 +0000 (UTC) Received: from mail02.haj.ipfire.org (localhost [127.0.0.1]) by mail02.haj.ipfire.org (Postfix) with ESMTP id 49Lx2f45Fhz2x9V; Tue, 12 May 2020 11:50:50 +0000 (UTC) Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "mail01.haj.ipfire.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mail02.haj.ipfire.org (Postfix) with ESMTPS id 49Lx2d0KpBz2yHP; Tue, 12 May 2020 11:50:49 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) by mail01.ipfire.org (Postfix) with ESMTPSA id 49Lx2b6mNnz11h; Tue, 12 May 2020 11:50:47 +0000 (UTC) DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003ed25519; t=1589284248; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=I5DemcBs6FnmaB89BPQLjVQzcCuU84u3ipMvJ2kO8vk=; b=KlrJv99al4vnPipdRW4ImDw37X83Jq8AiJHHyGFzp/RDTX0DhbjsfwMK1sEtWfWTkFEf5F lbH3TEE6Tttcv3Dg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ipfire.org; s=202003rsa; t=1589284248; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=I5DemcBs6FnmaB89BPQLjVQzcCuU84u3ipMvJ2kO8vk=; b=LvjmNACA6E16T9U68tqbqq4562qNCsZOHynLcXDMzBD+fXCEO6GKREC09CmhtlUbkPDarK NtudVP8Rf9mvGH9RgH1fADwZ3PqRqd5vwvCsZOa1+cFPFGstKoN7MEmUpugeKB/wFcq8K+ 2mSfZyEbe+WM7skjpJa4HHKpumvJQmA8fiCmJ+Pt1k2hAJy8+DPyP0e8Xm4kBFydjFzgbM PTKB7i08OzNM0umPb2GqTkyAQZof+MXbaIAwnnA+XaqqkBLqaW0lg7/eK0MxzIRWTasKkH jC4Drw+ypsYuNn2SRrlO8B8UVwpO35rf4AILmB0J7hXMnG4yf5AoAKxVsVakkw== From: Stefan Schantl To: location@lists.ipfire.org Subject: [PATCH] Debian: Rework package creation. Date: Tue, 12 May 2020 13:50:43 +0200 Message-Id: <20200512115043.97137-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 X-BeenThere: location@lists.ipfire.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: development@lists.ipfire.org Errors-To: location-bounces@lists.ipfire.org Sender: "Location" Authentication-Results: mail01.ipfire.org; none X-Rspamd-Queue-Id: 49Lx2f706Hz24X X-Spamd-Result: default: False [0.69 / 11.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; FROM_HAS_DN(0.00)[]; R_MISSING_CHARSET(2.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; HAS_LIST_UNSUB(-0.01)[]; RCVD_COUNT_THREE(0.00)[4]; RCPT_COUNT_TWO(0.00)[2]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM(-1.00)[-1.002]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; FROM_NEQ_ENVFROM(0.00)[stefan.schantl@ipfire.org,location-bounces@lists.ipfire.org]; BAYES_HAM(-3.00)[99.99%] X-Rspamd-Server: mail01.haj.ipfire.org Signed-off-by: Stefan Schantl --- 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