From 082d335fd41f5e951f3383a7bf5dfdbfdc8a93e4 Mon Sep 17 00:00:00 2001 From: Patrick Spek Date: Fri, 10 Mar 2023 08:12:10 +0100 Subject: Redo pkg-debian target --- Makefile | 27 +++++++++++---------------- etc/debian/control | 26 ++++---------------------- 2 files changed, 15 insertions(+), 38 deletions(-) diff --git a/Makefile b/Makefile index adaa8a4..d63e3d7 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ #!/usr/bin/env make -# SPDX-FileCopyrightText: 2022 Patrick Spek +# SPDX-FileCopyrightText: 2023 Patrick Spek # # SPDX-License-Identifier: AGPL-3.0-or-later @@ -49,24 +49,19 @@ man: pkg-debian: # Create the directories to work with - mkdir -pv "$(PKG_ROOT)" + mkdir -pv -- "$(PKG_ROOT)/usr" - # Create an original, and use it for building - tar czf "$(PKG_WORKDIR)/bashtard_$(PKG_VERSION).orig.tar.gz" . - cd "$(PKG_WORKDIR)" && tar xzf "bashtard_$(PKG_VERSION).orig.tar.gz" -C "$(PKG_ROOT)" + # Install into the workdir + $(MAKE) PREFIX="$(PKG_ROOT)" install + $(MAKE) PREFIX="$(PKG_ROOT)" man - # Move Debian packaging info - mv -v "$(PKG_ROOT)/etc/debian" "$(PKG_ROOT)/debian" + # Copy Debian's control file + mkdir -pv -- "$(PKG_ROOT)/DEBIAN" + cp -v -- ./etc/debian/control "$(PKG_ROOT)/DEBIAN/control" - # Make all Bash files +x to please Lintian - find "$(PKG_ROOT)" -iname "*.bash" -exec chmod +x {} \; - - # Build the Debian package - cd "$(PKG_ROOT)" && dpkg-source --build . - cd "$(PKG_ROOT)" && dpkg-buildpackage - - # TODO: Remove lintian, that's a manual step - lintian --no-tag-display-limit "$(PKG_WORKDIR)/bashtard_$(PKG_VERSION)-1_amd64.deb" + # Generate the .deb file + mkdir -pv -- "dist" + dpkg-deb -b "$(PKG_ROOT)" "dist/bashtard-$(PKG_VERSION).deb" qa: reuse lint diff --git a/etc/debian/control b/etc/debian/control index 1358461..44785a3 100644 --- a/etc/debian/control +++ b/etc/debian/control @@ -1,23 +1,5 @@ -Source: bashtard -Section: admin -Priority: optional -Maintainer: Patrick Spek -Build-Depends: debhelper-compat (= 13) -Build-Depends-Indep: scdoc -Standards-Version: 4.5.1 -Homepage: https://git.tyil.nl/bashtard -Rules-Requires-Root: no - Package: bashtard -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Description: Simple configuration management in Bash - Bashtard is a configuration management system built on the idea of simplicity - for the user. It lets you write reasonably simple Bash scripts to configure - your systems, while providing just enough abstractions to make it easy to - work with various base systems. - It is similar in purpose as other configuration management tools, such as - Ansible and Puppet, however Bashtard tries to keep dependencies to a minimum - while still providing some abstractions to make the process easier. This - allows Bashtard to run in more constrained environments, with the abstractions - allowing it to manage a varied array of systems in a single network. +Version: 1.0 +Architecture: all +Maintainer: p.spek@tyil.nl +Description: Configuration Management System in Bash -- cgit v1.1