You are not logged in.

#1 2014-08-15 12:55:34

goPhir
Member
From: The darkside of the moon
Registered: 2014-07-20
Posts: 16

DWM, using the PKGBUILD and config.h

Hello everyone,

    I just had a question about using dwm and the pkgbuild. I am using a version of dwm taken from the AUR, which has the xft patch installed. As I continue to build the package from makepkg, it doesn't seem to want to take the config.h from the top level AUR directory. Instead I have tried to hardlink that config.h with the one in the src directory. Anyone have any experience building DWM from the AUR. The dwm wiki-page only has information from the ABS directory. I have been trying to hack on the PKGBUILD all morning to no success. Thanks for your time!


makepkg not war smile


"Compiling would be easy they said, source based distros would be easy they said, then thats when I moved to Arch"

Offline

#2 2014-08-15 16:52:34

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: DWM, using the PKGBUILD and config.h

Post the exact command you're using for building dwm with your config.
Have a look at the PKGBUILD: https://aur.archlinux.org/packages/dw/dwm-xft/PKGBUILD - the only difference from the stock one https://projects.archlinux.org/svntogit … ckages/dwm is the patch, so the ABS instructions should work:

$ diff a b
--- a   2014-08-15 16:48:44.470206142 +0000
+++ b   2014-08-15 16:48:56.252204743 +0000
@@ -1,29 +1,27 @@
-# Maintainer: Brandon Coffman <bkcoffma@gmail.com>
+# $Id$
+# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor: Dag Odenhall <dag.odenhall@gmail.com>
+# Contributor: Grigorios Bouzakis <grbzks@gmail.com>

-pkgname=dwm-xft
+pkgname=dwm
 pkgver=6.0
 pkgrel=2
-pkgdesc='A dynamic window manager for X with Xft support'
-url='http://dwm.suckless.org'
-arch=(i686 x86_64)
-license=(MIT)
+pkgdesc="A dynamic window manager for X"
+url="http://dwm.suckless.org"
+arch=('i686' 'x86_64')
+license=('MIT')
 options=(zipman)
-depends=(libx11 libxinerama libxft)
-conflicts=(dwm)
-provides=(dwm)
+depends=('libx11' 'libxinerama')
 install=dwm.install
 source=(http://dl.suckless.org/dwm/dwm-$pkgver.tar.gz
      config.h
-     dwm.desktop
-        dwm-$pkgver-xft.diff)
+     dwm.desktop)
 md5sums=('8bb00d4142259beb11e13473b81c0857'
-         '61caf25a4c1a3d264c150bb14c746f46'
-         '939f403a71b6e85261d09fc3412269ee'
-         '01d898c9759c702245a4359916810862')
+         '2453e037f46449774ec8afab49b4f1a2'
+         '939f403a71b6e85261d09fc3412269ee')

 build() {
-  cd $srcdir/dwm-$pkgver
-  patch -Np1 -i $srcdir/dwm-$pkgver-xft.diff
+  cd $srcdir/$pkgname-$pkgver
   cp $srcdir/config.h config.h
   sed -i 's/CPPFLAGS =/CPPFLAGS +=/g' config.mk
   sed -i 's/^CFLAGS = -g/#CFLAGS += -g/g' config.mk
@@ -34,7 +32,7 @@
 }

 package() {
-  cd $srcdir/dwm-$pkgver
+  cd $srcdir/$pkgname-$pkgver
   make PREFIX=/usr DESTDIR=$pkgdir install
   install -m644 -D LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
   install -m644 -D README $pkgdir/usr/share/doc/$pkgname/README

Last edited by karol (2014-08-15 16:53:38)

Offline

#3 2014-08-15 19:59:42

grimpirate
Member
Registered: 2011-10-26
Posts: 47

Re: DWM, using the PKGBUILD and config.h

I can only speak as to what I do with the standard dwm-git. I manually edit/patch dwm.c for a particular feature that I use, and also modify config.def.h. Here is the sequence that works for me:

  • Download and extract tarball (tar -xvzf) from AUR

  • cd into the extracted directory and execute makepkg -s

  • rm the newly created package

  • cd into the newly created source directory

  • rm config.h and overwrite/modify/patch config.def.h and dwm.c

  • cd back into the main package directory

  • Execute makepkg -e

  • Execute pacman -U on the newly created package

Basically, what you're doing here is using makepkg -s to get the source of dwm and the manually modifying it, and using makepkg -e to tell it to compile from the source on your local disk as opposed to downloading from the repository. You have to remove config.h because as it's built from config.def.h. If you don't remove it, then the changes you want to be made won't take place (as it will default to using config.h).

Last edited by grimpirate (2014-08-15 20:03:11)

Offline

#4 2014-08-15 20:18:07

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: DWM, using the PKGBUILD and config.h

If you only want to get the source, use `makepkg -o` then you won't have to go around deleting everything.  Also, there is no need to follow makepkg with pacman, just use `makepkg -ei`.  And if a package has already been built, you don't need to delete it, just use `makepkg -efi`.  And when we parse out those uneeded steps from your instructions, we are left with what the wiki instructs.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

Board footer

Powered by FluxBB