blob: 305b7ebe702ab13ffff2e1208dee9bf85fb0bcd8 (
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
|
# Maintainer: Caleb Maclennan <caleb@alerque.com>
# Contributor: Scott Dickson <scottfoesho@gmail.com>
pkgname=cops-mikespub-org
_name="cops"
_github_name="seblucas-cops"
provides=('cops')
conflicts=('cops')
pkgver=3.5.4
pkgrel=1
pkgdesc='Lightweight Calibre OPDS (and HTML) PHP Server (mikespub.org fork)'
arch=('any')
url="https://github.com/mikespub-org/$_github_name"
license=('GPL-2.0-or-later')
depends=(
'php'
'php-gd'
'php-intl'
'php-sqlite'
)
optdepends=(
'apache: Web server to run COPS'
'nginx: Web server to run COPS'
'cherokee: Web server to run COPS'
)
makedepends=('composer')
backup=("etc/webapps/${_name}/local.php")
install="${_name}.install"
source=("${url}/archive/refs/tags/${pkgver}.zip")
sha256sums=('0d02623584c7e6ed20fcfb04295626a550fef8d375d3d682c524de06ddc5ca4f')
prepare () {
cd "${_github_name}-$pkgver"
# The external packages are requirements, and they cause composer errors if
# building in chroot
composer update --no-dev \
--ignore-platform-req=ext-gd \
--ignore-platform-req=ext-intl \
--ignore-platform-req=ext-pdo_sqlite \
--ignore-platform-req=ext-iconv
}
build () {
cd "${_github_name}-$pkgver"
composer install --no-dev --optimize-autoloader \
--ignore-platform-req=ext-gd \
--ignore-platform-req=ext-intl \
--ignore-platform-req=ext-pdo_sqlite \
--ignore-platform-req=ext-iconv
}
package () {
cd "${_github_name}-$pkgver"
install -d "$pkgdir/etc/webapps/${_name}/"
install -d "$pkgdir/usr/share/webapps"
cp -r ./ "$pkgdir/usr/share/webapps/${_name}"
cp "$pkgdir/usr/share/webapps/${_name}/config/local.php.example" "$pkgdir/etc/webapps/${_name}/local.php"
ln -s "/etc/webapps/${_name}/local.php" "$pkgdir/usr/share/webapps/${_name}/config/local.php"
rm -R "${pkgdir}/usr/share/webapps/${_name}/tests"
rm -R "${pkgdir}/usr/share/webapps/${_name}/tools"
}
|