hyprland package build script and needed build dependencies.
The hyprland build script uses gbp commands to debianize and build upstream hyprland from github. The supporting buildscripts use dh_make and dpkg-buildpackage only.
This commit is contained in:
parent
1e344844dc
commit
b2c2d781dd
|
|
@ -0,0 +1,93 @@
|
|||
#!/usr/bin/env bash
|
||||
set -x
|
||||
|
||||
# Install deps
|
||||
sudo apt install -y \
|
||||
cmake \
|
||||
dh-cmake \
|
||||
git \
|
||||
build-essential \
|
||||
libcairo2 \
|
||||
libcairo2-dev \
|
||||
libzip4 \
|
||||
libzip-dev \
|
||||
librsvg2-2 \
|
||||
librsvg2-dev \
|
||||
libtomlplusplus-dev \
|
||||
libtomlplusplus3
|
||||
|
||||
# Set github user and project name
|
||||
USER="hyprwm"
|
||||
PROJECT="hyprcursor"
|
||||
LICENSE="bsd"
|
||||
HOMEPAGE="https://github.com/hyprwm/hyprcursor"
|
||||
BUILD_HOME="/var/tmp/hyprcursor-git_build"
|
||||
PACKAGE="hyprcursor"
|
||||
VERSION=$(curl "https://api.github.com/repos/${USER}/${PROJECT}/tags?per_page=5" | jq -r '.[0] | .name')
|
||||
VERSION=${VERSION:1} # strip the preceding 'v'
|
||||
SECTION="x11/wm"
|
||||
DEBEMAIL="cyteen@ring-zero.xo.uk"
|
||||
DEBFULLNAME="Cyteen May"
|
||||
DESCRIPTION="Hyprcursor is a cursor theme format."
|
||||
LONG_DESCRIPTION="Hyprcursor is an efficient cursor theme format that addresses the limitations of XCursor, including poor scaling, lack of support for vector cursors, and high space inefficiency."
|
||||
|
||||
# Make the BUILD_HOME directory and clone upstream
|
||||
mkdir -p ${BUILD_HOME}
|
||||
cd ${BUILD_HOME} || exit
|
||||
|
||||
git clone https://github.com/${USER}/${PROJECT}.git ${PACKAGE}-${VERSION}
|
||||
|
||||
cd ${PACKAGE}-${VERSION} || exit
|
||||
|
||||
# debianize the BUILD_HOME directory
|
||||
dh_make \
|
||||
--createorig \
|
||||
--single \
|
||||
--native \
|
||||
--copyright ${LICENSE} \
|
||||
--yes
|
||||
|
||||
# Customize the debian directory values
|
||||
sed -i 's|^\(Section: \).*|\1'${SECTION}'|' debian/control
|
||||
sed -i "s|^\(Maintainer: \).*|\1'${DEBFULLNAME}\ \<${DEBEMAIL}\>'|" debian/control
|
||||
sed -i 's|^\(Homepage: \).*|\1'${HOMEPAGE}'|' debian/control
|
||||
# sed -i "s,^\(Description: \).*,\1${DESCRIPTION}," debian/control
|
||||
# sed -i "s|.*insert long.*|${LONG_DESCRIPTION}|" debian/control
|
||||
sed -i "s|<insert up to 60 chars description>|${DESCRIPTION}|" debian/control
|
||||
sed -i "s|<Insert long description, indented with spaces.>|${LONG_DESCRIPTION}|" debian/control
|
||||
|
||||
cat <<'EOF' >debian/rules
|
||||
#!/usr/bin/make -f
|
||||
|
||||
# Uncomment and adjust the following lines as needed
|
||||
#export DH_VERBOSE = 1
|
||||
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
|
||||
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
|
||||
|
||||
%:
|
||||
dh $@ --buildsystem=cmake
|
||||
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure -- \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_HOST_MULTIARCH)"
|
||||
EOF
|
||||
|
||||
# Build and install Hyprcursor using CMake
|
||||
# cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build
|
||||
# cmake --build ./build --config Release --target all -j$(nproc 2>/dev/null || getconf NPROCESSORS_CONF)
|
||||
# sudo cmake --install build
|
||||
|
||||
cat <<EOF >debian/watch
|
||||
version=4
|
||||
opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/${PROJECT}-$1\.tar\.gz/ \
|
||||
https://github.com/${USER}/${PROJECT}/tags .*/v?(\d\S+)\.tar\.gz
|
||||
EOF
|
||||
|
||||
DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -us -uc -b
|
||||
|
||||
echo ${PACKAGE}_${VERSION}_amd64.deb
|
||||
|
||||
sudo dpkg -i ../${PACKAGE}_${VERSION}_amd64.deb
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
#!/usr/bin/env bash
|
||||
set -x
|
||||
|
||||
# Install deps
|
||||
sudo apt install -y \
|
||||
meson \
|
||||
ninja-build \
|
||||
libwayland-dev \
|
||||
libwayland-egl-backend-dev \
|
||||
libwayland-client-dev \
|
||||
libwayland-server-dev \
|
||||
wayland-protocols \
|
||||
wayland-scanner \
|
||||
git
|
||||
|
||||
# Set github user and project name
|
||||
USER="hyprwm"
|
||||
PROJECT="hyprland-protocols"
|
||||
LICENSE="bsd"
|
||||
SECTION="x11/wm"
|
||||
HOMEPAGE="https://github.com/hyprwm/hyprland-protocols"
|
||||
BUILD_HOME="/var/tmp/hyprland-protocols-git_build"
|
||||
PACKAGE="hyprland-protocols"
|
||||
VERSION=$(curl "https://api.github.com/repos/${USER}/${PROJECT}/tags?per_page=5" | jq -r '.[0] | .name')
|
||||
VERSION=${VERSION:1} # strip the preceding 'v'
|
||||
DEBEMAIL="cyteen@ring-zero.co.uk"
|
||||
DEBFULLNAME="Cyteen May"
|
||||
DESCRIPTION="Hyprland Protocols, Wayland protocols used by Hyprland."
|
||||
LONG_DESCRIPTION="This repository holds protocols used by Hyprland to bridge the gap between Hyprland and KDE/Gnome's functionality. It includes protocols for exporting toplevel buffers for screensharing and managing global keybinds via D-Bus."
|
||||
|
||||
# Make the BUILD_HOME directory and clone upstream
|
||||
mkdir -p ${BUILD_HOME}
|
||||
cd ${BUILD_HOME} || exit
|
||||
|
||||
git clone https://github.com/${USER}/${PROJECT}.git ${PACKAGE}-${VERSION}
|
||||
|
||||
cd ${PACKAGE}-${VERSION} || exit
|
||||
|
||||
# debianize the BUILD_HOME directory
|
||||
dh_make \
|
||||
--createorig \
|
||||
--single \
|
||||
--native \
|
||||
--copyright ${LICENSE} \
|
||||
--yes
|
||||
|
||||
# Customize the debian directory values
|
||||
sed -i "s,^\(Description: \).*,\1${DESCRIPTION}," debian/control
|
||||
sed -i 's,^\(Section: \).*,\1'${SECTION}',' debian/control
|
||||
sed -i "s,^\(Maintainer: \).*,\1'${DEBFULLNAME}\ \<${DEBEMAIL}\>'," debian/control
|
||||
sed -i 's,^\(Homepage: \).*,\1'${HOMEPAGE}',' debian/control
|
||||
sed -i "s|.*insert long.*|${LONG_DESCRIPTION}|" debian/control
|
||||
|
||||
cat <<'EOF' >debian/rules
|
||||
#!/usr/bin/make -f
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure -- \
|
||||
-Ddefault_library=both
|
||||
EOF
|
||||
|
||||
cat <<EOF >debian/watch
|
||||
version=4
|
||||
opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/${PROJECT}-$1\.tar\.gz/ \
|
||||
https://github.com/${USER}/${PROJECT}/tags .*/v?(\d\S+)\.tar\.gz
|
||||
EOF
|
||||
|
||||
dpkg-buildpackage -us -uc -b
|
||||
|
||||
echo ${PACKAGE}_${VERSION}_amd64.deb
|
||||
|
||||
sudo dpkg -i ../${PACKAGE}_${VERSION}_amd64.deb
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,89 @@
|
|||
#!/usr/bin/env bash
|
||||
set -x
|
||||
|
||||
# Install deps
|
||||
sudo apt install -y \
|
||||
cmake \
|
||||
dh-cmake \
|
||||
git \
|
||||
build-essential \
|
||||
libcairo2 \
|
||||
libcairo2-dev \
|
||||
libzip4 \
|
||||
libzip-dev \
|
||||
librsvg2-2 \
|
||||
librsvg2-dev
|
||||
|
||||
# Set github user and project name
|
||||
USER="hyprwm"
|
||||
PROJECT="hyprlang"
|
||||
LICENSE="gpl3"
|
||||
HOMEPAGE="https://github.com/hyprwm/hyprlang"
|
||||
BUILD_HOME="/var/tmp/hyprlang-git_build"
|
||||
PACKAGE="hyprlang"
|
||||
VERSION=$(curl "https://api.github.com/repos/${USER}/${PROJECT}/tags?per_page=5" | jq -r '.[0] | .name')
|
||||
VERSION=${VERSION:1} # strip the preceding 'v'
|
||||
SECTION="x11/wm"
|
||||
DEBEMAIL="cyteen@ring-zero.co.uk"
|
||||
DEBFULLNAME="Cyteen May"
|
||||
DESCRIPTION="A configuration language for linux applications."
|
||||
LONG_DESCRIPTION="Hyprlang is an extremely efficient, yet easy to work with, configuration language for Linux applications."
|
||||
|
||||
# Make the BUILD_HOME directory and clone upstream
|
||||
mkdir -p ${BUILD_HOME}
|
||||
cd ${BUILD_HOME} || exit
|
||||
|
||||
git clone https://github.com/${USER}/${PROJECT}.git ${PACKAGE}-${VERSION}
|
||||
|
||||
cd ${PACKAGE}-${VERSION} || exit
|
||||
|
||||
# debianize the BUILD_HOME directory
|
||||
dh_make \
|
||||
--createorig \
|
||||
--single \
|
||||
--native \
|
||||
--copyright ${LICENSE} \
|
||||
--yes
|
||||
|
||||
# Customize the debian directory values
|
||||
sed -i "s,^\(Description: \).*,\1${DESCRIPTION}," debian/control
|
||||
sed -i 's,^\(Section: \).*,\1'${SECTION}',' debian/control
|
||||
sed -i "s,^\(Maintainer: \).*,\1'${DEBFULLNAME}\ \<${DEBEMAIL}\>'," debian/control
|
||||
sed -i 's,^\(Homepage: \).*,\1'${HOMEPAGE}',' debian/control
|
||||
sed -i "s|.*insert long.*|${LONG_DESCRIPTION}|" debian/control
|
||||
|
||||
cat <<'EOF' >debian/rules
|
||||
#!/usr/bin/make -f
|
||||
|
||||
# Uncomment and adjust the following lines as needed
|
||||
#export DH_VERBOSE = 1
|
||||
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
|
||||
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
|
||||
|
||||
%:
|
||||
dh $@ --buildsystem=cmake
|
||||
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure -- \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_HOST_MULTIARCH)"
|
||||
EOF
|
||||
|
||||
# Build and install Hyprlang using CMake
|
||||
# cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build
|
||||
# cmake --build ./build --config Release --target all -j$(nproc 2>/dev/null || getconf NPROCESSORS_CONF)
|
||||
# sudo cmake --install build
|
||||
|
||||
cat <<EOF >debian/watch
|
||||
version=4
|
||||
opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/${PROJECT}-$1\.tar\.gz/ \
|
||||
https://github.com/${USER}/${PROJECT}/tags .*/v?(\d\S+)\.tar\.gz
|
||||
EOF
|
||||
|
||||
dpkg-buildpackage -us -uc -b
|
||||
|
||||
echo ${PACKAGE}_${VERSION}_amd64.deb
|
||||
|
||||
sudo dpkg -i ../${PACKAGE}_${VERSION}_amd64.deb
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
#!/usr/bin/env bash
|
||||
set -x
|
||||
|
||||
# Install deps
|
||||
sudo apt install -y \
|
||||
cmake \
|
||||
dh-cmake \
|
||||
git \
|
||||
build-essential \
|
||||
libpugixml-dev \
|
||||
libpugixml1v5
|
||||
|
||||
# Set github user and project name
|
||||
USER="hyprwm"
|
||||
PROJECT="hyprwayland-scanner"
|
||||
LICENSE="bsd"
|
||||
HOMEPAGE="https://github.com/hyprwm/hyprwayland-scanner"
|
||||
BUILD_HOME="/var/tmp/hyprwayland-scanner-git_build"
|
||||
PACKAGE="hyprwayland-scanner"
|
||||
VERSION=$(curl "https://api.github.com/repos/${USER}/${PROJECT}/tags?per_page=5" | jq -r '.[0] | .name')
|
||||
VERSION=${VERSION:1} # strip the preceding 'v'
|
||||
SECTION="x11/wm"
|
||||
DEBEMAIL="cyteen@ring-zero.co.uk"
|
||||
DEBFULLNAME="Cyteen May"
|
||||
DESCRIPTION="A Hyprland implementation of wayland-scanner, in C++."
|
||||
LONG_DESCRIPTION="A Hyprland implementation of wayland-scanner, in and for C++."
|
||||
|
||||
# Make the BUILD_HOME directory and clone upstream
|
||||
mkdir -p ${BUILD_HOME}
|
||||
cd ${BUILD_HOME} || exit
|
||||
|
||||
git clone https://github.com/${USER}/${PROJECT}.git ${PACKAGE}-${VERSION}
|
||||
|
||||
cd ${PACKAGE}-${VERSION} || exit
|
||||
|
||||
# debianize the BUILD_HOME directory
|
||||
dh_make --createorig --single --native --copyright ${LICENSE} --yes
|
||||
|
||||
# Customize the debian directory values
|
||||
sed -i 's|^\(Section: \).*|\1'${SECTION}'|' debian/control
|
||||
sed -i "s|^\(Maintainer: \).*|\1'${DEBFULLNAME}\ \<${DEBEMAIL}\>'|" debian/control
|
||||
sed -i 's|^\(Homepage: \).*|\1'${HOMEPAGE}'|' debian/control
|
||||
# sed -i "s,^\(Description: \).*,\1${DESCRIPTION}," debian/control
|
||||
# sed -i "s|.*insert long.*|${LONG_DESCRIPTION}|" debian/control
|
||||
sed -i "s|<insert up to 60 chars description>|${DESCRIPTION}|" debian/control
|
||||
sed -i "s|<Insert long description, indented with spaces.>|${LONG_DESCRIPTION}|" debian/control
|
||||
|
||||
cat <<'EOF' >debian/rules
|
||||
#!/usr/bin/make -f
|
||||
|
||||
# Uncomment and adjust the following lines as needed
|
||||
#export DH_VERBOSE = 1
|
||||
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
|
||||
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
|
||||
|
||||
%:
|
||||
dh $@ --buildsystem=cmake
|
||||
|
||||
override_dh_auto_configure:
|
||||
dh_auto_configure -- \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_LIBRARY_ARCHITECTURE="$(DEB_HOST_MULTIARCH)"
|
||||
EOF
|
||||
|
||||
# Build and install Hyprlang using CMake
|
||||
# cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=/usr -S . -B ./build
|
||||
# cmake --build ./build --config Release --target all -j$(nproc 2>/dev/null || getconf NPROCESSORS_CONF)
|
||||
# sudo cmake --install build
|
||||
|
||||
cat <<EOF >debian/watch
|
||||
version=4
|
||||
opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/${PROJECT}-$1\.tar\.gz/ \
|
||||
https://github.com/${USER}/${PROJECT}/tags .*/v?(\d\S+)\.tar\.gz
|
||||
EOF
|
||||
|
||||
dpkg-buildpackage -us -uc -b
|
||||
|
||||
echo ${PACKAGE}_${VERSION}_amd64.deb
|
||||
|
||||
sudo dpkg -i ../${PACKAGE}_${VERSION}_amd64.deb
|
||||
Loading…
Reference in New Issue