blob: 785432fdd5cbf7b0f5e94ef7b745e650233c77e1 (
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
|
# 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=4.6.1
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 serve COPS with'
'nginx: Web server to serve COPS with'
'cherokee: Web server to serve COPS with'
)
makedepends=(
'composer'
'libxml2' # for xmllint
)
backup=("etc/webapps/${_name}/local.php")
install="${_name}.install"
source=("${pkgname}_${pkgver}.zip::${url}/archive/refs/tags/${pkgver}.zip")
sha256sums=('dcd28014a655fa9b7f8e6b8ad18f4b5f6bc9d009b78be49a2796bc4745a5e2f2')
prepare () {
cd "${_github_name}-$pkgver"
# The external packages are requirements, and they cause composer errors if
# building in chroot, but we have them in deps so ignore them here
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"
}
|