aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile28
1 files changed, 13 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index 3b48980..adaa8a4 100644
--- a/Makefile
+++ b/Makefile
@@ -48,27 +48,25 @@ man:
scdoc < share/doc/playbooks.d.7.scd | gzip -cn9 > "$(PREFIX)$(DESTDIR)/share/man/man7/playbooks.d.7.gz"
pkg-debian:
+ # Create the directories to work with
mkdir -pv "$(PKG_ROOT)"
- # Install package
- $(MAKE) PREFIX="$(PKG_ROOT)" install
- $(MAKE) PREFIX="$(PKG_ROOT)" man
+ # 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)"
- # Apply Debian stuff
- mkdir -pv "$(PKG_ROOT)/DEBIAN"
- sed \
- -e 's/%VERSION%/$(PKG_VERSION)/g' \
- etc/debian/control > "$(PKG_ROOT)/DEBIAN/control"
- mkdir -pv "$(PKG_ROOT)/usr/share/doc/bashtard"
- gzip -cn9 < CHANGELOG.md > "$(PKG_ROOT)/usr/share/doc/bashtard/changelog.gz"
- cp -rv LICENSES/AGPL-3.0-or-later.txt "$(PKG_ROOT)/usr/share/doc/bashtard/copyright"
- find "$(PKG_ROOT)" -iname "*.bash" -type f -exec chmod +x {} \;
+ # Move Debian packaging info
+ mv -v "$(PKG_ROOT)/etc/debian" "$(PKG_ROOT)/debian"
+
+ # Make all Bash files +x to please Lintian
+ find "$(PKG_ROOT)" -iname "*.bash" -exec chmod +x {} \;
- # Build Debian package
- cd "$(PKG_WORKDIR)" && dpkg --build "bashtard-$(PKG_VERSION)"
+ # 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).deb"
+ lintian --no-tag-display-limit "$(PKG_WORKDIR)/bashtard_$(PKG_VERSION)-1_amd64.deb"
qa:
reuse lint