pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/ruby-redmine42 ruby-redmine42: Various portabili...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/b78a732cdf3f
branches:  trunk
changeset: 378581:b78a732cdf3f
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Wed May 04 17:34:05 2022 +0000

description:
ruby-redmine42: Various portability fixes.

Use pax for install rather than hand-crafted find -exec which wasn't working
correctly.  Don't find ".*" with -type d and then rm, you might end up
removing ".destdir/".  And fix REPLACE_RUBY which can't have worked due to
incorrect paths as well as coming after including modules.mk (so will have
been a NOP).

diffstat:

 devel/ruby-redmine42/Makefile |  25 ++++++++++++++-----------
 1 files changed, 14 insertions(+), 11 deletions(-)

diffs (67 lines):

diff -r 879e75cc49a4 -r b78a732cdf3f devel/ruby-redmine42/Makefile
--- a/devel/ruby-redmine42/Makefile     Wed May 04 17:30:12 2022 +0000
+++ b/devel/ruby-redmine42/Makefile     Wed May 04 17:34:05 2022 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.8 2022/04/03 05:36:02 taca Exp $
+# $NetBSD: Makefile,v 1.9 2022/05/04 17:34:05 jperkin Exp $
 
 DISTNAME=      redmine-${RM_VERSION}
 PKGNAME=       ${RUBY_PKGPREFIX}-${DISTNAME:S/redmine/redmine${RM_VER}/}
@@ -10,6 +10,8 @@
 COMMENT=       Flexible project management web application
 LICENSE=       gnu-gpl-v2 # and so on.
 
+USE_TOOLS+=    pax
+
 RM_VERSION=    4.2.5
 
 NO_BUILD=      yes
@@ -20,6 +22,11 @@
 
 OVERRIDE_GEMSPEC+=     nokogiri>=1.11.0 mini_mime>=1.0.1 csv>=3.1.1
 
+REPLACE_RUBY+= bin/*
+REPLACE_RUBY+= extra/mail_handler/rdm-mailhandler.rb
+REPLACE_RUBY+= extra/svn/reposman.rb
+REPLACE_RUBY+= public/dispatch.fcgi.example
+
 .include "../../lang/ruby/modules.mk"
 
 DEPENDS+=      ${RUBY_PKGPREFIX}-bundler>=1.5.0:../../misc/ruby-bundler
@@ -49,11 +56,6 @@
 
 .include "options.mk"
 
-REPLACE_RUBY+= ${DISTNAME}/bin/*
-REPLACE_RUBY+= ${DISTNAME}/extra/mail_handler/rdm-mailhandler.rb
-REPLACE_RUBY+= ${DISTNAME}/extra/svn/reposman.rb
-REPLACE_RUBY+= ${DISTNAME}/public/dispatch.fcgi.example
-
 SUBST_CLASSES+=                shell
 SUBST_FILES.shell=     ${DESTDIR}${PREFIX}/bin/redmine42_*${RUBY_SUFFIX}.sh
 SUBST_MESSAGE.shell=   Fixing paths in helper shell scripts.
@@ -84,10 +86,7 @@
                RM_DIR=${RM_DIR}
 
 do-install:
-       cd ${WRKSRC} && ${FIND} . -type d -exec ${INSTALL_DATA_DIR} \
-               ${DESTDIR}${PREFIX}/${RM_DIR}/{} \;
-       cd ${WRKSRC} && ${FIND} . -type f ! -name "*.orig" -exec \
-               ${INSTALL_DATA} {} ${DESTDIR}${PREFIX}/${RM_DIR}/{} \;
+       cd ${WRKSRC} && ${PAX} -rw -pp . ${DESTDIR}${PREFIX}/${RM_DIR}/
        ${INSTALL_SCRIPT} ${FILESDIR}/redmine42_migrate_plugins.sh \
                ${DESTDIR}${PREFIX}/bin/redmine42_migrate_plugins${RUBY_SUFFIX}.sh
        ${INSTALL_SCRIPT} ${FILESDIR}/redmine42_generate_secret_token.sh \
@@ -98,7 +97,11 @@
                ${DESTDIR}${PREFIX}/bin/redmine42_load_default_data${RUBY_SUFFIX}.sh
 
 post-install: unicorn-post-install
-       ${FIND} ${DESTDIR}/ -name ".*" \( -type f -or -type d \) | xargs rm -rf
+       ${FIND} ${DESTDIR}${PREFIX}/${RM_DIR} \
+               \( -name ".*" -or -name "*.orig" \) -type f -exec ${RM} {} \;
+       ${RM} -rf ${DESTDIR}${PREFIX}/${RM_DIR}/.github
+       ${CHMOD} -x ${DESTDIR}${PREFIX}/${RM_DIR}/Rakefile
+       ${CHMOD} -R g-w ${DESTDIR}${PREFIX}/${RM_DIR}
        ${MV} ${DESTDIR}${PREFIX}/${RM_DIR}/config/configuration.yml.example \
                ${DESTDIR}/${EGDIR}
        ${MV} ${DESTDIR}${PREFIX}/${RM_DIR}/config/database.yml.example \



Home | Main Index | Thread Index | Old Index