From f7d82f008f33d877e61bbcf6951d95c438595df5 Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Mon, 30 Sep 2024 23:29:21 +0200 Subject: [PATCH] Makefile: fix a bug with making deb (segfault) and adding proper licensing notice This commit fixes a bug with making the deb package, that produced while executing apt install : # apt install ./debian/tyto.deb Segmentation faultsts... 0% Also with dpkg : # dpkg -i ./debian/tyto.deb dpkg: error processing archive ./debian/tyto.deb (--install): unable to open file '/var/lib/dpkg/tmp.ci//debian': Is a directory Errors were encountered while processing: ./debian/tyto.deb This bug was caused by a malformed tar construction. --- Makefile | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 2482287..c6421da 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,23 @@ #!/bin/bash +# +# Copyright (C) 2023-2024 Adrien Bourmault +# +# This file is part of tyto-litterateur. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . -# file: Makefile - -# By neox - -# License: GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 - -default: debian/tyto.deb +default: tyto.deb ### MAKE DEB @@ -14,14 +25,14 @@ default: debian/tyto.deb .PHONY: clean -debian/tyto.deb: debian/debian-binary debian/control.tar.gz debian/data.tar.gz - ar -r debian/tyto.deb debian/debian-binary debian/control.tar.gz debian/data.tar.gz +tyto.deb: debian/debian-binary debian/control.tar.gz debian/data.tar.gz + cd debian && ar -r ../tyto.deb debian-binary control.tar.gz data.tar.gz debian/data.tar.gz: cd src && tar czvf ../debian/data.tar.gz usr var debian/control.tar.gz: - tar czvf debian/control.tar.gz debian/control #preinst postinst prerm postrm + cd debian && tar czvf control.tar.gz control #preinst postinst prerm postrm debian/debian-binary: echo 2.0 > debian/debian-binary @@ -29,4 +40,4 @@ debian/debian-binary: clean: -rm debian/*.tar.gz -rm debian/debian-binary - -rm debian/*.deb + -rm *.deb