summaryrefslogtreecommitdiff
path: root/www/ocsigen/patches/patch-Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'www/ocsigen/patches/patch-Makefile')
-rw-r--r--www/ocsigen/patches/patch-Makefile70
1 files changed, 32 insertions, 38 deletions
diff --git a/www/ocsigen/patches/patch-Makefile b/www/ocsigen/patches/patch-Makefile
index 4e8e073473e..8b60aea6152 100644
--- a/www/ocsigen/patches/patch-Makefile
+++ b/www/ocsigen/patches/patch-Makefile
@@ -1,20 +1,20 @@
-$NetBSD: patch-Makefile,v 1.2 2012/12/15 11:16:07 jaapb Exp $
+$NetBSD: patch-Makefile,v 1.3 2016/12/30 11:55:53 jaapb Exp $
-Correct installation procedure for pkgsrc environment
---- Makefile.orig 2012-12-07 15:17:09.000000000 +0000
+Use BSD_* installation commands
+--- Makefile.orig 2016-11-15 15:04:34.000000000 +0000
+++ Makefile
-@@ -67,61 +67,53 @@ install.opt: install.META.opt install.fi
+@@ -67,66 +67,43 @@ install.opt: install.META.opt install.fi
# BB If install is not run by root but OCSIGENUSER, OCSIGENGROUP is somebody
# BB different, make files universally accessible, we cannot chown.
-INSTALL_CAN_PUT_PERMISSIONS=yes
-+INSTALL_CAN_PUT_PERMISSIONS=no
- INSTALL_USER_GROUP=-o $(OCSIGENUSER) -g $(OCSIGENGROUP)
- INSTALL_MOD_660=660
- INSTALL_MOD_644=644
- INSTALL_MOD_755=755
- INSTALL_MOD_770=770
- INSTALL_MOD_750=750
+-INSTALL_USER_GROUP=-o $(OCSIGENUSER) -g "$(OCSIGENGROUP)"
+-INSTALL_MOD_660=660
+-INSTALL_MOD_644=644
+-INSTALL_MOD_755=755
+-INSTALL_MOD_770=770
+-INSTALL_MOD_750=750
+-USERNAME=$(shell whoami)
-ifneq ($(shell id -u), 0)
- ifneq ($(OCSIGENUSER), $(USERNAME))
- INSTALL_CAN_PUT_PERMISSIONS=no
@@ -31,56 +31,45 @@ Correct installation procedure for pkgsrc environment
- INSTALL_MOD_770=777
- INSTALL_MOD_750=777
-endif
-+#ifneq ($(shell id -u), 0)
-+# ifneq ($(OCSIGENUSER), $(USERNAME))
-+# INSTALL_CAN_PUT_PERMISSIONS=no
-+# endif
-+# ifneq ($(shell groups ${USERNAME}|grep -q ${OCSIGENGROUP}; echo $$?), 0)
-+# INSTALL_CAN_PUT_PERMISSIONS=no
-+# endif
-+#endif
-+#ifeq ($(INSTALL_CAN_PUT_PERMISSIONS), no)
-+# INSTALL_USER_GROUP=
-+# INSTALL_MOD_660=666
-+# INSTALL_MOD_644=666
-+# INSTALL_MOD_755=777
-+# INSTALL_MOD_770=777
-+# INSTALL_MOD_750=777
-+#endif
++INSTALL_CAN_PUT_PERMISSIONS=no
install.files:
@echo INSTALL_CAN_PUT_PERMISSIONS: ${INSTALL_CAN_PUT_PERMISSIONS}
-- ## Command pipe
+ ## Command pipe
- $(INSTALL) -m ${INSTALL_MOD_755} -d $(dir $(TEMPROOT)$(COMMANDPIPE))
-- [ -p $(TEMPROOT)$(COMMANDPIPE) ] || \
++ $(BSD_INSTALL_DATA_DIR) $(dir $(TEMPROOT)$(COMMANDPIPE))
+ [ -p $(TEMPROOT)$(COMMANDPIPE) ] || \
- { mkfifo -m ${INSTALL_MOD_660} $(TEMPROOT)$(COMMANDPIPE); \
-- if [ "${INSTALL_CAN_PUT_PERMISSIONS}" = yes ]; \
-- then $(CHOWN) -R $(OCSIGENUSER):$(OCSIGENGROUP) $(TEMPROOT)$(COMMANDPIPE); \
-- fi; }
++ { mkfifo ${INSTALL_MOD_660} $(TEMPROOT)$(COMMANDPIPE); \
+ if [ "${INSTALL_CAN_PUT_PERMISSIONS}" = yes ]; \
+ then $(CHOWN) -R $(OCSIGENUSER):"$(OCSIGENGROUP)" $(TEMPROOT)$(COMMANDPIPE); \
+ fi; }
## Configuration files
- $(INSTALL) -m ${INSTALL_MOD_755} -d $(TEMPROOT)$(CONFIGDIR)/conf.d
- ${INSTALL} -m ${INSTALL_MOD_644} ${PROJECTNAME}.conf.sample $(TEMPROOT)$(CONFIGDIR)/
-+ $(BSD_INSTALL_DATA_DIR) -d $(TEMPROOT)$(CONFIGDIR)/conf.d
++ $(BSD_INSTALL_DATA_DIR) $(TEMPROOT)$(CONFIGDIR)/conf.d
+ ${BSD_INSTALL_DATA} ${PROJECTNAME}.conf.sample $(TEMPROOT)$(CONFIGDIR)/
[ -f $(TEMPROOT)$(CONFIGDIR)/$(PROJECTNAME).conf ] || \
- { $(INSTALL) -m ${INSTALL_MOD_644} $(PROJECTNAME).conf.sample \
+ { $(BSD_INSTALL_DATA) $(PROJECTNAME).conf.sample \
$(TEMPROOT)$(CONFIGDIR)/$(PROJECTNAME).conf; }
- -mv $(TEMPROOT)$(CONFIGDIR)/mime.types $(TEMPROOT)$(CONFIGDIR)/mime.types.old
+- -mv $(TEMPROOT)$(CONFIGDIR)/mime.types $(TEMPROOT)$(CONFIGDIR)/mime.types.old
++#-mv $(TEMPROOT)$(CONFIGDIR)/mime.types $(TEMPROOT)$(CONFIGDIR)/mime.types.old
## Log directory
- $(INSTALL) -m ${INSTALL_MOD_644} src/files/mime.types $(TEMPROOT)$(CONFIGDIR)
- $(INSTALL) -d -m ${INSTALL_MOD_755} ${INSTALL_USER_GROUP} $(TEMPROOT)$(LOGDIR)
+ $(BSD_INSTALL_DATA) src/files/mime.types $(TEMPROOT)$(CONFIGDIR)
++ $(BSD_INSTALL_DATA_DIR) $(TEMPROOT)$(LOGDIR)
## Static files
- $(INSTALL) -d -m ${INSTALL_MOD_755} ${INSTALL_USER_GROUP} $(TEMPROOT)$(STATICPAGESDIR)
- $(INSTALL) -d -m ${INSTALL_MOD_750} ${INSTALL_USER_GROUP} $(TEMPROOT)$(DATADIR)
- $(INSTALL) -m ${INSTALL_MOD_644} ${INSTALL_USER_GROUP} \
-+ $(BSD_INSTALL_DATA_DIR) -d $(TEMPROOT)$(STATICPAGESDIR)
-+ $(BSD_INSTALL_DATA_DIR) -d $(TEMPROOT)$(DATADIR)
++ $(BSD_INSTALL_DATA_DIR) $(TEMPROOT)$(STATICPAGESDIR)
++ $(BSD_INSTALL_DATA_DIR) $(TEMPROOT)$(DATADIR)
+ $(BSD_INSTALL_DATA) \
local/var/www/*.html $(TEMPROOT)$(STATICPAGESDIR)
- $(INSTALL) -d -m ${INSTALL_MOD_755} ${INSTALL_USER_GROUP} \
-+ $(BSD_INSTALL_DATA_DIR) -d \
++ $(BSD_INSTALL_DATA_DIR) \
$(TEMPROOT)$(STATICPAGESDIR)/ocsigenstuff
- $(INSTALL) -m ${INSTALL_MOD_644} ${INSTALL_USER_GROUP} \
+ $(BSD_INSTALL_DATA) \
@@ -88,8 +77,13 @@ Correct installation procedure for pkgsrc environment
$(TEMPROOT)$(STATICPAGESDIR)/ocsigenstuff
- $(INSTALL) -d -m ${INSTALL_MOD_755} $(TEMPROOT)$(MANDIR)
- $(INSTALL) -m ${INSTALL_MOD_644} src/files/${PROJECTNAME}.1 $(TEMPROOT)$(MANDIR)
-+ $(BSD_INSTALL_MAN_DIR) -d $(TEMPROOT)$(MANDIR)
++ $(BSD_INSTALL_MAN_DIR) $(TEMPROOT)$(MANDIR)
+ $(BSD_INSTALL_MAN) src/files/${PROJECTNAME}.1 $(TEMPROOT)$(MANDIR)
uninstall:
-make -C doc uninstall
+- -rm -f $(TEMPROOT)$(CONFIGDIR)/$(PROJECTNAME).conf.sample
++ -rm -F $(TEMPROOT)$(CONFIGDIR)/$(PROJECTNAME).conf.sample
+ -rm -f $(TEMPROOT)$(MANDIR)/${PROJECTNAME}.1
+ -rm -f $(TEMPROOT)$(COMMANDPIPE)
+ -rmdir --ignore-fail-on-non-empty $(TEMPROOT)$(CONFIGDIR)/conf.d