PKGBUILDs/repoindex/git/PKGBUILD

103 lines
3.2 KiB
Bash
Raw Normal View History

2015-08-26 21:21:22 +02:00
# 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.
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}
2019-08-25 13:31:45 +02:00
pkgver=0.2.6
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')
depends=('qt5-base' 'qt5-websockets' 'karchive' 'pacman' 'c++utilities-git')
makedepends=('cmake' 'ninja' 'git' 'yuicompressor' 'qtutilities-git')
2016-02-22 18:34:09 +01:00
backup=("etc/${_reponame}.conf")
#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)
source=("${_reponame}::${MARTCHUS_GIT_URL_PREFIX:-git+https://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}"
cmake \
-G Ninja \
-DCMAKE_BUILD_TYPE:STRING='Release' \
-DCMAKE_INSTALL_PREFIX:PATH='/usr' \
-DCONFIGURATION_NAME:STRING='git' \
-DCONFIGURATION_PACKAGE_SUFFIX:STRING='-git' \
-DCONFIGURATION_TARGET_SUFFIX:STRING='git' \
-DBUILD_SHARED_LIBS:BOOL=ON \
.
ninja
2016-02-27 02:47:18 +01:00
}
package_repoindex() {
2016-02-27 21:08:28 +01:00
pkgdesc="Repository browser for Arch Linux (provides server binary, git version)."
depends=('qt5-base' 'qt5-websockets' 'karchive' 'c++utilities-git')
2016-02-27 02:47:18 +01:00
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}"
DESTDIR="${pkgdir}" ninja 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
DESTDIR="${pkgdir}" ninja 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
DESTDIR="${pkgdir}" ninja 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')
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
DESTDIR="${pkgdir}" ninja install-binary-gui install-desktop
2016-02-27 02:47:18 +01:00
}