diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..0239a35 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,46 @@ +pkgname=dwm-git +_pkgname=dwm +pkgver=v1.0 +pkgrel=1 +pkgdesc="A dynamic window manager for X nagbalae version" +url="http://github.com/nagbalae/dwm" +arch=('i686' 'x86_64') +license=('MIT') +options=(zipman) +depends=('libx11' 'libxinerama' 'libxft') +makedepends=('git') +install=arch/dwm.install +provides=('dwm') +conflicts=('dwm') +source=("$_pkgname::git+https://github.com/nagbalae/dwm" + config.h) +md5sums=( 'SKIP' + 'SKIP') # so you can customize config.h + +pkgver(){ + cd $_pkgname + #git describe --long --tags | sed -E 's/([^-]*-g)/r\1/;s/-/./g' + echo 'v1.0' +} + +prepare() { + cd $_pkgname + if [[ -f "$srcdir/config.h" ]]; then + cp -fv "$srcdir/config.h" config.h + fi +} + +build() { + cd $_pkgname + make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11 +} + +package() { + cd $_pkgname + make PREFIX=/usr DESTDIR="$pkgdir" install + install -m644 -D LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + install -m644 -D README.md "$pkgdir/usr/share/doc/$pkgname/README.md" + install -m644 -D arch/dwm.desktop "$pkgdir/usr/share/xsessions/dwm.desktop" +} + +# vim:set ts=2 sw=2 et: diff --git a/arch/dwm.desktop b/arch/dwm.desktop new file mode 100644 index 0000000..b0c3354 --- /dev/null +++ b/arch/dwm.desktop @@ -0,0 +1,7 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Dwm +Comment=Dynamic window manager +Exec=dwm +Icon=dwm +Type=XSession diff --git a/arch/dwm.install b/arch/dwm.install new file mode 100644 index 0000000..9675514 --- /dev/null +++ b/arch/dwm.install @@ -0,0 +1,5 @@ +post_install() { + echo "-- Edit config.h in dwm's PKGBUILD directory (generally /var/abs/community/dwm/)" + echo "-- and rebuild package if you want to change settings." + echo "-- Or, place custom config.h in \$SRCDEST/dwm-git/config.h and rebuild." +}