Niels Thykier:
Christian T. Steigies:
[...]

For this one, I think you could add:

   data/* usr/share/games/bugsquish/
   bugsquish usr/bin

to debian/bugsquish.install to replace the upstream `install` target. The `dh_fixperms` (etc.) will handle the rest from there. Admittedly, the installdoc variable needs some tweaking too.

Alternatively, one could patch the upstream makefile to make the owner + group variables. In that case, debian/rules could use `$$(id -u)` for the user and `$$(id -g)` for the group. I have used that trick in another package (where there was already Makefile variable for the user/ group).

I can try to make a patch for the former.


Best regards,
Niels


Indeed. It turned out to be quite easy. Please see attached.

A debdiff between the archive version and the locally built patched version shows they have the same files (incl. mode and ownership).

Best regards,
Niels

diff -Nru bugsquish-0.0.6/debian/bugsquish.install 
bugsquish-0.0.6/debian/bugsquish.install
--- bugsquish-0.0.6/debian/bugsquish.install    1970-01-01 01:00:00.000000000 
+0100
+++ bugsquish-0.0.6/debian/bugsquish.install    2024-12-31 15:14:57.000000000 
+0100
@@ -0,0 +1,2 @@
+data/* usr/share/games/bugsquish/
+bugsquish usr/games
diff -Nru bugsquish-0.0.6/debian/changelog bugsquish-0.0.6/debian/changelog
--- bugsquish-0.0.6/debian/changelog    2023-01-08 18:23:57.000000000 +0100
+++ bugsquish-0.0.6/debian/changelog    2024-12-31 15:14:57.000000000 +0100
@@ -1,3 +1,11 @@
+bugsquish (0.0.6-10.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Remove need for root when building the package.
+    (Closes: #1089301)
+
+ -- Niels Thykier <ni...@thykier.net>  Tue, 31 Dec 2024 14:14:57 +0000
+
 bugsquish (0.0.6-10) unstable; urgency=medium
 
   * update watch file
diff -Nru bugsquish-0.0.6/debian/control bugsquish-0.0.6/debian/control
--- bugsquish-0.0.6/debian/control      2023-01-08 18:17:08.000000000 +0100
+++ bugsquish-0.0.6/debian/control      2024-12-31 15:14:57.000000000 +0100
@@ -6,6 +6,7 @@
                libsdl-image1.2-dev,
                libsdl-mixer1.2-dev,
                libsdl1.2-dev
+Rules-Requires-Root: no
 Standards-Version: 4.6.2
 Vcs-Browser: https://salsa.debian.org/debian/bugsquish
 Vcs-Git: https://salsa.debian.org/debian/bugsquish.git
diff -Nru bugsquish-0.0.6/debian/rules bugsquish-0.0.6/debian/rules
--- bugsquish-0.0.6/debian/rules        2023-01-08 18:12:20.000000000 +0100
+++ bugsquish-0.0.6/debian/rules        2024-12-31 15:14:57.000000000 +0100
@@ -2,7 +2,7 @@
 # Sample debian/rules that uses debhelper.
 # GNU copyright 1997 to 1999 by Joey Hess.
 
-installdoc = install -g root -o root -m 644
+installdoc = install -m 644
 
 TARGET=bugsquish
 
@@ -54,12 +54,7 @@
        dh_prep
        dh_installdirs
 
-       # Add here commands to install the package into debian/tmp.
-       $(MAKE) install \
-        DESTDIR=$(CURDIR)/debian/$(TARGET) \
-        BIN_PREFIX=$(CURDIR)/debian/$(TARGET)/usr/games \
-        MAN_PREFIX=$(CURDIR)/debian/$(TARGET)/usr/share \
-        DATA_PREFIX=$(CURDIR)/debian/$(TARGET)/usr/share/games/$(TARGET)/
+       dh_install
 # remove data for embedded
        -rm -rf $(CURDIR)/debian/$(TARGET)/usr/share/games/$(TARGET)/embedded
 # convert the icon... cmap.xpm is gone, this is not required anymore?

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to