blob: d3dae22dd5d15e2dc048442a75626d5f4d42d9b5 (
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
# Maintainer: David Runge <dvzrv@archlinux.org>
# Contributor: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
pkgname=flyspray
pkgver=1.0rc11
pkgrel=1
pkgdesc='Lightweight, web-based bug tracking system written in PHP'
url="https://www.flyspray.org/"
arch=('any')
license=('LGPL2.1')
depends=('php' 'php-gd')
makedepends=('composer' 'unzip')
optdepends=('graphviz: plot task dependency graphs'
'mariadb: use local MariaDB database'
'php-fpm: run with FastCGI process manager'
'php-pgsql: use PostgreSQL database'
'postgresql: use local PostgreSQL database'
'uwsgi-plugin-php: run in application container')
backup=("etc/webapps/${pkgname}/.htaccess"
"etc/webapps/${pkgname}/${pkgname}.conf.php")
install="${pkgname}.install"
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/${pkgname}/${pkgname}/archive/v${pkgver/rc/-rc}.tar.gz"
"${pkgname}.sysusers"
"${pkgname}.tmpfiles"
"${pkgname}.uwsgi")
sha512sums=('8d3d59db1ec1b5aefddd8a250a4aa3c08bcc05293bb4e6845b03f80f733d1998873f00d925255e550ebf014027961b67c2687c5fede08aa6a8606d52ec26e9c2'
'ee23df991c6a42bfb139caabad861a3f945ea18d81061fdb90ace8430d4225e7db322802de4fdf36aa8191cbedab3cafd025c76f08806b7fcdb88f6eb185519e'
'65d333b98a93cc320300bacc8d142f7150e31f4a65da96f09ab0c88e6556a120a5cab8d2c871840753eb4eec6a281d0731b1ab5524834f1281f2d073ba4983f0'
'a236f32e46b1ef9574fde8201c18f09edcd72ad2a53fc5c88f1b8da7540ac55a936da69e3af096b1c73155882cdfe3343dd2f0242de9b6b7ca6713752a1a3343')
b2sums=('627b6aaa2a79ccb314b15c8e3e505485171a2bb98abc4f0487fff2b9a6a0c1b574dda5900326127b8d12e04eac3239c8a41aea026315e2650691a5335b14db17'
'93ab7184cceaa6148dcf4161fe6a680cae105859697373021b9f027d85bbad0f0c7ee02b7800305df26858c1b39e70dd4dadf2f539f6659215d159ac6a3151c5'
'f2c6b9137747aca24875d113251011b1759402372d25de3771ce5d11461fdc530ca000c3490f8b76d567302c8abf3ba95d5a0f831d34164225a99516745f38f3'
'075ca6cc87246491d5981414ff3e0cd84ce466034fc8afe025fc9d272f295a13d6e19496c8abe3c8db8fbd9a9c1b579c78230f06797527722bae7817255f4e47')
prepare() {
mv -v "${pkgname}-${pkgver/rc/-rc}" "${pkgname}-${pkgver}"
touch "${pkgname}.conf.php"
cd "${pkgname}-${pkgver}"
# removing forced redirect, if setup/index.php is accessible.
# access to it should be denied via the webserver settings
sed -e '45,82d' -i header.php
}
build() {
cd "${pkgname}-${pkgver}"
php -d 'extension=gd' /usr/bin/composer install --no-dev
}
package() {
cd "${pkgname}-${pkgver}"
# sysusers.d integration
install -vDm 644 ../${pkgname}.sysusers \
"${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
# tmpfiles.d integration
install -vDm 644 ../${pkgname}.tmpfiles \
"${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"
# uwsgi integration
install -vDm 644 ../${pkgname}.uwsgi \
"${pkgdir}/etc/uwsgi/${pkgname}.ini"
# docs
install -vDm 644 {docs/*.txt,README.md} \
-t "${pkgdir}/usr/share/doc/${pkgname}"
rm -rv docs
install -vdm 755 "${pkgdir}/usr/share/webapps/${pkgname}/"
# state
install -vdm 750 "${pkgdir}/var/lib/${pkgname}/attachments/"
install -vDm 644 attachments/{.htaccess,index.html} \
-t "${pkgdir}/var/lib/${pkgname}/attachments/"
rm -rv attachments
ln -sv "/var/lib/${pkgname}/attachments" \
"${pkgdir}/usr/share/webapps/${pkgname}/attachments"
install -vdm 750 "${pkgdir}/var/lib/${pkgname}/avatars/"
install -vDm 644 avatars/index.html \
-t "${pkgdir}/var/lib/${pkgname}/avatars/"
rm -rv avatars
ln -sv "/var/lib/${pkgname}/avatars" \
"${pkgdir}/usr/share/webapps/${pkgname}/avatars"
# cache
install -vdm 750 "${pkgdir}/var/cache/${pkgname}"
install -vDm 644 cache/index.html \
-t "${pkgdir}/var/cache/${pkgname}/"
rm -rv cache
ln -sv "/var/cache/${pkgname}" \
"${pkgdir}/usr/share/webapps/${pkgname}/cache"
# config
install -vDm 644 htaccess.dist "${pkgdir}/etc/webapps/${pkgname}/.htaccess"
rm -v htaccess.dist
ln -sv /etc/webapps/${pkgname}/.htaccess \
"${pkgdir}/usr/share/webapps/${pkgname}/.htaccess"
install -vDm 660 "../${pkgname}.conf.php" \
-t "${pkgdir}/etc/webapps/${pkgname}"
ln -sv /etc/webapps/${pkgname}/${pkgname}.conf.php \
"${pkgdir}/usr/share/webapps/${pkgname}/${pkgname}.conf.php"
# install webapp
find . -type f -exec install -vDm 644 {} "${pkgdir}/usr/share/webapps/${pkgname}/"{} \;
# remove unneeded files
find "${pkgdir}/usr/share/webapps/${pkgname}" -type f \
\( \
-iname "*.py" -or \
-iname "*.gitignore" -or \
-iname "*.travis.yml" -or \
-iname "*composer.lock" -or \
-iname "*composer.json" \
\) \
-delete
}
# vim: ts=2 sw=2 et:
|