summaryrefslogtreecommitdiffstats
path: root/dwm/PKGBUILD
blob: 49f2eb7d0dbc19104f97b9a0ff38a65ffa95a6fb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Maintainer: Justin Gassner <justin.gassner@mailbox.org>

_pkgname=dwm
pkgname=$_pkgname-jxir
pkgver=6.2.r18.g4f1db8b
pkgrel=1
pkgdesc='A dynamic window manager for X'
arch=('x86_64')
url="https://$_pkgname.suckless.org"
license=('MIT')
depends=('libxft' 'libxinerama')
makedepends=('git')
provides=("$_pkgname")
conflicts=("$_pkgname")
source=("git+https://git.jxir.de/$_pkgname")
sha256sums=('SKIP')

pkgver(){
  cd "$_pkgname"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd "$_pkgname"
  for branch in noborder pertag fancybar config; do
    git merge --no-edit origin/$branch
  done
  echo "CPPFLAGS+=${CPPFLAGS}" >> config.mk
  echo "CFLAGS+=${CFLAGS}" >> config.mk
  echo "LDFLAGS+=${LDFLAGS}" >> config.mk
  mv config.def.h config.h
}

build() {
  cd "$_pkgname"
  make X11INC=/usr/include/X11 X11LIB=/usr/lib/X11 FREETYPEINC=/usr/include/freetype2
}

package() {
  cd "$_pkgname"
  make PREFIX=/usr DESTDIR="$pkgdir" install
  install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
  install -Dm644 README -t "$pkgdir/usr/share/doc/$_pkgname"
}