Skip to content
Permalink
Browse files

Avoid rebuilding everything on install. Respect PKG_SYSCONFDIR correctly

in ikiwiki-mass-rebuild. Bump PKGREVISION.
  • Loading branch information...
schmonz committed Aug 31, 2019
1 parent 9eb96e5 commit 0f516ccea228a162f53f91e4410333903f0ae6ba
Showing with 53 additions and 14 deletions.
  1. +9 −10 www/ikiwiki/Makefile
  2. +3 −2 www/ikiwiki/distinfo
  3. +26 −2 www/ikiwiki/patches/patch-Makefile.PL
  4. +15 −0 www/ikiwiki/patches/patch-po_Makefile
@@ -1,9 +1,9 @@
# $NetBSD: Makefile,v 1.165 2019/08/11 13:24:20 wiz Exp $
# $NetBSD: Makefile,v 1.166 2019/08/31 21:32:13 schmonz Exp $
#

DISTNAME= ikiwiki_3.20190228.orig
PKGNAME= ${DISTNAME:S/_/-/:S/.orig//}
PKGREVISION= 3
PKGREVISION= 4
CATEGORIES= www textproc
MASTER_SITES= ${MASTER_SITE_DEBIAN:=pool/main/i/ikiwiki/}
EXTRACT_SUFX= .tar.xz
@@ -35,30 +35,29 @@ DEPENDS+= p5-LWPx-ParanoidAgent-[0-9]*:../../www/p5-LWPx-ParanoidAgent

WRKSRC= ${WRKDIR}/${PKGNAME_NOREV:S/ikiwiki-/IkiWiki-/}
PERL5_PACKLIST= auto/IkiWiki/.packlist
USE_LANGUAGES= c
USE_TOOLS+= gmake msgfmt perl:run xgettext

REPLACE_PYTHON+= plugins/proxy.py plugins/pythondemo plugins/rst
REPLACE_PERL+= pm_filter

MAKE_FLAGS+= W3M_CGI_BIN=${PREFIX:Q}/libexec/w3m/cgi-bin
MAKE_FLAGS+= SYSCONFDIR=${PKG_SYSCONFDIR:Q}
MAKE_FLAGS+= SYSCONFDIR_EXAMPLES=${EGDIR:Q}
MAKE_FLAGS+= MANDIR=${PREFIX:Q}/${PKGMANDIR:Q}

INSTALL_MAKE_FLAGS+= SYSCONFDIR=${EGDIR:Q}
SUBST_CLASSES+= buildonce
SUBST_STAGE.buildonce= post-configure
SUBST_FILES.buildonce= Makefile
SUBST_SED.buildonce= -e 's|_vendor_install :: all|_vendor_install ::|'

PKG_SYSCONFSUBDIR= ${PKGBASE}
EGDIR= ${PREFIX}/share/examples/${PKGBASE}
.for f in auto.setup auto-blog.setup wikilist
CONF_FILES+= ${EGDIR}/${f} ${PKG_SYSCONFDIR}/${f}
.endfor

TEST_TARGET= test

maintainer-find-default-perl-shebangs-not-substed:
cd ${WRKSRC} && \
find . -type f -print | \
perl -ne 'open(F, "<$$_"); $$l=<F>; print if $$l =~ m|^#!/usr/bin/perl|'
#maintainer-find-default-perl-shebangs-not-substed:
# cd ${WRKSRC} && find . -type f -print | perl -ne 'open(F, "<$$_"); $$l=<F>; print if $$l =~ m|^#!/usr/bin/perl|'

.include "options.mk"

@@ -1,9 +1,10 @@
$NetBSD: distinfo,v 1.134 2019/08/31 20:19:23 schmonz Exp $
$NetBSD: distinfo,v 1.135 2019/08/31 21:32:13 schmonz Exp $

SHA1 (ikiwiki_3.20190228.orig.tar.xz) = 46f5b0a1498c1e098fe248eae1f2e3f56b25dc2f
RMD160 (ikiwiki_3.20190228.orig.tar.xz) = f47968a69528aea864ad412c8508a8c5063edb9d
SHA512 (ikiwiki_3.20190228.orig.tar.xz) = 125147d83dae6166b45541ed9176398ba4bd22ef3389d3efb3f442e558e326e0b004583d29aa32ed4bfca489c9d55b4232f074aab5fa649e51d9edd103685172
Size (ikiwiki_3.20190228.orig.tar.xz) = 2672244 bytes
SHA1 (patch-IkiWiki_Plugin_highlight.pm) = 14a2d8e1d3eb671863cdef4a936ebbb7b09ce3b9
SHA1 (patch-Makefile.PL) = c711a5f4d6f10ba0442baca1d2950e912665d467
SHA1 (patch-Makefile.PL) = 44324917c22ec3cd2aa216439e2ae5a3dc2f9787
SHA1 (patch-ikiwiki-mass-rebuild) = b8d5785d77736508de9cfc0f059cc36e0e607bce
SHA1 (patch-po_Makefile) = 468b500da41c606c6af6b65c8080d692acb69336
@@ -1,10 +1,19 @@
$NetBSD: patch-Makefile.PL,v 1.5 2019/08/31 20:19:23 schmonz Exp $
$NetBSD: patch-Makefile.PL,v 1.6 2019/08/31 21:32:13 schmonz Exp $

Avoid -regex, not available in OpenBSD find(1).
Set example SYSCONFDIR separately.

--- Makefile.PL.orig 2019-02-26 23:01:54.000000000 +0000
+++ Makefile.PL
@@ -140,11 +140,11 @@ underlay_install:
@@ -20,6 +20,7 @@ SED?=sed
# Additional configurable path variables.
W3M_CGI_BIN?=$(PREFIX)/lib/w3m/cgi-bin
SYSCONFDIR?=/etc/ikiwiki
+SYSCONFDIR_EXAMPLES?=$(PREFIX)/share/examples/ikiwiki
MANDIR?=$(PREFIX)/share/man

tflag=$(shell if [ -n "$$NOTAINT" ] && [ "$$NOTAINT" != 1 ]; then printf -- "-T"; fi)
@@ -140,11 +141,11 @@ underlay_install:
extra_install: underlay_install
# Install example sites.
set -e; \
@@ -18,3 +27,18 @@ Avoid -regex, not available in OpenBSD find(1).
if ! cp -pRL doc/examples/$$file $(DESTDIR)$(PREFIX)/share/ikiwiki/examples/$$file 2>/dev/null; then \
install -m 644 doc/examples/$$file $(DESTDIR)$(PREFIX)/share/ikiwiki/examples/$$file; \
fi; \
@@ -195,10 +196,10 @@ extra_install: underlay_install

# These might fail if a regular user is installing into a home
# directory.
- -install -d $(DESTDIR)$(SYSCONFDIR)
- -install -m 0644 wikilist $(DESTDIR)$(SYSCONFDIR)
- -install -m 0644 auto.setup $(DESTDIR)$(SYSCONFDIR)
- -install -m 0644 auto-blog.setup $(DESTDIR)$(SYSCONFDIR)
+ -install -d $(DESTDIR)$(SYSCONFDIR_EXAMPLES)
+ -install -m 0644 wikilist $(DESTDIR)$(SYSCONFDIR_EXAMPLES)
+ -install -m 0644 auto.setup $(DESTDIR)$(SYSCONFDIR_EXAMPLES)
+ -install -m 0644 auto-blog.setup $(DESTDIR)$(SYSCONFDIR_EXAMPLES)

# The git/hg plugins want to chdir; so does Devel::Cover. Skip those tests
# to stop them hurting each other.
@@ -0,0 +1,15 @@
$NetBSD: patch-po_Makefile,v 1.3 2019/08/31 21:32:13 schmonz Exp $

Avoid rebuilding at install time.

--- po/Makefile.orig 2019-02-26 23:01:54.000000000 +0000
+++ po/Makefile
@@ -12,7 +12,7 @@ all: ikiwiki.pot mo $(TRANSLATED_UNDERLA

mo: $(MOFILES)

-install: all
+install:
# Normal mo files for program translation.
for file in $(MOFILES); do \
lang=`echo $$file | sed 's/\.mo//'`; \

0 comments on commit 0f516cc

Please sign in to comment.
You can’t perform that action at this time.