default dirnames in /etc/pkgmk.conf
Hi, Since the latest release of libtool a lot of packages all of the sudden started deciding to install stuff in different directories again. A decent solution would be to add the following line to /etc/pkmk.conf: export prefix=/usr mandir=/usr/man infodir=/usr/info libexecdir=/usr/lib Which will make ports look a lot easier as well since you don't have to specify pathnames for most ports anymore. The only problem is that everybody has to add this line to their /etc/pkgmk.conf # Han -- http://www.xs4all.nl/~hanb/software/crux/
Of course it doesn't work at all like that. But the idea is nice. And the solution is not too hard I think. create a macro in pkgmk, it looks like this: Configure() { ./configure \ --prefix=/usr \ --mandir=/usr/man \ --infodir=/usr/info \ --disable-dns } Or something like that. Now that we're creating macro's... remove_perlcrap() { # Remove perlcrap find $PKG \ -name .packlist -or \ -name '*.bs' -or \ -name autosplit.ix -or \ -name perllocal.pod | xargs rm # Remove empty directories, ignore returncode find $PKG -depth -type d -print0| xargs -0 rmdir > /dev/null 2>&1 || : } # Han -- http://www.xs4all.nl/~hanb/software/crux/
On Wed, Nov 15, 2006 at 08:37:48PM +0059, Han Boetes wrote:
Of course it doesn't work at all like that.
But the idea is nice. And the solution is not too hard I think.
create a macro in pkgmk, it looks like this: [...]
Hi, I disagree. We shouldn't add default configure args or even default "delete macros". In the worst case this is doing things with some ports which we don't want. Right now it's perfect in my opinion. If you want to change the prefix to /usr, add it to the Pkgfile. If you want to delete some junk files, add the commands to the Pkgfile. That's simple and secure and come on it's not much more work... Regards Simon
Simon Glo�ner wrote:
I disagree. We shouldn't add default configure args or even default "delete macros". In the worst case this is doing things with some ports which we don't want.
You let your imagination run wild.
Right now it's perfect in my opinion. If you want to change the prefix to /usr, add it to the Pkgfile. If you want to delete some junk files, add the commands to the Pkgfile. That's simple and secure and come on it's not much more work...
Are you a port maintainer? I mean, a real one? Ever seen the output of prtverify? The macros do not disable using a port in the normal way at all. They just make it easier to make standard ports right. # Han -- http://www.xs4all.nl/~hanb/software/crux/
Hi Han! On Thu, Nov 16, 2006 at 02:03:50AM +0059, Han Boetes wrote:
Simon Gloъner wrote:
I disagree. We shouldn't add default configure args or even default "delete macros". In the worst case this is doing things with some ports which we don't want.
You let your imagination run wild.
Right now it's perfect in my opinion. If you want to change the prefix to /usr, add it to the Pkgfile. If you want to delete some junk files, add the commands to the Pkgfile. That's simple and secure and come on it's not much more work...
Are you a port maintainer? I mean, a real one? Ever seen the output of prtverify?
Though I'm not Simon.. and I'm not [public] port maintainer, but I do not like that idea. Sorry, Han. :-( Though, I'm myself using some additional variables defined in pkgmk's configuration file for the my cross compilation toolchain (e.g. CROSS_ROOT, CROSS_HOST, CROSS_TARGET variables), but I do this because there is no another way to do it better, and I do realize that this is [inevitable necessary] hacks. Further more, I do it in another file and calling pkgmk with -cf option pointing to it.
The macros do not disable using a port in the normal way at all. They just make it easier to make standard ports right.
Han, you're best sed/awk/bash wizard I've ever saw, isn't using these tools won't help supporting your ports collection? Is *dir variables and Configure macros are really inevitable necessary hacks for you?
Thanks, -- Anton (irc: bd2)
On Thu, 16 Nov 2006 05:41:29 +0300 Anton Vorontsov wrote:
Hi Han!
On Thu, Nov 16, 2006 at 02:03:50AM +0059, Han Boetes wrote:
Simon Gloъner wrote:
I disagree. We shouldn't add default configure args or even default "delete macros". In the worst case this is doing things with some ports which we don't want.
You let your imagination run wild.
Right now it's perfect in my opinion. If you want to change the prefix to /usr, add it to the Pkgfile. If you want to delete some junk files, add the commands to the Pkgfile. That's simple and secure and come on it's not much more work...
Are you a port maintainer? I mean, a real one? Ever seen the output of prtverify?
Though I'm not Simon.. and I'm not [public] port maintainer, but I do not like that idea. Sorry, Han. :-( Though, I'm myself using some additional variables defined in pkgmk's configuration file for the my cross compilation toolchain (e.g. CROSS_ROOT, CROSS_HOST, CROSS_TARGET variables), but I do this because there is no another way to do it better, and I do realize that this is [inevitable necessary] hacks. Further more, I do it in another file and calling pkgmk with -cf option pointing to it.
The macros do not disable using a port in the normal way at all. They just make it easier to make standard ports right.
Han, you're best sed/awk/bash wizard I've ever saw, isn't using these tools won't help supporting your ports collection? Is *dir variables and Configure macros are really inevitable necessary hacks for you?
Personally, I think duplicating a few basic configure options between ports is hack-worthy. Gentoo do something similar to this with econf, although admittedly their implementation is far larger. I think this is something CRUX needs to do, as it really would make writing Pkgfile's less tedious and reduce the amount of time required to produce one.
Thanks,
-- Anton (irc: bd2)
-- ~predatorfreak GnuPG Public key: http://pred.dcaf-security.org/dcafsec-pub-gpgkey.asc
Brett Goulder wrote:
Personally, I think duplicating a few basic configure options between ports is hack-worthy. Gentoo do something similar to this with econf, although admittedly their implementation is far larger. I think this is something CRUX needs to do, as it really would make writing Pkgfile's less tedious and reduce the amount of time required to produce one.
The remove_perlcrap macro has been used in c4o and works great. I guess the Configure macro will work fine in 90% of the cases, though often you will have to add one or two options. And sometimes it won't work, but then again, you don't have to. So if the port now contains something like ``./configure --prefix=/usr --disable-dls'' you can simply substitute it with the macro. This is the options for xpdf: ./configure \ --prefix=/usr \ --with-Xm-library=/usr/lib \ --with-Xm-includes=/usr/include/Xm \ --with-freetype2-includes=/usr/include/freetype2 \ --sysconfdir=/etc \ --enable-a4-paper \ --enable-opi In that case you can use: Configure \ --with-Xm-library=/usr/lib \ --with-Xm-includes=/usr/include/Xm \ --with-freetype2-includes=/usr/include/freetype2 \ --enable-a4-paper \ --enable-opi An old dutch saying comes to mind: ``Wat een boer ni kent da vrit i ni'' Or ``What a farmer doesn't know he refuses to eat.'' # Han -- http://www.xs4all.nl/~hanb/software/crux/
participants (4)
-
Anton Vorontsov
-
Brett Goulder
-
Han Boetes
-
Simon Gloßner