To * workaround bug in CMake 3.13.3 * stay compatible with future CMake releases
90 lines
2.7 KiB
Bash
90 lines
2.7 KiB
Bash
# Maintainer: Martchus <martchus@gmx.net>
|
|
|
|
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
|
|
# you also find the URL of a binary repository.
|
|
|
|
_reponame=repoindex
|
|
pkgname=(repoindex{,-header,-web,-gui})
|
|
pkgver=0.2.6
|
|
pkgrel=1
|
|
arch=('i686' 'x86_64')
|
|
pkgdesc='Repository browser for Arch Linux'
|
|
license=('GPL')
|
|
depends=('qt5-websockets' 'qt5-webengine' 'karchive' 'c++utilities' 'qtutilities')
|
|
makedepends=('cmake' 'yuicompressor' 'qtutilities')
|
|
backup=("etc/${_reponame}.conf")
|
|
url="https://github.com/Martchus/${_reponame}"
|
|
options=(emptydirs)
|
|
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/Martchus/${_reponame}/archive/v${pkgver}.tar.gz")
|
|
sha256sums=('SKIP')
|
|
|
|
build() {
|
|
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
|
|
cmake \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DWEBVIEW_PROVIDER=webengine \
|
|
.
|
|
make
|
|
}
|
|
|
|
package_repoindex() {
|
|
pkgdesc="Repository browser for Arch Linux (provides server binary)."
|
|
depends=('qt5-base' 'qt5-websockets' 'karchive' 'c++utilities')
|
|
optdepends=('repoindex-header: header files')
|
|
optdepends=('repoindex-web: files for web UI')
|
|
optdepends=('repoindex-gui: application showing the web UI')
|
|
|
|
# install files
|
|
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
|
|
make DESTDIR="${pkgdir}" install-binary install-service install-config install-bash-completion
|
|
rm "$pkgdir/usr/bin/repoindex-gui"
|
|
|
|
# make directories for cache and data
|
|
mkdir -p "$pkgdir/var/cache/$_reponame"
|
|
chown http:http "$pkgdir/var/cache/$_reponame"
|
|
mkdir -p "$pkgdir/var/lib/$_reponame/sync"
|
|
chown http:http "$pkgdir/var/lib/$_reponame/"{,sync}
|
|
mkdir -p "$pkgdir/etc"
|
|
cp "$pkgdir/usr/share/$_reponame/skel/repoindex.conf.js" "$pkgdir/etc/repoindex.conf"
|
|
}
|
|
|
|
package_repoindex-header() {
|
|
arch=('any')
|
|
pkgdesc="Repository browser for Arch Linux (provides header files)"
|
|
depends=('repoindex')
|
|
backup=()
|
|
|
|
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
|
|
|
|
# install files
|
|
make DESTDIR="${pkgdir}" install-header
|
|
}
|
|
|
|
package_repoindex-web() {
|
|
arch=('any')
|
|
pkgdesc="Repository browser for Arch Linux (provides assets for web interface)"
|
|
depends=('repoindex')
|
|
backup=()
|
|
|
|
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
|
|
|
|
# install files
|
|
make DESTDIR="${pkgdir}" install-web
|
|
}
|
|
|
|
package_repoindex-gui() {
|
|
arch=('any')
|
|
pkgdesc="Repository browser for Arch Linux (provides an desktop app showing the web UI)"
|
|
depends=('repoindex-web' 'qt5-webengine')
|
|
install=${_reponame}.install
|
|
backup=()
|
|
|
|
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
|
|
|
|
# install files
|
|
make DESTDIR="${pkgdir}" install-binary install-desktop
|
|
rm -r "$pkgdir/usr/lib"
|
|
rm "$pkgdir/usr/bin/repoindex"
|
|
}
|