Last active
June 2, 2017 01:53
-
-
Save HokieGeek/1d22be50928624c690699fff8910ccbe to your computer and use it in GitHub Desktop.
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: Andres Perez <andres.f.perez@gmail.com> | |
pkgname=hg-bin | |
_pkgname=hg-bin | |
epoch=1 | |
pkgver=0 | |
pkgrel=1 | |
pkgdesc='My personal scripts' | |
url='https://gitlab.com/HokieGeek/bin' | |
arch=('i686' 'x86_64') | |
license=('MIT') | |
source=('git://gitlab.com/HokieGeek/bin') | |
sha1sums=('SKIP') | |
_sourcedir=$(basename ${source[0]}) | |
_prepdir="prep" | |
provides=("${_pkgname}") | |
conflicts=("${_pkgname}") | |
pkgver() { | |
cd "${srcdir}/${_sourcedir}" | |
git log -1 --format='%cd.%h' --date=short | tr -d - | |
} | |
prepare() { | |
mkdir -p "${srcdir}/${_prepdir}" | |
cd "${srcdir}/${_sourcedir}" | |
find . -mindepth 1 -a \ | |
! -path . -a ! -path "*.git*" -a ! -path "./.*" -a \ | |
! -type d -a -executable \ | |
-exec cp '{}' "${srcdir}/${_prepdir}" \; | |
} | |
package() { | |
cd "${srcdir}/${_prepdir}" | |
local installdir="${pkgdir}/usr/local/bin" | |
install -d "${installdir}" | |
for f in `ls -1`; do | |
install -Dm755 "${f}" "${installdir}" | |
done | |
} |
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: Andres Perez <andres.f.perez@gmail.com> | |
pkgname=hrs-git | |
_pkgname=hrs-git | |
epoch=1 | |
pkgver=0 | |
pkgrel=1 | |
pkgdesc='Time tracking script' | |
url='http://github.com/HokieGeek/hrs' | |
arch=('i686' 'x86_64') | |
license=('MIT') | |
source=('git://github.com/HokieGeek/hrs') | |
sha1sums=('SKIP') | |
_sourcedir=$(basename ${source[0]}) | |
provides=("${_pkgname}") | |
conflicts=("${_pkgname}") | |
pkgver() { | |
cd "${srcdir}/${_sourcedir}" | |
git log -1 --format='%cd.%h' --date=short | tr -d - | |
} | |
package() { | |
cd "${srcdir}/${_sourcedir}" | |
local installdir="${pkgdir}/usr/local/bin" | |
install -d "${installdir}" | |
install -Dm755 "hrs" "${installdir}" | |
} |
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
#!/bin/bash | |
pkgbuild=$1 | |
dir=`mktemp -d` | |
mkdir -p ${dir} | |
cp ${pkgbuild} ${dir}/PKGBUILD | |
pushd ${dir} >/dev/null 2>&1 | |
namcap PKGBUILD && { | |
read -p "Install the package? [y/N] " -n 1 -r | |
[[ $REPLY =~ ^[yY]$ ]] && install="i" || install="" | |
makepkg -sr${install} | |
} |
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: Andres Perez <andres.f.perez@gmail.com> | |
pkgname=st-hg-git | |
_pkgname=st | |
epoch=1 | |
pkgver=0 | |
pkgrel=1 | |
pkgdesc='Simple virtual terminal emulator for X' | |
url='http://git.suckless.org/st/' | |
arch=('i686' 'x86_64') | |
license=('MIT') | |
depends=('libxft') | |
makedepends=('ncurses' 'libxext' 'git') | |
source=('git://git.suckless.org/st') | |
sha1sums=('SKIP') | |
provides=("${_pkgname}") | |
conflicts=("${_pkgname}") | |
pkgver() { | |
cd "${srcdir}/${_pkgname}" | |
git log -1 --format='%cd.%h' --date=short | tr -d - | |
} | |
prepare() { | |
local file | |
pushd "${srcdir}/${_pkgname}" | |
sed \ | |
-e 's/CPPFLAGS =/CPPFLAGS +=/g' \ | |
-e 's/CFLAGS =/CFLAGS +=/g' \ | |
-e 's/LDFLAGS =/LDFLAGS +=/g' \ | |
-i config.mk | |
sed \ | |
-e '/char font/s/".*"/"Inconsolata-g:size=10:antialias=true:autohint=true"/' \ | |
-e '/char worddelimiters/s/= .*/= " '"'"'`\\\"()[]{}<>|";/' \ | |
-i config.def.h | |
# -e '/char font/s/".*"/"DejaVu Sans Mono:size=12:antialias=true:autohint=true"/' \ | |
echo "> Applying patches" | |
# curl -O "http://st.suckless.org/patches/st-alpha-20160727-308bfbf.diff" | |
curl -O "http://st.suckless.org/patches/st-hidecursor-20160727-308bfbf.diff" | |
curl -O "http://st.suckless.org/patches/st-clipboard-20160727-308bfbf.diff" | |
for file in `ls *`; do | |
if [[ "${file}" == *.diff ]]; then | |
# add all patches present in source directory | |
echo "> Applying patch: ${file}" | |
patch -Np1 < "${file}" | |
fi | |
done | |
} | |
build() { | |
pushd "${srcdir}/${_pkgname}" | |
make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11 | |
} | |
package() { | |
pushd "${srcdir}/${_pkgname}" | |
export TERMINFO="${pkgdir}/usr/share/terminfo" | |
install -d "$TERMINFO" | |
make PREFIX=/usr DESTDIR="${pkgdir}" install | |
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" | |
install -Dm644 README "${pkgdir}/usr/share/doc/${pkgname}/README" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment