himdel / hsetroot

yet another wallpaper application
GNU General Public License v2.0
123 stars 21 forks source link

Support installing with DESTDIR #33

Closed toniz4 closed 3 years ago

toniz4 commented 3 years ago

Many packaging systems rely on it, and it's convenient. Here is a patch

diff --git a/Makefile b/Makefile
index a1217d9..59be4f2 100644
--- a/Makefile
+++ b/Makefile
@@ -34,8 +34,9 @@ hsetroot: hsetroot.o
 hsr-outputs: hsr-outputs.o

 install: hsetroot hsr-outputs
-   install -st $(PREFIX)/bin/ hsetroot
-   install -st $(PREFIX)/bin/ hsr-outputs
+   install -d $(DESTDIR)$(PREFIX)/bin
+   install -st $(DESTDIR)$(PREFIX)/bin/ hsetroot
+   install -st $(DESTDIR)$(PREFIX)/bin/ hsr-outputs

 clean:
    rm -f *.o hsetroot hsr-outputs

Now it can be installed like make DESTDIR=/tmp/build install for ease of packaging, and to make it possible to write a ebuild with it.

himdel commented 3 years ago

How is this different from make PREFIX=/tmp/build install?

I don't think we need 2 ways of doing that.

toniz4 commented 3 years ago

Sure, i overlooked that