Package Details: cops 1.1.3-1

Git Clone URL: https://aur.archlinux.org/cops.git (read-only, click to copy)
Package Base: cops
Description: Calibre OPDS (and HTML) PHP Server : web-based light alternative to Calibre content server / Calibre2OPDS to serve ebooks
Upstream URL: https://github.com/seblucas/cops
Licenses: GPL2
Submitter: koalaeagle
Maintainer: alerque
Last Packager: alerque
Votes: 2
Popularity: 0.000000
First Submitted: 2017-12-20 02:40 (UTC)
Last Updated: 2024-03-28 08:30 (UTC)

Dependencies (8)

Required by (0)

Sources (1)

Latest Comments

marcool04 commented on 2024-05-14 06:17 (UTC) (edited on 2024-05-14 09:29 (UTC) by marcool04)

There is a maintained and up to date fork: https://github.com/mikespub-org/seblucas-cops, something like this seems to work fine:

pkgname=cops-seblucas
_name="cops"
_github_name="seblucas-cops"
provides=('cops')
conflicts=('cops')
pkgver=2.6.1
pkgrel=1
pkgdesc='Lightweight Calibre OPDS (and HTML) PHP Server'
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}/config_local.php")
install="${_name}.install"
source=("${url}/archive/${pkgver}.tar.gz")
sha256sums=('44f1befbf8a7e301920c35aa31cc02d849b9b6bd29fc9e7cf5f7ad8e8f366306')

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 -Dm0644 config_local.php.example "$pkgdir/etc/webapps/cops/config_local.php"
    install -d "$pkgdir/usr/share/webapps"
    cp -r ./ "$pkgdir/usr/share/webapps/${_name}"
    rm -R "${pkgdir}/usr/share/webapps/${_name}/test"
    rm -R "${pkgdir}/usr/share/webapps/${_name}/tools"
    ln -s "/etc/webapps/${_name}/config_local.php" "$pkgdir/usr/share/webapps/${_name}/"
    ln -s "/etc/webapps/${_name}/metadata.db" "$pkgdir/usr/share/webapps/${_name}/"
}

MarsSeed commented on 2024-03-24 23:05 (UTC)

Broken (PKGBUILD fails).

Upstream not maintained since 2019; EOL since last year.

koalaeagle commented on 2018-08-02 21:05 (UTC)

I ran out of free time to sort out the kinks on this package. Feel free to take over.