diff --git a/build-packages.sh b/build-packages.sh new file mode 100644 index 0000000..2731f47 --- /dev/null +++ b/build-packages.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +# +# Script name: build-packages.sh +# Description: Script for automating 'makepkg' on the PKGBUILDS. +# GitLab: https://www.gitlab.com/cabooshyy/cbsh-arch-pkgbuild +# Contributors: Cameron Miller + +# Set with the flags "-e", "-u","-o pipefail" cause the script to fail +# if certain things happen, which is a good thing. Otherwise, we can +# get hidden bugs that are hard to discover. +set -euo pipefail + +echo "$0" +full_path=$(realpath "$0") +dir_path=${full_path%/*} + +readarray -t x86_list <<< "$(find x86_64/ -type f -name PKGBUILD | awk -F / '{print $2}')" + +for x in "${x86_list[@]}" +do + cd "${dir_path}"/x86_64/"${x}" + echo "### Making ${dir_path}/x86_64/${x} ###" + makepkg -cf --sign + find . -mindepth 1 -maxdepth 1 -type d -print0 | xargs -r0 rm -R +done diff --git a/clean-up.sh b/clean-up.sh new file mode 100644 index 0000000..764ab74 --- /dev/null +++ b/clean-up.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +# +# Script name: clean-up.sh +# Description: Script for deleting everything not named "PKGBUILD". +# GitLab: https://www.gitlab.com/cabooshyy/cbsh-arch-pkgbuild +# Contributors: Cameron Miller + +# Go into x86_64 sub-directory and get a list of files +# not named PKGBUILD and not named *.install. +find x86_64 -type f -not -name PKGBUILD -not -name "*.install" -delete diff --git a/x86_64/dmenu-cbsh/PKGBUILD b/x86_64/dmenu-cbsh/PKGBUILD new file mode 100644 index 0000000..6407bf7 --- /dev/null +++ b/x86_64/dmenu-cbsh/PKGBUILD @@ -0,0 +1,42 @@ +# The following guidelines are specific to BZR, GIT, HG and SVN packages. +# Other VCS sources are not natively supported by makepkg yet. + +# Maintainer: Cameron Miller +pkgname=dmenu-cbsh-git +pkgver=5.0.r11.17a8dcc +pkgrel=1 +pkgdesc="A Custom build of dmenu patched for centering, borders, custom line height and more colours" +arch=(x86_64) +url="https://www.gitlab.com/cabooshyy/dmenu-cbsh.git" +license=('MIT') +groups=() +depends=() +makedepends=('git') +provides=("dmenu") +conflicts=("dmenu") +replaces=() +backup=() +options=() +install= +source=("git+$url") +noextract=() +md5sums=('SKIP') + +pkgver() { + cd "${_pkgname}" + printf "5.0.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" +} + +build() { + cd dmenu-cbsh + make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11 +} + +package() { + cd dmenu-cbsh + mkdir -p ${pkgdir}/opt/${pkgname} + cp -rf * ${pkgdir}/opt/${pkgname} + make PREFIX=/usr DESTDIR="${pkgdir}" install + install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -Dm644 README.org "${pkgdir}/usr/share/doc/${pkgname}/README.org" +}