pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/ruby-redmine42



Module Name:    pkgsrc
Committed By:   jperkin
Date:           Wed May  4 17:34:05 UTC 2022

Modified Files:
        pkgsrc/devel/ruby-redmine42: Makefile

Log Message:
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).


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 pkgsrc/devel/ruby-redmine42/Makefile

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

Modified files:

Index: pkgsrc/devel/ruby-redmine42/Makefile
diff -u pkgsrc/devel/ruby-redmine42/Makefile:1.8 pkgsrc/devel/ruby-redmine42/Makefile:1.9
--- pkgsrc/devel/ruby-redmine42/Makefile:1.8    Sun Apr  3 05:36:02 2022
+++ pkgsrc/devel/ruby-redmine42/Makefile        Wed May  4 17:34:05 2022
@@ -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 @@ HOMEPAGE=     https://www.redmine.org/
 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 @@ RUBY_RAILS_ACCEPTED= 52
 
 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 @@ DEPENDS+=    ${RUBY_PKGPREFIX}-redcarpet>=3
 
 .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 @@ FILES_SUBST+=        WWWGRP=${APACHE_GROUP} WWW
                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 @@ do-install:
                ${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