aboutsummaryrefslogtreecommitdiffstats
path: root/main/redmine/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/redmine/APKBUILD')
-rw-r--r--main/redmine/APKBUILD85
1 files changed, 85 insertions, 0 deletions
diff --git a/main/redmine/APKBUILD b/main/redmine/APKBUILD
new file mode 100644
index 0000000000..b3bd5a13f5
--- /dev/null
+++ b/main/redmine/APKBUILD
@@ -0,0 +1,85 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=redmine
+pkgver=1.2.0
+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
+ lighttpd rubygems"
+depends_dev=
+makedepends="$depends_dev"
+install=""
+subpackages=""
+source="http://rubyforge.org/frs/download.php/74944/redmine-$pkgver.tar.gz
+ additional_environment.rb
+ configuration.yml
+ database.yml
+ 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"/var/log \
+ "$pkgdir"/etc/lighttpd \
+ "$pkgdir"/var/www/localhost/htdocs
+ # move app to webapps dir
+ mv * "$pkgdir/$_webapps/$pkgname"
+ # install default config to /etc/redmine
+ install -m644 -D "$srcdir"/database.yml \
+ "$pkgdir"/etc/redmine/database.yml
+ install -m644 -D "$srcdir"/configuration.yml \
+ "$pkgdir"/etc/redmine/configuration.yml
+ install -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
+ # move redmine log to /var/log
+ cd "$pkgdir/$_webapps/$pkgname"
+ 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 \
+ "$pkgdir/$_webapps/$pkgname" \
+ "$pkgdir"/var/log/"$pkgname" \
+ "$pkgdir"/etc/"$pkgname"
+}
+
+md5sums="9d9809a6137c75f754a7fb6c0acc1d6c redmine-1.2.0.tar.gz
+b9ca61be7418969188c74c110e3fe3a5 additional_environment.rb
+69243d1b5b9b111da631c7034d51ba71 configuration.yml
+4c4b10aadbc229ea75f309ff1fafcd7a database.yml
+f43ad7e5875b46b723c69b3a9b5e52f2 lighttpd-virtual.conf"