makedeb
A window switcher, run dialog and dmenu replacement
Viewing /PKGBUILD
.
Click here to go back to the Git tree for rofi-git.
# Maintainer: only_vip <onlyme_vip@protonmail.com>
pkgname=rofi-git
_pkgname=rofi
_libgwater=libgwater
_libnkutils=libnkutils
pkgver=19f0a8c92022.04.16
pkgrel=2
pkgdesc='A window switcher, run dialog and dmenu replacement'
arch=('amd64')
url='https://github.com/DaveDavenport/rofi/'
license=('MIT')
depends=( 'freetype2-demos' 'libjpeg-dev' 'librsvg2-dev' 'libx11-dev' 'libxcb1-dev' 'libxdg-basedir-dev' 'libxft-dev' 'libxkbcommon-dev' 'libxkbcommon-x11-dev' 'libpango1.0-dev' 'libstartup-notification0-dev' 'libglib2.0-dev' 'libcairo2-dev' 'libpango1.0-dev' 'libxkbcommon-dev' 'libgdk-pixbuf2.0-dev' 'libxcb-util0-dev' 'libxcb-xkb-dev' 'libxkbcommon-x11-dev' 'libxcb-ewmh-dev' 'libxcb-icccm4-dev' 'libxcb-cursor-dev' 'libstartup-notification0-dev' 'libxcb-xrm-dev' 'libxcb-randr0-dev' 'libxcb-randr0-dev' 'libxcb-xinerama0-dev')
makedepends=('git' 'meson' 'flex' 'bison' 'ninja-build' 'ronn' 'doxygen' 'uncrustify' 'cppcheck' 'ohcount' 'autoconf')
checkdepends=('check')
provides=("${_pkgname}")
conflicts=("${_pkgname}")
# replaces=("${_pkgname}")
source=(
"${_pkgname}::git+https://github.com/DaveDavenport/rofi#branch=next"
"${_libgwater}::git+https://github.com/sardemff7/libgwater"
"${_libnkutils}::git+https://github.com/sardemff7/libnkutils"
)
sha256sums=('SKIP' 'SKIP' 'SKIP')
pkgver() {
cd "${pkgname/-git}"
#git describe --long --tags \
#| sed 's/-/.r/;s/-/./'
_always=$(git describe --always | sed -e 's:-:.:g' -e 's:vNext::') # always is mobile, and switches between numbers and letters, can't use it for versioning
_commits=$(git rev-list --count HEAD | sed 's:-:.:g') # total commits is the most sane way of getting incremental pkgver
_date=$(git log -1 --date=short --pretty=format:%cd)
printf "%s%s%s\n" "${_commits}" "${_always}" "${_date}" | sed -e 's:-:.:g' -e 's:_:.:g'
}
prepare() {
cd "${pkgname/-git}"
for module in libgwater libnkutils; do
local submodule="subprojects/${module}"
git submodule init "${submodule}"
git config "submodule.${submodule}.url" "${srcdir}/${module}"
git submodule update "${submodule}"
done
cd "${srcdir}"
meson setup "${pkgname/-git}" build \
--buildtype release \
--prefix /usr
}
build() {
ninja -C build
}
check() {
ninja -C build test
}
package() {
DESTDIR="${pkgdir}" ninja -C build install
cd "${pkgname/-git}"
install -Dm644 COPYING "${pkgdir}/usr/share/licenses/rofi/COPYING"
install -Dm755 Examples/*.sh -t "${pkgdir}/usr/share/doc/rofi/examples"
}