adding arch package build

This commit is contained in:
Nagy Gábor 2020-06-21 15:48:56 +02:00
parent 0692ee574c
commit b9d06ea347
3 changed files with 58 additions and 0 deletions

46
PKGBUILD Normal file
View File

@ -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:

7
arch/dwm.desktop Normal file
View File

@ -0,0 +1,7 @@
[Desktop Entry]
Encoding=UTF-8
Name=Dwm
Comment=Dynamic window manager
Exec=dwm
Icon=dwm
Type=XSession

5
arch/dwm.install Normal file
View File

@ -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."
}