Created
March 31, 2022 17:15
-
-
Save bobpaul/aa3ef3592e906ff5c418dbb936dc5af4 to your computer and use it in GitHub Desktop.
updated PKGBUILD for barrier-git and barrier-headless-git 20220331
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Pellegrino Prevete <[email protected]> | |
_pkgname=barrier | |
pkgname=("${_pkgname}-git" "${_pkgname}-headless-git") | |
pkgver=v2.4.0+165+g420de96f | |
pkgrel=1 | |
pkgdesc="Open-source KVM software based on Synergy" | |
arch=(any) | |
url="https://github.com/input-leap/barrier" | |
license=("custom:GPL2WithOpenSSLException") | |
source=( | |
"${pkgname}::git+${url}.git" | |
) | |
sha512sums=('SKIP') | |
depends=( | |
# Barrier core dependencies: | |
curl | |
avahi | |
libx11 | |
libxrandr | |
libxext | |
libxinerama | |
xorgproto | |
libxtst | |
libxi | |
libsm | |
libice | |
openssl | |
) | |
makedepends=( | |
cmake | |
gmock | |
gtest | |
# Barrier GUI dependencies: | |
qt5-base | |
hicolor-icon-theme | |
) | |
pkgver() { | |
cd "${_pkgname}-git" | |
git describe --tags | sed 's/-/+/g' | |
} | |
prepare() { | |
cd "${_pkgname}-git" | |
git submodule update --init --recursive | |
for patch in "${srcdir?}"/*.patch; do | |
if [ -f "${patch?}" ]; then | |
patch -Np1 -i "${patch?}" | |
fi | |
done | |
} | |
build() { | |
cd "${_pkgname}-git" | |
mkdir -p build | |
cd build | |
cmake -G "Unix Makefiles" \ | |
-D CMAKE_BUILD_TYPE:STRING=Release \ | |
-D CMAKE_INSTALL_PREFIX:STRING=/usr \ | |
-D BARRIER_REVISION:STRING=00000000 \ | |
-D BARRIER_VERSION_STAGE:STRING=RELEASE \ | |
-D BARRIER_USE_EXTERNAL_GTEST:bool=true \ | |
.. | |
make | |
} | |
_package_common() { | |
# Install binaries: | |
cd "${_pkgname}-git/build" | |
DESTDIR="${pkgdir?}" make install | |
# Install the license: | |
cd .. | |
install -m 644 -D LICENSE "${pkgdir?}/usr/share/licenses/${pkgname?}/LICENSE" | |
# Install the manpages: | |
mkdir -p "${pkgdir?}/usr/share/man/man1" | |
install -m 644 doc/*.1 "${pkgdir?}/usr/share/man/man1" | |
# Install the examples: | |
mkdir -p "${pkgdir?}/usr/share/doc/${pkgname?}" | |
install -m 644 doc/barrier.conf* "${pkgdir?}/usr/share/doc/${pkgname?}" | |
} | |
package_barrier-headless-git() { | |
pkgdesc="Open-source KVM software based on Synergy (client and server CLI binaries)" | |
provides=('barrier-headless') | |
conflicts=('barrier-headless') | |
# Install all the files: | |
_package_common | |
# Now go and delete the GUI-related files: | |
for file in \ | |
/usr/bin/barrier \ | |
/usr/share/applications \ | |
/usr/share/icons \ | |
;do | |
rm -rf "${pkgdir:?}/${file:?}" | |
done | |
} | |
package_barrier-git() { | |
pkgdesc="Open-source KVM software based on Synergy (GUI)" | |
depends=( | |
"barrier-headless-git" | |
qt5-base | |
hicolor-icon-theme | |
) | |
provides=('barrier') | |
conflicts=('barrier') | |
# Install all the files: | |
_package_common | |
# Now go and delete files that are already in | |
# barrier-headless: | |
for file in \ | |
/usr/share/doc \ | |
/usr/share/man \ | |
/usr/bin/barrier{s,c} \ | |
;do | |
rm -rf "${pkgdir:?}/${file:?}" | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment