Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PKGBUILD-git to use the fixes to CMakeLists #4

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 34 additions & 27 deletions PKGBUILD-git
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

_pkgname="hyprland"
pkgname="${_pkgname}-git"
pkgver=r1181.gee15ad1
pkgver=r2910.642030f9
pkgrel=1
pkgdesc="A dynamic tiling Wayland compositor based on wlroots that doesn't sacrifice on its looks."
arch=(any)
arch=(x86_64)
url="https://github.com/hyprwm/Hyprland"
license=('BSD')
depends=(
Expand Down Expand Up @@ -48,39 +48,46 @@ makedepends=(
vulkan-headers
wayland-protocols
xorgproto)
source=("${_pkgname}::git+https://github.com/hyprwm/Hyprland.git")
source=("${_pkgname}::git+https://github.com/hyprwm/Hyprland.git"
"git+https://github.com/hyprwm/hyprland-protocols.git"
"git+https://github.com/canihavesomecoffee/udis86.git"
"git+https://gitlab.freedesktop.org/wlroots/wlroots.git")
conflicts=("${_pkgname}")
provides=(hyprland)
sha256sums=('SKIP')
options=(!makeflags !buildflags !strip)
sha256sums=('SKIP'
'SKIP'
'SKIP'
'SKIP')

pkgver() {
cd "$_pkgname"
( set -o pipefail
git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
)
cd "$_pkgname"
(
set -o pipefail
git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
)
}

prepare() {
cd "$srcdir/$_pkgname"
git submodule init

git config submodule."subprojects/hyprland-protocols".url "$srcdir/hyprland-protocols"
git config submodule."subprojects/udis86".url "$srcdir/udis86"
git config submodule.wlroots.url "$srcdir/wlroots"
git -c protocol.file.allow=always submodule update
}

build() {
cd "${srcdir}/${_pkgname}"
git submodule update --init
make fixwlr
cd "./subprojects/wlroots/" && meson build/ --prefix="${srcdir}/tmpwlr" --buildtype=release && ninja -C build/ && mkdir -p "${srcdir}/tmpwlr" && ninja -C build/ install && cd ../../
make protocols
make release
cd ./hyprctl && make all && cd ..
cmake -B build -S "$_pkgname" \
-DCMAKE_BUILD_TYPE='None' \
-DCMAKE_INSTALL_PREFIX='/usr' \
-Wno-dev

cmake --build build
}

package() {
cd "${srcdir}/${_pkgname}"
mkdir -p "${pkgdir}/usr/share/wayland-sessions"
mkdir -p "${pkgdir}/usr/share/hyprland"
install -Dm755 build/Hyprland -t "${pkgdir}/usr/bin"
install -Dm755 hyprctl/hyprctl -t "${pkgdir}/usr/bin"
install -Dm644 assets/*.png -t "${pkgdir}/usr/share/hyprland"
install -Dm644 example/hyprland.desktop -t "${pkgdir}/usr/share/wayland-sessions"
install -Dm644 example/hyprland.conf -t "${pkgdir}/usr/share/hyprland"
install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${_pkgname}"
install -Dm755 ../tmpwlr/lib/libwlroots.so.11032 -t "${pkgdir}/usr/lib"
install -Dm644 "$srcdir/$_pkgname/LICENSE" -t "$pkgdir/usr/share/licenses/$_pkgname"
DESTDIR="$pkgdir" cmake --install build
}