aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPatrick Spek <p.spek@tyil.nl>2023-03-10 08:12:10 +0100
committerPatrick Spek <p.spek@tyil.nl>2023-03-10 08:12:10 +0100
commit082d335fd41f5e951f3383a7bf5dfdbfdc8a93e4 (patch)
treef4d0abdb78c01cd8d9a3e51daa9511134cfd79bd /Makefile
parent5a3a5e2778c33031c42088fcddd4b5b2eb960bd2 (diff)
Redo pkg-debian target
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 11 insertions, 16 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 <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