pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

munge: Configure CONF_FILES without hacking build system



Module Name:	pkgsrc-wip
Committed By:	Jason W Bacon <bacon%NetBSD.org@localhost>
Pushed By:	outpaddling
Date:		Wed Dec 23 09:05:39 2020 -0600
Changeset:	4ce55511f0b147071fb7971fe8283768097261f3

Modified Files:
	munge/Makefile
	munge/PLIST
	munge/PLIST.Linux
	munge/distinfo
	munge/patches/patch-src_etc_Makefile.in

Log Message:
munge: Configure CONF_FILES without hacking build system

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=4ce55511f0b147071fb7971fe8283768097261f3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 munge/Makefile                          | 16 +++++++++-----
 munge/PLIST                             |  1 +
 munge/PLIST.Linux                       |  4 ++--
 munge/distinfo                          |  4 ++--
 munge/patches/patch-src_etc_Makefile.in | 38 +--------------------------------
 5 files changed, 17 insertions(+), 46 deletions(-)

diffs:
diff --git a/munge/Makefile b/munge/Makefile
index 37c936f919..c0e9c5ecf7 100644
--- a/munge/Makefile
+++ b/munge/Makefile
@@ -38,12 +38,18 @@ SUBST_FILES.systemd=	src/etc/munge.systemd.service.in
 SUBST_SED.systemd=	-e 's|User=munge|User=daemon|g'
 SUBST_SED.systemd+=	-e 's|Group=munge|Group=daemon|g'
 
-# FIXME: Patch to use etc/munge.systemd.sysconfig and in place of
-# etc/sysconfig/munge and etc/munge.logrotate.conf in place of
-# etc/logrotate.d/munge
 EGDIR=			${PREFIX}/share/examples/munge
-CONF_FILES=		${EGDIR}/munge.systemd.sysconfig ${PKG_SYSCONFDIR}/munge.systemd.sysconfig
-CONF_FILES+=		${EGDIR}/munge.logrotate.conf ${PKG_SYSCONFDIR}/munge.logrotate.conf
+PKG_SYSCONFSUBDIR=	sysconfig
+CONF_FILES=		${EGDIR}/systemd.sysconfig ${PKG_SYSCONFDIR}/munge
+CONF_FILES+=		${EGDIR}/logrotate.conf ${PREFIX}/etc/logrotate.d/munge
+
+INSTALLATION_DIRS+=	${EGDIR} etc/logrotate.d
+
+post-install:
+	${MV} ${DESTDIR}${PREFIX}/etc/logrotate.d/munge \
+		${DESTDIR}${PREFIX}/share/examples/munge/logrotate.conf
+	${MV} ${DESTDIR}${PREFIX}/etc/sysconfig/munge \
+		${DESTDIR}${PREFIX}/share/examples/munge/systemd.sysconfig
 
 .include "../../archivers/bzip2/buildlink3.mk"
 .include "../../devel/zlib/buildlink3.mk"
diff --git a/munge/PLIST b/munge/PLIST
index cbb506b6bd..e31db05466 100644
--- a/munge/PLIST
+++ b/munge/PLIST
@@ -28,6 +28,7 @@ man/man8/munged.8
 man/man8/mungekey.8
 sbin/munged
 sbin/mungekey
+@pkgdir etc/logrotate.d
 @pkgdir var/run/munge
 @pkgdir var/log/munge
 @pkgdir var/lib/munge
diff --git a/munge/PLIST.Linux b/munge/PLIST.Linux
index 5d4e2ae8fa..2261854946 100644
--- a/munge/PLIST.Linux
+++ b/munge/PLIST.Linux
@@ -1,4 +1,4 @@
 @comment $NetBSD: PLIST.Linux,v 1.4 2018/03/24 18:05:58 bacon Exp $
 lib/systemd/system/munge.service
-share/examples/munge/munge.logrotate.conf
-share/examples/munge/munge.systemd.sysconfig
+share/examples/munge/logrotate.conf
+share/examples/munge/systemd.sysconfig
diff --git a/munge/distinfo b/munge/distinfo
index 8e4422488f..711f93c641 100644
--- a/munge/distinfo
+++ b/munge/distinfo
@@ -1,7 +1,7 @@
-$NetBSD: distinfo,v 1.6 2018/03/24 18:05:58 bacon Exp $
+$NetBSD$
 
 SHA1 (munge-0.5.14.tar.xz) = 7c11df405bbbb5fcdaece771488ffab3a94ddf20
 RMD160 (munge-0.5.14.tar.xz) = 787fcc12744476616849e4c05351407f308bbe51
 SHA512 (munge-0.5.14.tar.xz) = 742c9f2c1cf9f5b070f91fc6b9e74c5f2712c385bce6820c400e884fb6d78f86dea7ebe8e3918d056bf72e746a6af5481a1a8d9f0834a28836da90a42b4eb166
 Size (munge-0.5.14.tar.xz) = 439776 bytes
-SHA1 (patch-src_etc_Makefile.in) = 982d71a405f07b46eabbd35a1cf3f98f4f97dbc7
+SHA1 (patch-src_etc_Makefile.in) = e4fafc069a162371a6f0f76db94e4590c22f52c7
diff --git a/munge/patches/patch-src_etc_Makefile.in b/munge/patches/patch-src_etc_Makefile.in
index a6a1778d33..dc54b8ec29 100644
--- a/munge/patches/patch-src_etc_Makefile.in
+++ b/munge/patches/patch-src_etc_Makefile.in
@@ -3,7 +3,6 @@ $NetBSD$
 # pkgsrc hierarchy
 
 --- src/etc/Makefile.in.orig	2020-02-01 00:21:19.726062417 +0000
---- src/etc/Makefile.in.orig	2020-01-14 20:44:31.000000000 +0000
 +++ src/etc/Makefile.in
 @@ -286,6 +286,7 @@ sbindir = @sbindir@
  sharedstatedir = @sharedstatedir@
@@ -13,7 +12,7 @@ $NetBSD$
  sysconfigdir = @sysconfigdir@
  systemdunitdir = @systemdunitdir@
  sysvinitddir = @sysvinitddir@
-@@ -598,25 +599,25 @@ install-data-hook: install-dirs install-
+@@ -598,13 +599,13 @@ install-data-hook: install-dirs install-
  uninstall-local: uninstall-dirs uninstall-logrotate uninstall-pkgconfig uninstall-systemd uninstall-sysvinit
  
  install-dirs:
@@ -29,38 +28,3 @@ $NetBSD$
  	rmdir '$(DESTDIR)$(localstatedir)/lib/munge' 2>/dev/null || :
  	rmdir '$(DESTDIR)$(localstatedir)/log/munge' 2>/dev/null || :
  	rmdir '$(DESTDIR)$(runstatedir)/munge' 2>/dev/null || :
- 
- install-logrotate: munge.logrotate.conf
- 	@if test 'x$(logrotateddir)' != x; then \
--	  echo $(MKDIR_P) "'$(DESTDIR)$(logrotateddir)'"; \
--	  $(MKDIR_P) '$(DESTDIR)$(logrotateddir)'; \
-+	  echo $(MKDIR_P) "'$(DESTDIR)$(sysconfexampledir)'"; \
-+	  $(MKDIR_P) '$(DESTDIR)$(sysconfexampledir)'; \
- 	  echo $(INSTALL_DATA) "'$(builddir)/munge.logrotate.conf'" \
--	      "'$(DESTDIR)$(logrotateddir)/$(PACKAGE)'"; \
-+	      "'$(DESTDIR)$(sysconfexampledir)/$(PACKAGE)'"; \
- 	  $(INSTALL_DATA) '$(builddir)/munge.logrotate.conf' \
--	      '$(DESTDIR)$(logrotateddir)/$(PACKAGE)'; \
-+	      '$(DESTDIR)$(sysconfexampledir)/$(PACKAGE)'; \
- 	fi
- 
- uninstall-logrotate:
-@@ -659,13 +660,13 @@ uninstall-systemd:
- 
- install-systemd-sysconfig: munge.systemd.sysconfig
- 	@if test 'x${systemdunitdir}' != x \
--	      && test 'x$(sysconfigdir)' != x; then \
--	  echo $(MKDIR_P) "'$(DESTDIR)$(sysconfigdir)'"; \
--	  $(MKDIR_P) '$(DESTDIR)$(sysconfigdir)'; \
-+	      && test 'x$(sysconfexampledir)' != x; then \
-+	  echo $(MKDIR_P) "'$(DESTDIR)$(sysconfexampledir)'"; \
-+	  $(MKDIR_P) '$(DESTDIR)$(sysconfexampledir)'; \
- 	  echo $(INSTALL_DATA) "'$(builddir)/munge.systemd.sysconfig'" \
--	      "'$(DESTDIR)$(sysconfigdir)/$(PACKAGE)'"; \
-+	      "'$(DESTDIR)$(sysconfexampledir)/$(PACKAGE)'"; \
- 	  $(INSTALL_DATA) '$(builddir)/munge.systemd.sysconfig' \
--	      '$(DESTDIR)$(sysconfigdir)/$(PACKAGE)'; \
-+	      '$(DESTDIR)$(sysconfexampledir)/$(PACKAGE)'; \
- 	fi
- 
- uninstall-systemd-sysconfig:


Home | Main Index | Thread Index | Old Index