summaryrefslogtreecommitdiffstats
path: root/main/redmine
diff options
context:
space:
mode:
Diffstat (limited to 'main/redmine')
-rw-r--r--main/redmine/APKBUILD55
-rw-r--r--main/redmine/bundle.config2
-rw-r--r--main/redmine/lighttpd-virtual.conf26
-rw-r--r--main/redmine/redmine.initd34
-rw-r--r--main/redmine/redmine.pre-install4
5 files changed, 66 insertions, 55 deletions
diff --git a/main/redmine/APKBUILD b/main/redmine/APKBUILD
index 9018cb801..ca67e3fb3 100644
--- a/main/redmine/APKBUILD
+++ b/main/redmine/APKBUILD
@@ -2,25 +2,27 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=redmine
pkgver=2.1.2
-pkgrel=1
+pkgrel=4
pkgdesc="Project management web application written in Ruby"
url="http://redmine.org"
arch="noarch"
license="GPL2"
-depends="ruby-rails ruby-fcgi ruby-rmagick ruby-i18n ruby-openid
- ruby-mocha ruby-jquery-rails
- lighttpd"
+depends="ruby-rails ruby-rmagick ruby-i18n ruby-openid ruby-rack
+ ruby-mocha ruby-jquery-rails ruby-coderay ruby-fastercsv
+ ruby-net-ldap ruby-rack-openid ruby-bigdecimal ruby-unicorn
+ ruby-json"
depends_dev=
makedepends="$depends_dev ruby-gems"
-install=""
+install="$pkgname.pre-install"
subpackages=""
-pkgusers="lighttpd"
-pkggroups="lighttpd"
+pkgusers="$pkgname"
+pkggroups="$pkgname"
source="http://rubyforge.org/frs/download.php/76495/redmine-$pkgver.tar.gz
additional_environment.rb
configuration.yml
database.yml
- lighttpd-virtual.conf"
+ bundle.config
+ $pkgname.initd"
_webapps="usr/share/webapps"
_builddir="$srcdir"/redmine-$pkgver
@@ -42,50 +44,45 @@ build() {
package() {
cd "$_builddir"
- mkdir -p "$pkgdir/$_webapps/$pkgname" \
- "$pkgdir"/var/log \
- "$pkgdir"/etc/lighttpd \
- "$pkgdir"/var/www/localhost/htdocs
+ mkdir -p "$pkgdir/$_webapps/$pkgname/.bundle" \
+ "$pkgdir"/var/log
+ # install bundle config so redmine will not
+ # complain about missing deps. users will
+ # need to install a db driver themselves.
+ install -m644 -D "$srcdir"/bundle.config \
+ "$pkgdir/$_webapps/$pkgname/.bundle/config"
# move app to webapps dir
mv * "$pkgdir/$_webapps/$pkgname"
# install default config to /etc/redmine
- install -g lighttpd -m640 -D "$srcdir"/database.yml \
+ install -g $pkggroups -m640 -D "$srcdir"/database.yml \
"$pkgdir"/etc/redmine/database.yml
- install -g lighttpd -m644 -D "$srcdir"/configuration.yml \
+ install -g $pkggroups -m644 -D "$srcdir"/configuration.yml \
"$pkgdir"/etc/redmine/configuration.yml
- install -g lighttpd -m644 -D "$srcdir"/additional_environment.rb \
+ install -g $pkggroups -m644 -D "$srcdir"/additional_environment.rb \
"$pkgdir"/etc/redmine/additional_environment.rb
- # we use fcgi by default
- cd "$pkgdir/$_webapps/$pkgname"/public
- ln -s dispatch.fcgi.example dispatch.fcgi
cd "$pkgdir/$_webapps/$pkgname"/config
# link config to webapps dir
ln -s /etc/redmine/database.yml
ln -s /etc/redmine/configuration.yml
ln -s /etc/redmine/additional_environment.rb
cd "$pkgdir/$_webapps/$pkgname"
- # permissions
mkdir -p tmp tmp/pdf public/plugin_assets
- chown -R lighttpd:lighttpd files log tmp public/plugin_assets
chmod -R 755 files log tmp public/plugin_assets
# move redmine log to /var/log
mv log "$pkgdir"/var/log/$pkgname
# symlink logs to var log
ln -s /var/log/redmine log
- # symlink redmine to htdocs dir
- ln -s "/$_webapps/$pkgname" \
- "$pkgdir"/var/www/localhost/htdocs/"$pkgname"
- # example lighttpd config for redmine virtual hosting
- cp "$srcdir"/lighttpd-virtual.conf \
- "$pkgdir"/etc/lighttpd/redmine-virtual.conf
- # set correct permissions
- chown -R lighttpd:lighttpd \
+ # set correct permissions
+ chown -R $pkgusers:$pkggroups \
"$pkgdir/$_webapps/$pkgname" \
"$pkgdir"/var/log/"$pkgname"
+ install -D -m755 "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname
}
md5sums="42feb03a4447bb6551eba34721ec235b redmine-2.1.2.tar.gz
06fa866e699a6f867603f886be3a5eea additional_environment.rb
7347eb8fa89144c8a0ca292702203803 configuration.yml
2b97d378d27a10a7b5ff2161aefbbb1a database.yml
-f43ad7e5875b46b723c69b3a9b5e52f2 lighttpd-virtual.conf"
+b42dd5308f44156e6c8f1cf83656993d bundle.config
+08833c0929543f3f42c6e7cb7f408aef redmine.initd"
diff --git a/main/redmine/bundle.config b/main/redmine/bundle.config
new file mode 100644
index 000000000..34f4f2139
--- /dev/null
+++ b/main/redmine/bundle.config
@@ -0,0 +1,2 @@
+---
+BUNDLE_WITHOUT: development:test:mysql:postgresql:sqlite
diff --git a/main/redmine/lighttpd-virtual.conf b/main/redmine/lighttpd-virtual.conf
deleted file mode 100644
index be0c684b0..000000000
--- a/main/redmine/lighttpd-virtual.conf
+++ /dev/null
@@ -1,26 +0,0 @@
-## copy this file to /etc/lighttpd to enable virtual hosting
-## make sure you set hostname correctly
-
-server.modules += ( "mod_simple_vhost" , "mod_fastcgi" )
-
-$HTTP["host"] =~ "^www\.example\.org$" {
- server.document-root = "/var/www/localhost/htdocs/redmine/public/"
- server.follow-symlink = "enable"
- server.indexfiles = ( "dispatch.fcgi" )
- server.error-handler-404 = "/dispatch.fcgi"
-
- fastcgi.server = (
- ".fcgi" => (
- "redmine" => (
- "bin-path" => "/usr/bin/ruby /var/www/localhost/htdocs/redmine/public/dispatch.fcgi",
- "socket" => "/tmp/redmine.socket",
- "min-procs" => 1,
- "max-procs" => 4,
- "idle-timeout" => 120,
- "check-local" => "disable",
- "bin-environment" => ( "RAILS_ENV" => "production" ),
- )
- )
- )
-}
-
diff --git a/main/redmine/redmine.initd b/main/redmine/redmine.initd
new file mode 100644
index 000000000..e54f0e8f4
--- /dev/null
+++ b/main/redmine/redmine.initd
@@ -0,0 +1,34 @@
+#!/sbin/runscript
+
+gem_path=$(gem env gemdir)
+name="unicorn_rails"
+start_script="$gem_path/bin/$name"
+app_dir="/usr/share/webapps/redmine"
+user="redmine"
+
+start() {
+ ebegin "Starting redmine"
+ start-stop-daemon --start --quiet \
+ -u $user \
+ -d $app_dir \
+ $start_script -- \
+ -D -E production
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping redmine"
+ start-stop-daemon --stop \
+ --name $name
+ eend $?
+ sleep 1
+}
+
+
+reload() {
+ ebegin "Reload redmine"
+ start-stop-daemon --signal USR2 \
+ --name $name
+ eend $?
+}
+
diff --git a/main/redmine/redmine.pre-install b/main/redmine/redmine.pre-install
new file mode 100644
index 000000000..70a392949
--- /dev/null
+++ b/main/redmine/redmine.pre-install
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+adduser -H -h /usr/share/webapps/redmine -s /bin/false -D redmine 2>/dev/null
+exit 0