aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/redmine/APKBUILD52
-rw-r--r--main/redmine/bundle.config3
-rw-r--r--main/redmine/lighttpd-virtual.conf26
-rw-r--r--main/redmine/redmine.initd34
4 files changed, 61 insertions, 54 deletions
diff --git a/main/redmine/APKBUILD b/main/redmine/APKBUILD
index 9018cb8016..ffe39c3b76 100644
--- a/main/redmine/APKBUILD
+++ b/main/redmine/APKBUILD
@@ -2,25 +2,26 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=redmine
pkgver=2.1.2
-pkgrel=1
+pkgrel=2
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"
depends_dev=
makedepends="$depends_dev ruby-gems"
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 +43,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"
+d05c255a62792410e2014e8e9c88cd9f bundle.config
+08833c0929543f3f42c6e7cb7f408aef redmine.initd"
diff --git a/main/redmine/bundle.config b/main/redmine/bundle.config
new file mode 100644
index 0000000000..6418c5964d
--- /dev/null
+++ b/main/redmine/bundle.config
@@ -0,0 +1,3 @@
+---
+BUNDLE_WITHOUT: development:test:postgresql:sqlite:mysql
+
diff --git a/main/redmine/lighttpd-virtual.conf b/main/redmine/lighttpd-virtual.conf
deleted file mode 100644
index be0c684b0c..0000000000
--- 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 0000000000..e54f0e8f49
--- /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 $?
+}
+