hello on first sorry for my English :) I write something like gentoo's use flags but more simplest. for example i need (or i like :) ) fluxbox witch imlib2 but i don't need xinerama if i wont add or delete some functionality i must rewrite Pkgfile . 3 steps to change it : 1. add to /etc/pkgmk.conf USE="nls imlib" 2. add function to pkgmk if_use() { local TMP_USE=$1 local RET_YES=$2 local RET_NO=$3 for U in $USE do if [ "$U" = "$TMP_USE" ]; then echo $RET_YES return fi done echo $RET_NO } 3. Pkgfile # Description: light windowmanager based on the original blackbox # URL: http://fluxbox.org # Maintainer: # Packager: # Depends on: x11 imlib2 deps="x11 $(if_use imlib2 imlib2) $(if_use nls nls) $(if_use xinerama xinerama)" name=fluxbox version=1.0rc2 release=1 source=(http://surfnet.dl.sourceforge.net/sourceforge/fluxbox/fluxbox-$version.tar.g...) build() { cd $SRC/$name-$version ./configure \ --prefix=/usr \ $(if_use nls --enable-nls --disable-nls) \ $(if_use imlib2 --enable-imlib2) \ $(if_use xinerama --enable-xinerama --disable-xinerama) make make install DESTDIR=$PKG } and that's all folks :) if_use <use_flags> <arg_1> <arg_2> if use_flags exist in config then return arg_1 if not then arg_2 simple but powerful :) and in variable deps we have all needed depes What you thinking about it ?
participants (1)
-
heidi