2015-08-26 21:21:22 +02:00
|
|
|
# Maintainer: Martchus <martchus@gmx.net>
|
2016-03-25 21:43:59 +01:00
|
|
|
|
|
|
|
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
|
|
|
|
# you also find the URL of a binary repository.
|
|
|
|
|
2015-12-02 02:20:30 +01:00
|
|
|
_reponame=repoindex
|
2016-02-27 02:47:18 +01:00
|
|
|
pkgname=(repoindex{,-header,-web,-gui})
|
2016-09-11 23:37:58 +02:00
|
|
|
_name=${pkgname%-git}
|
2016-02-27 21:08:28 +01:00
|
|
|
pkgver=0.2.1
|
2016-02-07 21:43:03 +01:00
|
|
|
pkgrel=1
|
2015-08-26 21:21:22 +02:00
|
|
|
arch=('i686' 'x86_64')
|
2016-09-11 23:37:58 +02:00
|
|
|
pkgdesc='Repository browser for Arch Linux'
|
2015-08-26 21:21:22 +02:00
|
|
|
license=('GPL')
|
2016-02-07 21:43:03 +01:00
|
|
|
depends=('qt5-base' 'qt5-websockets' 'karchive' 'pacman' 'c++utilities')
|
2016-04-20 00:32:19 +02:00
|
|
|
makedepends=('cmake' 'git' 'yuicompressor' 'qtutilities')
|
2016-02-22 18:34:09 +01:00
|
|
|
backup=("etc/${_reponame}.conf")
|
2016-09-11 23:37:58 +02:00
|
|
|
provides=("${_name}")
|
|
|
|
conflicts=("${_name}")
|
2015-12-02 02:20:30 +01:00
|
|
|
url="https://github.com/Martchus/${_reponame}"
|
2016-02-07 21:43:03 +01:00
|
|
|
options=(emptydirs)
|
2016-02-27 21:08:28 +01:00
|
|
|
source=("${_reponame}::git://github.com/Martchus/${_reponame}.git")
|
2015-08-27 22:41:20 +02:00
|
|
|
sha256sums=('SKIP')
|
2015-08-26 21:21:22 +02:00
|
|
|
|
|
|
|
pkgver() {
|
2015-12-24 16:50:30 +01:00
|
|
|
cd "${srcdir}/${pkgname}"
|
|
|
|
echo "$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
|
2015-08-26 21:21:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
2016-02-27 21:08:28 +01:00
|
|
|
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame}"
|
2016-04-20 00:32:19 +02:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/usr"
|
2016-02-27 02:47:18 +01:00
|
|
|
make
|
|
|
|
}
|
|
|
|
|
|
|
|
package_repoindex() {
|
2016-02-27 21:08:28 +01:00
|
|
|
pkgdesc="Repository browser for Arch Linux (provides server binary, git version)."
|
2016-02-27 02:47:18 +01:00
|
|
|
depends=('qt5-base' 'qt5-websockets' 'karchive' 'c++utilities')
|
|
|
|
optdepends=('repoindex-header: header files')
|
|
|
|
optdepends=('repoindex-web: file for web UI')
|
|
|
|
optdepends=('repoindex-gui: application showing the web UI')
|
2016-02-07 21:43:03 +01:00
|
|
|
|
|
|
|
# install files
|
2016-02-27 21:08:28 +01:00
|
|
|
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame}"
|
2016-10-03 14:23:34 +02:00
|
|
|
make DESTDIR="${pkgdir}" install-binary install-service install-config install-bash-completion
|
2016-02-07 21:43:03 +01:00
|
|
|
|
|
|
|
# make directories for cache and data
|
|
|
|
mkdir -p "$pkgdir/var/cache/$_reponame"
|
|
|
|
chown http:http "$pkgdir/var/cache/$_reponame"
|
2016-02-27 02:47:18 +01:00
|
|
|
mkdir -p "$pkgdir/var/lib/$_reponame/sync"
|
|
|
|
chown http:http "$pkgdir/var/lib/$_reponame/"{,sync}
|
2016-02-07 21:43:03 +01:00
|
|
|
mkdir -p "$pkgdir/etc"
|
|
|
|
cp "$pkgdir/usr/share/$_reponame/skel/repoindex.conf.js" "$pkgdir/etc/repoindex.conf"
|
2015-08-26 21:21:22 +02:00
|
|
|
}
|
|
|
|
|
2016-02-27 02:47:18 +01:00
|
|
|
package_repoindex-header() {
|
|
|
|
arch=('any')
|
2016-02-27 21:08:28 +01:00
|
|
|
pkgdesc="Repository browser for Arch Linux (provides header files, git version)"
|
2016-02-27 02:47:18 +01:00
|
|
|
depends=('repoindex')
|
|
|
|
backup=()
|
|
|
|
|
|
|
|
# must call cmake again to adjust install prefix
|
2016-02-27 21:08:28 +01:00
|
|
|
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame}"
|
2016-04-20 00:32:19 +02:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/usr"
|
2016-02-27 02:47:18 +01:00
|
|
|
|
|
|
|
# install files
|
2016-04-20 00:32:19 +02:00
|
|
|
make DESTDIR="${pkgdir}" install-header
|
2016-02-27 02:47:18 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
package_repoindex-web() {
|
2016-02-07 21:43:03 +01:00
|
|
|
arch=('any')
|
2016-02-27 21:08:28 +01:00
|
|
|
pkgdesc="Repository browser for Arch Linux (provides assets for web interface, git version)"
|
2016-02-07 21:43:03 +01:00
|
|
|
depends=('repoindex')
|
|
|
|
backup=()
|
|
|
|
|
|
|
|
# must call cmake again to adjust install prefix
|
2016-02-27 21:08:28 +01:00
|
|
|
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame}"
|
2016-04-20 00:32:19 +02:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/usr"
|
2016-02-07 21:43:03 +01:00
|
|
|
|
|
|
|
# install files
|
2016-04-20 00:32:19 +02:00
|
|
|
make DESTDIR="${pkgdir}" install-web
|
2015-08-26 21:21:22 +02:00
|
|
|
}
|
|
|
|
|
2016-02-27 02:47:18 +01:00
|
|
|
package_repoindex-gui() {
|
2016-02-27 21:08:28 +01:00
|
|
|
pkgdesc="Repository browser for Arch Linux (provides an desktop app showing the web UI, git version)"
|
2016-02-27 02:47:18 +01:00
|
|
|
depends=('repoindex-web' 'qt5-webengine')
|
|
|
|
install=${_reponame}.install
|
|
|
|
backup=()
|
|
|
|
|
|
|
|
# must call cmake again to adjust install prefix
|
2016-02-27 21:08:28 +01:00
|
|
|
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame}"
|
2016-04-20 00:32:19 +02:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/usr"
|
2016-02-27 02:47:18 +01:00
|
|
|
|
|
|
|
# install files
|
2016-04-20 00:32:19 +02:00
|
|
|
make DESTDIR="${pkgdir}" install-binary-gui install-desktop
|
2016-02-27 02:47:18 +01:00
|
|
|
}
|