From: Chris Hofstaedtler <zeha@debian.org>
Date: Wed, 26 Feb 2025 18:59:52 +0100
Subject: Install icmd, qcmd into /usr/libexec/renameutils
Bug-Debian: https://bugs.debian.org/1076220

---
 src/Makefile.am | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 6cd9d08..e1f1310 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,7 +5,10 @@ AM_CPPFLAGS = \
   -I$(top_builddir)/gnulib-lib
 AM_CFLAGS = -Wall
 
-bin_PROGRAMS = qcmd icmd deurlname
+privatebindir = ${prefix}/libexec/renameutils
+
+bin_PROGRAMS = deurlname
+privatebin_PROGRAMS = qcmd icmd
 man_MANS = qcmd.1 icmd.1 deurlname.1
 EXTRA_DIST = $(man_MANS)
 
@@ -49,11 +52,12 @@ all-local:
 	@[ -f icp ] || (echo $(LN_S) icmd icp ; $(LN_S) icmd icp)
 
 install-exec-local:
+	$(mkdir_p) $(DESTDIR)/usr/libexec/renameutils
 	$(mkdir_p) $(DESTDIR)$(bindir)
-	@[ -f $(DESTDIR)$(bindir)/qmv ] || (echo $(LN_S) qcmd $(DESTDIR)$(bindir)/qmv ; $(LN_S) qcmd $(DESTDIR)$(bindir)/qmv)
-	@[ -f $(DESTDIR)$(bindir)/qcp ] || (echo $(LN_S) qcmd $(DESTDIR)$(bindir)/qcp ; $(LN_S) qcmd $(DESTDIR)$(bindir)/qcp)
-	@[ -f $(DESTDIR)$(bindir)/imv ] || (echo $(LN_S) icmd $(DESTDIR)$(bindir)/imv ; $(LN_S) icmd $(DESTDIR)$(bindir)/imv)
-	@[ -f $(DESTDIR)$(bindir)/icp ] || (echo $(LN_S) icmd $(DESTDIR)$(bindir)/icp ; $(LN_S) icmd $(DESTDIR)$(bindir)/icp)
+	@[ -f $(DESTDIR)$(bindir)/qmv ] || (echo $(LN_S) /usr/libexec/renameutils/qcmd $(DESTDIR)$(bindir)/qmv ; $(LN_S) /usr/libexec/renameutils/qcmd $(DESTDIR)$(bindir)/qmv)
+	@[ -f $(DESTDIR)$(bindir)/qcp ] || (echo $(LN_S) /usr/libexec/renameutils/qcmd $(DESTDIR)$(bindir)/qcp ; $(LN_S) /usr/libexec/renameutils/qcmd $(DESTDIR)$(bindir)/qcp)
+	@[ -f $(DESTDIR)$(bindir)/imv ] || (echo $(LN_S) /usr/libexec/renameutils/icmd $(DESTDIR)$(bindir)/imv ; $(LN_S) /usr/libexec/renameutils/icmd $(DESTDIR)$(bindir)/imv)
+	@[ -f $(DESTDIR)$(bindir)/icp ] || (echo $(LN_S) /usr/libexec/renameutils/icmd $(DESTDIR)$(bindir)/icp ; $(LN_S) /usr/libexec/renameutils/icmd $(DESTDIR)$(bindir)/icp)
 
 install-data-local:
 	$(mkdir_p) $(DESTDIR)$(man1dir)
