upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / redmine / trunk / PKGBUILD
bloba9aa715daae7afba828604865c04217736cbd2cf
1 # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
2 # Contributor: Federico Cuello <fedux@fedux.com.ar>
4 pkgname=redmine
5 pkgver=5.0.5
6 pkgrel=1
7 pkgdesc="A flexible project management web application written using Ruby on Rails framework."
8 arch=('x86_64')
9 url="https://www.redmine.org"
10 license=('GPL2')
11 depends=('ruby2.7' 'imagemagick' 'libxml2' 'libxslt')
12 makedepends=('mariadb-libs' 'postgresql-libs' 'sqlite' 'systemd')
13 optdepends=('apache: A supported application server'
14             'nginx: A supported application server'
15             'mysql: MySQL database support'
16             'postgresql: PostgreSQL database support'
17             'sqlite: SQLite database support')
18 source=("$url/releases/$pkgname-$pkgver.tar.gz"
19         "Gemfile.local"
20         "redmine.service")
21 sha512sums=('95b7926008ac3ed53b091a05793ad2372a5e9a5194629811f3cefe38c3b550971f0eb424fb5f7eb9fec0c014632c694d90859945544cadae987f7ddff31d6ce4'
22             '1943883fdc5479f8acb4c256108b6ae054360eb7298b696bc3e16995dac0e51529b4a9f4c8e9158645a15d7b90fdcdaedb4502986a8a6dc4015671fae6861b6e'
23             '0e2ebbe34e096935977ad72448b345a8c4b050fbee24ad035cbab872447cad24efd24240a4e0ae5f9ee0bd098b5737305162affa91431ffa28d1bc86b334a3f9')
25 build() {
26     cd "$srcdir"/redmine-$pkgver
28     export PATH=/opt/ruby2.7/bin:$PATH
30     cp "${srcdir}"/Gemfile.local Gemfile.local
31     bundle-2.7 config set force_ruby_platform true
32     bundle-2.7 config build.nokogiri --use-system-libraries
33 #    bundle-2.7 config set without 'development test'
34 #    bundle-2.7 config set no-cache 'true'
35 #    bundle-2.7 config set deployment 'true'
36     bundle-2.7 lock
37     bundle-2.7 install --no-cache --deployment --without development test
40 package() {
41     install -dm 755 "$pkgdir"/usr/share/webapps/
43     rm "$srcdir"/redmine-$pkgver/vendor/bundle/ruby/2.7.0/extensions/*/*/*/{mkmf.log,gem_make.out}
44     rm -rf "$srcdir"/redmine-$pkgver/vendor/bundle/ruby/2.7.0/gems/*/ext/
46     cp -a --no-preserve=ownership "$srcdir"/redmine-$pkgver "$pkgdir"/usr/share/webapps/redmine
48     install -Dm0644 "${srcdir}"/redmine.service "${pkgdir}"/usr/lib/systemd/system/redmine.service
50     cd "$pkgdir"/usr/share/webapps/redmine
51     rm -rf files log
52     install -dm0755 -o http -g http "$pkgdir"/var/lib/redmine/files
53     install -dm0755 -o http -g http "$pkgdir"/var/log/redmine
54     mv tmp "$pkgdir"/var/lib/redmine/tmp
55     chown -R http:http "$pkgdir"/var/lib/redmine/tmp
56     ln -s /var/log/redmine log
57     ln -s /var/lib/redmine/files files
58     ln -s /var/lib/redmine/tmp tmp