summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b7704a8b4c3af8082fd1ad2ce2c85262fda0a3dc (plain)
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
45
46
47
48
49
50
51
52
53
54
# Maintainer: Brian Bidulock <bidulock@openss7.org>
pkgname=vtwm-git
pkgver=5.5.0.1
pkgrel=1
pkgdesc="A lightweight, customizable window manager with a virtual desktop"
arch=('i686' 'x86_64')
url="http://www.vtwm.org"
license=('MIT')
provides=('vtwm')
conflicts=('vtwm')
depends=('libxpm' 'libxmu' 'libxft' 'libxinerama' 'libxrandr' 'esound' 'rplay')
optdepends=('m4: for config file preprocessing')
makedepends=('git')
backup=('usr/share/X11/vtwm/system.vtwmrc')
options=('!makeflags')
source=("$pkgname::git://git.code.sf.net/p/vtwm/code"
	"vtwm.desktop")
md5sums=('SKIP'
         '7b4fcabdd4cf2b3a03683c37cb0fa82b')

pkgver() {
  cd $pkgname
  git describe --tags --always | sed 's,^[^0-9]*,,;s,-,.,g;s,\.g[a-f0-9]*$,,'
}

prepare() {
  cd $pkgname
  sed -e "/^AC_INIT/s|^.*$|AC_INIT([vtwm],[$pkgver], [mailto:vtwm-hackers@lists.sandelman.ca],[vtwm])|" \
    -i configure.ac
  (
	  head -n 26 add_window.c
	  head -n 20 applets.c
	  head -n 18 desktop.c
	  head -n 22 sound.c
	  cat contrib/nexpm/xpm.COPYRIGHT

  ) >COPYRIGHT
}

build() {
  cd $pkgname
  aclocal
  automake --foreign --add-missing
  autoconf
  ./configure --prefix=/usr --sysconfdir=/etc
  make V=0
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
  install -Dm0644 COPYRIGHT "$pkgdir/usr/share/licenses/$pkgname/COPYRIGHT"
  install -Dm0644 ../vtwm.desktop "$pkgdir/usr/share/xsessions/vtwm.desktop"
}