aboutsummaryrefslogtreecommitdiffstats
path: root/main/redmine/APKBUILD
blob: bd8877f3cc0e5edc7a85e088d76e6543112e75a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=redmine
pkgver=2.1.2
pkgrel=3
pkgdesc="Project management web application written in Ruby"
url="http://redmine.org"
arch="noarch"
license="GPL2"
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="$pkgname.pre-install"
subpackages=""
pkgusers="$pkgname"
pkggroups="$pkgname"
source="http://rubyforge.org/frs/download.php/76495/redmine-$pkgver.tar.gz
	additional_environment.rb
	configuration.yml
	database.yml
	bundle.config
	$pkgname.initd"
_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/.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 $pkggroups -m640 -D "$srcdir"/database.yml \
		"$pkgdir"/etc/redmine/database.yml
	install -g $pkggroups -m644 -D "$srcdir"/configuration.yml \
		"$pkgdir"/etc/redmine/configuration.yml
	install -g $pkggroups -m644 -D "$srcdir"/additional_environment.rb \
		"$pkgdir"/etc/redmine/additional_environment.rb
	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"
	mkdir -p tmp tmp/pdf 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
	# 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
d05c255a62792410e2014e8e9c88cd9f  bundle.config
08833c0929543f3f42c6e7cb7f408aef  redmine.initd"