1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-21 04:06:46 +00:00

www/redmine42: Add new port

This is the 4.2 branch of redmine
This commit is contained in:
Mikael Urankar 2021-05-28 13:38:57 +02:00
parent b2c62c4e38
commit 2a5d353c6a
15 changed files with 2573 additions and 0 deletions

View File

@ -1791,6 +1791,7 @@
SUBDIR += radicale
SUBDIR += rearx
SUBDIR += redmine4
SUBDIR += redmine42
SUBDIR += rejik
SUBDIR += reportmagic
SUBDIR += repos-style

View File

@ -34,6 +34,8 @@ RUN_DEPENDS= rubygem-bundler>=1.5.0:sysutils/rubygem-bundler \
USES= cpe
USE_RUBY= yes
CONFLICTS_INSTALL= redmine42
NO_ARCH= yes
NO_BUILD= yes

106
www/redmine42/Makefile Normal file
View File

@ -0,0 +1,106 @@
# Created by: Bernhard Froehlich <decke@bluelife.at>
PORTNAME= redmine
PORTVERSION= 4.2.1
CATEGORIES= www
MASTER_SITES= https://www.redmine.org/releases/
PKGNAMESUFFIX= 42
MAINTAINER= mikael@FreeBSD.org
COMMENT= Flexible project management web application
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/doc/COPYING
RUN_DEPENDS= rubygem-bundler>=1.5.0:sysutils/rubygem-bundler \
rubygem-rails52>=5.2.4.5:www/rubygem-rails52 \
rubygem-rouge>=3.26.0:textproc/rubygem-rouge \
rubygem-request_store>=1.5.0:devel/rubygem-request_store \
rubygem-mini_mime>=1.0.1:mail/rubygem-mini_mime \
rubygem-actionpack-xml_parser-rails52>=0:textproc/rubygem-actionpack-xml_parser-rails52 \
rubygem-roadie-rails-rails52>=2.1.0:mail/rubygem-roadie-rails-rails52 \
rubygem-mimemagic>=0:misc/rubygem-mimemagic \
rubygem-mail>=2.7.1:mail/rubygem-mail \
rubygem-csv>=3.1.1:devel/rubygem-csv \
rubygem-nokogiri>=1.11.0:textproc/rubygem-nokogiri \
rubygem-i18n>=0.7:devel/rubygem-i18n \
rubygem-rbpdf>=1.19.6:print/rubygem-rbpdf \
rubygem-net-ldap>=0.16:net/rubygem-net-ldap \
rubygem-ruby-openid>=2.9.2:net/rubygem-ruby-openid \
rubygem-rack-openid>=0:www/rubygem-rack-openid \
rubygem-rake>=0:devel/rubygem-rake \
rubygem-rotp>0:devel/rubygem-rotp \
rubygem-rqrcode>0:www/rubygem-rqrcode
USES= cpe
USE_RUBY= yes
CONFLICTS_INSTALL= redmine4
NO_ARCH= yes
NO_BUILD= yes
USERS= ${WWWOWN}
GROUPS= ${WWWGRP}
PLIST_SUB= WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}
SUB_LIST= RUBY_NAME=${RUBY_NAME}
OPTIONS_DEFINE= MYSQL POSTGRESQL MARKDOWN RMAGIC THIN
OPTIONS_DEFAULT=MYSQL MARKDOWN RMAGIC THIN
OPTIONS_SUB= yes
POSTGRESQL_DESC=Enable PostgreSQL support
MARKDOWN_DESC= Enable Markdown support
RMAGIC_DESC= Enable Gantt charts support
THIN_DESC= Use Thin WEB server
MYSQL_DESC= MySQL database support (via mysql2 rubygem)
NO_OPTIONS_SORT= yes
MYSQL_RUN_DEPENDS= rubygem-mysql2>=0.5.0:databases/rubygem-mysql2
POSTGRESQL_RUN_DEPENDS= rubygem-pg>=1.1.4:databases/rubygem-pg
MARKDOWN_RUN_DEPENDS= rubygem-redcarpet>=3.4.0:textproc/rubygem-redcarpet
RMAGIC_RUN_DEPENDS= rubygem-mini_magick>=4.9.5:graphics/rubygem-mini_magick
THIN_RUN_DEPENDS= rubygem-thin>=1.6.2:www/rubygem-thin
THIN_SUB_LIST= WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}
THIN_VARS= USE_RC_SUBR=redmine
.include <bsd.port.options.mk>
post-extract:
@${RM} -r ${WRKSRC}/.hgignore ${WRKSRC}/.gitignore ${WRKSRC}/.github \
${WRKSRC}/files/delete.me ${WRKSRC}/log/delete.me
@${MV} ${WRKSRC}/config/settings.yml ${WRKSRC}/config/settings.yml.sample
@${MV} ${WRKSRC}/config/database.yml.example ${WRKSRC}/config/database.yml.sample
post-patch:
@${RM} ${WRKSRC}/Gemfile.orig
do-install:
${MKDIR} ${STAGEDIR}${WWWDIR}
${MKDIR} ${STAGEDIR}${WWWDIR}/bundler.d
${MKDIR} ${STAGEDIR}${WWWDIR}/log
${MKDIR} ${STAGEDIR}${WWWDIR}/public/plugin_assets
${MKDIR} ${STAGEDIR}${WWWDIR}/tmp
cd ${WRKSRC} && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}
${TOUCH} ${STAGEDIR}${WWWDIR}/Gemfile.lock
do-install-MYSQL-on:
${CP} ${FILESDIR}/mysql.rb ${STAGEDIR}${WWWDIR}/bundler.d
do-install-POSTGRESQL-on:
${CP} ${FILESDIR}/pg.rb ${STAGEDIR}${WWWDIR}/bundler.d
do-install-MARKDOWN-on:
${CP} ${FILESDIR}/markdown.rb ${STAGEDIR}${WWWDIR}/bundler.d
do-install-RMAGIC-on:
${CP} ${FILESDIR}/mini_magick.rb ${STAGEDIR}${WWWDIR}/bundler.d
do-install-THIN-on:
${CP} ${FILESDIR}/thin.rb ${STAGEDIR}${WWWDIR}/bundler.d
post-install:
(cd ${STAGEDIR}${WWWDIR} && ${RM} Gemfile.lock && bundle install --local)
${RM} ${STAGEDIR}${WWWDIR}/package.json \
${STAGEDIR}${WWWDIR}/yarn.lock
.include <bsd.port.mk>

View File

@ -0,0 +1,78 @@
# Module that simplifies installation of Redmine plugins.
#
# Date created: 2010-09-12
# Whom: Eygene Ryabinkin <rea-fbsd@codelabs.ru>
#
# We're assuming standard plugin installation sequence that is described
# in the https://www.redmine.org/projects/redmine/wiki/Plugins
#
# Basically, we need the following variables to be defined:
# - REDMINE_PLUGIN_NAME: the name of the plugin;
# - WWWDIR: the location of the Redmine installation;
# the default value is ${PREFIX}/www/redmine;
# the directory must lie under ${PREFIX} or such configuration
# will be IGNORE'd;
# - WRKSRC must be set to the root directory of the plugin contents:
# we will copy all objects in this directory to the plugin's
# destination directory, excluding all files named *.orig.
#
# PLIST will be generated automatically, there is no need to worry
# about it. But if you will need to use your own (even the standard
# packaging list in ${PORTDIR}/pkg-plist), set the variable PLIST
# pointing to that file.
#
# You can override the target 'do-build', but in this case, you should
# remember that the target named 'redmine-plugin-plist' does the
# automated generation of the PLIST: use it if you need.
#
#
# Here is an example of a simple Makefile for Redmine plugin:
# {{{
# PORTNAME= me-the-plugin
# PORTVERSION= 1.0
# CATEGORIES= www
# MASTER_SITES= http://cool.org.name/some/path/
#
# MAINTAINER= you@your.org
# COMMENT= Another cool plugin for Redmine
#
# REDMINE_PLUGIN_NAME= redmine_http_auth
#
# .include "${.CURDIR}/../../www/redmine/bsd.redmine.mk"
# }}}
PKGNAMEPREFIX?= redmine42-
RUN_DEPENDS+= redmine42>=4.2:www/redmine42
USE_RUBY= yes
.if !defined(PLIST)
PLIST= ${WRKDIR}/PLIST
_GEN_PLIST= YesPlease
.endif
WWWDIR?= ${PREFIX}/www/redmine
WWWDIR_REL= ${WWWDIR:S|^${PREFIX}/||}
.if ${WWWDIR_REL} == ${WWWDIR}
IGNORE= WWWDIR is not a child of PREFIX (${PREFIX})
.endif
.if !defined(do-build)
do-build: redmine-plugin-plist
@${DO_NADA}
.endif
redmine-plugin-plist:
.if defined(_GEN_PLIST)
cd ${WRKSRC} && ${FIND} . -type f | ${GREP} -v '\.orig$$' | ${SED} -e's|^\.|${WWWDIR_REL}/plugins/${REDMINE_PLUGIN_NAME}|' >> ${PLIST}
cd ${WRKSRC} && ${FIND} -d . -empty -type d | ${SED} -e's|^\.|@dir ${WWWDIR_REL}/plugins/${REDMINE_PLUGIN_NAME}|' >> ${PLIST}
.else
@${DO_NADA}
.endif
do-install:
${MKDIR} "${STAGEDIR}${WWWDIR}/plugins/${REDMINE_PLUGIN_NAME}"
${TAR} -C "${WRKSRC}" -cf - --exclude '*.orig' . | ${TAR} -C "${STAGEDIR}${WWWDIR}/plugins/${REDMINE_PLUGIN_NAME}" -xf -
.include <bsd.port.mk>

3
www/redmine42/distinfo Normal file
View File

@ -0,0 +1,3 @@
TIMESTAMP = 1619773959
SHA256 (redmine-4.2.1.tar.gz) = ad4109c3425f1cfe4c8961f6ae6494c76e20d81ed946caa1e297d9eda13b41b4
SIZE (redmine-4.2.1.tar.gz) = 3034144

View File

@ -0,0 +1 @@
gem "redcarpet", ">= 3.4.0"

View File

@ -0,0 +1 @@
gem "mini_magick", ">= 4.9.5"

View File

@ -0,0 +1 @@
gem "mysql2", "~> 0.5.0"

View File

@ -0,0 +1,93 @@
--- Gemfile.orig 2021-04-30 11:34:49 UTC
+++ Gemfile
@@ -3,11 +3,11 @@ source 'https://rubygems.org'
ruby '>= 2.4.0', '< 2.8.0'
gem 'bundler', '>= 1.12.0'
-gem 'rails', '5.2.5'
+gem 'rails', '5.2.6'
gem 'sprockets', '~> 3.7.2' if RUBY_VERSION < '2.5'
gem 'rouge', '~> 3.26.0'
gem 'request_store', '~> 1.5.0'
-gem "mini_mime", "~> 1.0.1"
+gem "mini_mime", ">= 1.0.1"
gem "actionpack-xml_parser"
gem 'roadie-rails', (RUBY_VERSION < '2.5' ? '~> 1.3.0' : '~> 2.2.0')
gem 'marcel'
@@ -37,67 +37,6 @@ group :openid do
gem "rack-openid"
end
-# Optional gem for exporting the gantt to a PNG file
-group :minimagick do
- gem 'mini_magick', '~> 4.11.0'
-end
-
-# Optional Markdown support, not for JRuby
-group :markdown do
- gem 'redcarpet', '~> 3.5.1'
-end
-
-# Include database gems for the adapters found in the database
-# configuration file
-require 'erb'
-require 'yaml'
-database_file = File.join(File.dirname(__FILE__), "config/database.yml")
-if File.exist?(database_file)
- database_config = YAML::load(ERB.new(IO.read(database_file)).result)
- adapters = database_config.values.map {|c| c['adapter']}.compact.uniq
- if adapters.any?
- adapters.each do |adapter|
- case adapter
- when 'mysql2'
- gem "mysql2", "~> 0.5.0", :platforms => [:mri, :mingw, :x64_mingw]
- when /postgresql/
- gem "pg", "~> 1.2.2", :platforms => [:mri, :mingw, :x64_mingw]
- when /sqlite3/
- gem "sqlite3", "~> 1.4.0", :platforms => [:mri, :mingw, :x64_mingw]
- when /sqlserver/
- gem "tiny_tds", "~> 2.1.2", :platforms => [:mri, :mingw, :x64_mingw]
- gem "activerecord-sqlserver-adapter", "~> 5.2.1", :platforms => [:mri, :mingw, :x64_mingw]
- else
- warn("Unknown database adapter `#{adapter}` found in config/database.yml, use Gemfile.local to load your own database gems")
- end
- end
- else
- warn("No adapter found in config/database.yml, please configure it first")
- end
-else
- warn("Please configure your config/database.yml first")
-end
-
-group :development do
- gem "yard"
-end
-
-group :test do
- gem "rails-dom-testing"
- gem 'mocha', '>= 1.4.0'
- gem 'simplecov', '~> 0.18.5', :require => false
- gem "ffi", platforms: [:mingw, :x64_mingw, :mswin]
- # For running system tests
- gem 'puma'
- gem 'capybara', '~> 3.31.0'
- gem "selenium-webdriver"
- gem 'webdrivers', '~> 4.4', require: false
- # RuboCop
- gem 'rubocop', '~> 1.12.0'
- gem 'rubocop-performance', '~> 1.10.1'
- gem 'rubocop-rails', '~> 2.9.0'
-end
-
local_gemfile = File.join(File.dirname(__FILE__), "Gemfile.local")
if File.exists?(local_gemfile)
eval_gemfile local_gemfile
@@ -106,4 +45,8 @@ end
# Load plugins' Gemfiles
Dir.glob File.expand_path("../plugins/*/{Gemfile,PluginGemfile}", __FILE__) do |file|
eval_gemfile file
+end
+
+Dir["#{File.dirname(__FILE__)}/bundler.d/*.rb"].each do |bundle|
+ self.instance_eval(Bundler.read_file(bundle))
end

View File

@ -0,0 +1 @@
gem "pg", "> 1.1.4"

View File

@ -0,0 +1,38 @@
#!/bin/sh
# PROVIDE: redmine
# REQUIRE: LOGIN
# KEYWORD: shutdown
# Add the following line to /etc/rc.conf[.local] to enable redmine
#
# redmine_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable redmine.
# redmine_flags (str): Custom additional arguments to be passed
# to redmine.
# redmine_user (str): User account to run thin with. (default: %%WWWOWN%%)
# redmine_group (str): Group to run thin with. (default: %%WWWGRP%%)
. /etc/rc.subr
name="redmine"
rcvar=redmine_enable
command=%%RUBY_NAME%%
pidfile="%%WWWDIR%%/tmp/pids/thin.pid"
load_rc_config $name
# add /usr/local/bin to path
export PATH=$PATH:%%PREFIX%%/bin
# set defaults
: ${redmine_enable="NO"}
: ${redmine_flags="-a 0.0.0.0 -p 3000 -e production"}
: ${redmine_user="%%WWWOWN%%"}
: ${redmine_group="%%WWWGRP%%"}
command_args="-d -D -c %%WWWDIR%% -u ${redmine_user} -g ${redmine_group}"
start_cmd="%%PREFIX%%/bin/thin ${command_args} ${redmine_flags} start"
run_rc_command "$1"

View File

@ -0,0 +1 @@
gem "thin", ">= 1.6.2"

23
www/redmine42/pkg-descr Normal file
View File

@ -0,0 +1,23 @@
Redmine is a flexible project management web application
written using Ruby on Rails framework, it is cross-platform
and cross-database.
Feature Overview:
* Multiple projects support
* Flexible role based access control
* Flexible issue tracking system
* Gantt chart and calendar
* News, documents & files management
* Feeds & email notifications
* Per project wiki
* Per project forums
* Time tracking
* Custom fields for issues, time-entries, projects and users
* SCM integration (SVN, CVS, Git, Mercurial, Bazaar and Darcs)
* Issue creation via email
* Multiple LDAP authentication support
* User self-registration support
* Multilanguage support
* Multiple databases support
WWW: https://www.redmine.org/

18
www/redmine42/pkg-message Normal file
View File

@ -0,0 +1,18 @@
[
{ type: install
message: <<EOM
Redmine was installed.
You now need to setup your Redmine installation so
please have a look at the Installation Guide.
https://www.redmine.org/projects/redmine/wiki/RedmineInstall
If you are upgrading please read the Upgrading Guide
before starting the new version.
https://www.redmine.org/projects/redmine/wiki/RedmineUpgrade
EOM
}
]

2206
www/redmine42/pkg-plist Normal file

File diff suppressed because it is too large Load Diff