diff options
author | Patrick Spek <p.spek@tyil.nl> | 2023-03-10 08:12:10 +0100 |
---|---|---|
committer | Patrick Spek <p.spek@tyil.nl> | 2023-03-10 08:12:10 +0100 |
commit | 082d335fd41f5e951f3383a7bf5dfdbfdc8a93e4 (patch) | |
tree | f4d0abdb78c01cd8d9a3e51daa9511134cfd79bd | |
parent | 5a3a5e2778c33031c42088fcddd4b5b2eb960bd2 (diff) |
Redo pkg-debian target
-rw-r--r-- | Makefile | 27 | ||||
-rw-r--r-- | etc/debian/control | 26 |
2 files changed, 15 insertions, 38 deletions
@@ -1,6 +1,6 @@ #!/usr/bin/env make -# SPDX-FileCopyrightText: 2022 Patrick Spek <p.spek@tyil.nl> +# SPDX-FileCopyrightText: 2023 Patrick Spek <p.spek@tyil.nl> # # 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 <p.spek+debian@tyil.nl> -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 |