aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2011-06-14 18:28:01 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2011-06-14 18:29:23 +0000
commit9c3e6f8ffd367156df4398a5fbdc687dae4b6504 (patch)
tree5cd43e48fe356d2b584a4d5a9ebd46fb931ebae5 /testing
parentfbe6c6e97782858de5b7a1994a53172a82dc1bc4 (diff)
downloadaports-9c3e6f8ffd367156df4398a5fbdc687dae4b6504.tar.bz2
aports-9c3e6f8ffd367156df4398a5fbdc687dae4b6504.tar.xz
testing/redmine: new aport
Diffstat (limited to 'testing')
-rw-r--r--testing/redmine/APKBUILD68
-rw-r--r--testing/redmine/lighttpd-virtual.conf26
2 files changed, 94 insertions, 0 deletions
diff --git a/testing/redmine/APKBUILD b/testing/redmine/APKBUILD
new file mode 100644
index 0000000000..6c60b3c954
--- /dev/null
+++ b/testing/redmine/APKBUILD
@@ -0,0 +1,68 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=redmine
+pkgver=1.2.0
+pkgrel=0
+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
+ lighttpd"
+depends_dev=
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://rubyforge.org/frs/download.php/74944/redmine-$pkgver.tar.gz
+ lighttpd-virtual.conf"
+_webapps="usr/share/webapps"
+
+_builddir="$srcdir"/redmine-$pkgver
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ #nothing to do here
+ return 0
+}
+
+package() {
+ cd "$_builddir"
+ mkdir -p "$pkgdir/$_webapps/$pkgname" \
+ "$pkgdir"/etc \
+ "$pkgdir"/var/log \
+ "$pkgdir"/etc/lighttpd \
+ "$pkgdir"/var/www/localhost/htdocs
+ # move redmine config to etc
+ mv config "$pkgdir"/etc/$pkgname
+ ln -s /etc/redmine \
+ "$pkgdir/$_webapps/$pkgname"/config
+ # move redmine log to /var/log
+ mv log "$pkgdir"/var/log/$pkgname
+ ln -s /var/log/redmine \
+ "$pkgdir/$_webapps/$pkgname"/log
+ # move rest of files to webapps dir
+ mv * "$pkgdir/$_webapps/$pkgname"
+ # symlink redmine to htdocs dir
+ ln -s /$_webapps/$pkgname \
+ "$pkgdir"/var/www/localhost/htdocs/$pkgname
+ #
+ chown -R lighttpd:lighttpd \
+ "$pkgdir/$_webapps/$pkgname" \
+ "$pkgdir"/var/log/$pkgname \
+ "$pkgdir"/etc/$pkgname
+ # example lighttpd config for redmine virtual hosting
+ cp "$srcdir"/lighttpd-virtual.conf \
+ "$pkgdir"/etc/lighttpd/redmine-virtual.conf
+}
+
+md5sums="9d9809a6137c75f754a7fb6c0acc1d6c redmine-1.2.0.tar.gz
+f43ad7e5875b46b723c69b3a9b5e52f2 lighttpd-virtual.conf"
diff --git a/testing/redmine/lighttpd-virtual.conf b/testing/redmine/lighttpd-virtual.conf
new file mode 100644
index 0000000000..be0c684b0c
--- /dev/null
+++ b/testing/redmine/lighttpd-virtual.conf
@@ -0,0 +1,26 @@
+## 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" ),
+ )
+ )
+ )
+}
+