1. # Contributer: v2punkt0 <v2punkt0@gmail.com>
  2. # Contributer: totoloco <totoloco at gmx dot com>
  3.  
  4. pkgname='dwm-hg'
  5. pkgver=1589
  6. pkgrel=1
  7. pkgdesc="The latest hg pull of dwm"
  8. url="http://dwm.suckless.org"
  9. license='MIT'
  10. arch=('i686' 'x86_64')
  11. depends=('libx11')
  12. makedepends=('mercurial' 'sed')
  13. conflicts=('dwm')
  14. provides=('dwm')
  15. source=()
  16. md5sums=()
  17.  
  18. _hgroot='http://code.suckless.org/hg'
  19. _hgrepo='dwm'
  20.  
  21. build() {
  22.   [ -d ${srcdir}/${_hgrepo}-build ] && rm -Rf ${srcdir}/${_hgrepo}-build
  23.   cp -R ${srcdir}/${_hgrepo} ${srcdir}/${_hgrepo}-build
  24.  
  25.   echo ${startdir}/config.h
  26.   [ -f ${startdir}/config.h ] && cp ${startdir}/config.h ${srcdir}/${_hgrepo}-build
  27.  
  28.   cd ${srcdir}/${_hgrepo}-build
  29.  
  30.   # add correct settings to config.mk
  31.   sed -i "s|^PREFIX =.*|PREFIX = /usr|" config.mk
  32.   sed -i "s|^X11INC =.*|X11INC = /usr/include/X11|" config.mk
  33.   sed -i "s|^X11LIB =.*|X11LIB = /usr/lib/X11|" config.mk
  34.  
  35.   msg "Starting build process."
  36.   make || return 1
  37.   make PREFIX=${pkgdir}/usr install
  38.  
  39.   mkdir -p $pkgdir/usr/share/licenses/dwm
  40.   cp LICENSE ${pkgdir}/usr/share/licenses/dwm
  41. }

bash | author: totoloco | dwm PKGBUILD improved | @2011-12-06 04:08 -0500