Control: tags -1 patch

Niels,

Thanks for this.

I already have the attached commit which changes ucf to use dh for installing
the package binaries rather than ./Makefile. With this, it builds OK with
'Rules-Requires-Root: no'.

It should be included in the next upload.

Thanks

Mark
diff --git a/Makefile b/Makefile
index b23449e..3c7dc5b 100644
--- a/Makefile
+++ b/Makefile
@@ -2,20 +2,6 @@ prefix    = $(DESTDIR)
 package   = ucf
 version   = $(shell dpkg-parsechangelog -Sversion)
 
-ETCDIR    = $(prefix)/etc
-BINDIR    = $(prefix)/usr/bin
-USHAREDIR = $(prefix)/usr/share/$(package)
-DEBLIBDIR = $(prefix)/var/lib/$(package)
-DEBDOCDIR = $(prefix)/usr/share/doc/$(package)
-MANDIR    = $(prefix)/usr/share/man/
-MAN1DIR   = $(MANDIR)/man1
-MAN5DIR   = $(MANDIR)/man5
-
-# install commands
-install_file    := /usr/bin/install -p    -o root -g root -m 644
-install_program := /usr/bin/install -p    -o root -g root -m 755
-make_directory  := /usr/bin/install -p -d -o root -g root -m 755
-
 all: build check
 
 build: man/ucfq.1
@@ -43,33 +29,5 @@ shellcheck:
 
 	shellcheck  --external-sources --exclude 3043,2317,2004 ucf ucfr
 
-install:
-	$(make_directory)   $(BINDIR)
-	$(make_directory)   $(ETCDIR)
-	$(make_directory)   $(MAN1DIR)
-	$(make_directory)   $(MAN5DIR)
-	$(make_directory)   $(DEBLIBDIR)
-	$(make_directory)   $(USHAREDIR)
-	$(make_directory)   $(DEBDOCDIR)/examples
-	$(install_program)  ucf               $(BINDIR)
-	$(install_file)     man/ucf.1             $(MAN1DIR)
-	gzip -9fq           $(MAN1DIR)/ucf.1
-	$(install_program)  ucfr              $(BINDIR)
-	$(install_file)     man/ucfr.1            $(MAN1DIR)
-	gzip -9fq           $(MAN1DIR)/ucfr.1
-	$(install_program)  ucfq              $(BINDIR)
-	$(install_file)     man/ucfq.1            $(MAN1DIR)
-	gzip -9fq           $(MAN1DIR)/ucfq.1
-	$(install_file)     man/ucf.conf.5        $(MAN5DIR)
-	gzip -9fq           $(MAN5DIR)/ucf.conf.5
-	$(install_file)     ucf_library.sh    $(USHAREDIR)
-	$(install_file)     ucf.conf          $(ETCDIR)
-	$(install_file)     debian/changelog  $(DEBDOCDIR)/changelog
-	gzip -9frq          $(DEBDOCDIR)
-# make sure the copyright file is not compressed
-	$(install_file)     debian/copyright  $(DEBDOCDIR)/copyright
-	$(install_file)     examples/postinst $(DEBDOCDIR)/examples/
-	$(install_file)     examples/postrm   $(DEBDOCDIR)/examples/
-
 clean distclean:
 	rm -f man/ucfq.1
diff --git a/debian/ucf.docs b/debian/ucf.docs
new file mode 100644
index 0000000..1e107f5
--- /dev/null
+++ b/debian/ucf.docs
@@ -0,0 +1 @@
+examples
diff --git a/debian/ucf.install b/debian/ucf.install
new file mode 100644
index 0000000..c47649a
--- /dev/null
+++ b/debian/ucf.install
@@ -0,0 +1,5 @@
+ucf		/usr/bin
+ucfr            /usr/bin
+ucfq            /usr/bin
+ucf_library.sh  /usr/share/ucf
+ucf.conf        /etc
diff --git a/debian/ucf.manpages b/debian/ucf.manpages
new file mode 100644
index 0000000..28b5bd7
--- /dev/null
+++ b/debian/ucf.manpages
@@ -0,0 +1,4 @@
+man/ucf.1
+man/ucfr.1
+man/ucfq.1
+man/ucf.conf.5

Reply via email to