diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 27 |
1 files changed, 11 insertions, 16 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 |