[pacman-dev] two patches for makepkg
1. let makepkg work with icc this patch is inspired by the gentoo wiki page http://en.gentoo-wiki.com/wiki/ICC First of all, you should install icc of course, see http://aur.archlinux.org/packages.php?ID=2252 Add your icc CFLAGS/CXXFLAGS($ICCCFLAGS & $ICCCXXFLAGS) to /etc/makepkg.conf. Add "icc" to the BUILDENV array in /etc/makepkg.conf Add packages' names (one per line) you want to compiled with icc to /etc/package.icc, if a package is not listed in this file, it will be compiled with gcc. Add per-package CFLAGS for packages(package's name followed by CFLAGS per line) you want to compiled with icc to /etc/package.icc-cflags. A few packages benefit greatly from the -O3 flag like python and sqlite according to the gentoo wiki. 2. let makepkg install custom license automatically When making packages whose licenses are "custom", we use PKGBUILD to install the license file manually. Since it is a common step for those packages, why not let makepkg do that automatically? Just specify $licensefile in your PKGBUILD(like $licensefile=LICENSE) and ensure the license file is in $startdir, it then will be automatically install to $pkgdir/usr/share/licenses/$pkgname/$licensefile when packaging. -- best regards, hunt
On Oct 2, 2009, at 5:35 PM, huntxu wrote:
2. let makepkg install custom license automatically When making packages whose licenses are "custom", we use PKGBUILD to install the license file manually. Since it is a common step for those packages, why not let makepkg do that automatically? Just specify $licensefile in your PKGBUILD(like $licensefile=LICENSE) and ensure the license file is in $startdir, it then will be automatically install to $pkgdir/usr/share/licenses/ $pkgname/$licensefile when packaging.
Seems distro-specific (license path) to me. Pacman/makepkg aim to be distro agnostic.
2009/10/2 huntxu <mhuntxu@gmail.com>
2. let makepkg install custom license automatically When making packages whose licenses are "custom", we use PKGBUILD to install the license file manually. Since it is a common step for those packages, why not let makepkg do that automatically? Just specify $licensefile in your PKGBUILD(like $licensefile=LICENSE) and ensure the license file is in $startdir, it then will be automatically install to $pkgdir/usr/share/licenses/$pkgname/$licensefile when packaging.
I don't quite like this one. Custom licenses are not always handmade, they can reside somewhere in $srcdir. Even if this is an "optional" variable, it's sort of not really worth it. It can be a path, or makepkg could parse $license for the word "custom" and look in $startdir for the file of which the name is after the colon eg. "custom:FOO". Can be handled many ways, but..is it worth the extra code, and KISS to let a variable define something which can just be scripted inside build() easily?
On Fri, Oct 2, 2009 at 7:43 PM, Ray Rashif <schivmeister@gmail.com> wrote:
2009/10/2 huntxu <mhuntxu@gmail.com>
2. let makepkg install custom license automatically When making packages whose licenses are "custom", we use PKGBUILD to install the license file manually. Since it is a common step for those packages, why not let makepkg do that automatically? Just specify $licensefile in your PKGBUILD(like $licensefile=LICENSE) and ensure the license file is in $startdir, it then will be automatically install to $pkgdir/usr/share/licenses/$pkgname/$licensefile when packaging.
I don't quite like this one. Custom licenses are not always handmade, they can reside somewhere in $srcdir. Even if this is an "optional" variable, it's sort of not really worth it.
It can be a path, or makepkg could parse $license for the word "custom" and look in $startdir for the file of which the name is after the colon eg. "custom:FOO". Can be handled many ways, but..is it worth the extra code, and KISS to let a variable define something which can just be scripted inside build() easily?
I guess we now have enough reasons for not accepting that one. Comments welcome on the icc one :)
On Fri, Oct 2, 2009 at 12:56 PM, Xavier <shiningxc@gmail.com> wrote:
On Fri, Oct 2, 2009 at 7:43 PM, Ray Rashif <schivmeister@gmail.com> wrote:
2009/10/2 huntxu <mhuntxu@gmail.com>
2. let makepkg install custom license automatically When making packages whose licenses are "custom", we use PKGBUILD to install the license file manually. Since it is a common step for those packages, why not let makepkg do that automatically? Just specify $licensefile in your PKGBUILD(like $licensefile=LICENSE) and ensure the license file is in $startdir, it then will be automatically install to $pkgdir/usr/share/licenses/$pkgname/$licensefile when packaging.
I don't quite like this one. Custom licenses are not always handmade, they can reside somewhere in $srcdir. Even if this is an "optional" variable, it's sort of not really worth it.
It can be a path, or makepkg could parse $license for the word "custom" and look in $startdir for the file of which the name is after the colon eg. "custom:FOO". Can be handled many ways, but..is it worth the extra code, and KISS to let a variable define something which can just be scripted inside build() easily?
I guess we now have enough reasons for not accepting that one.
Comments welcome on the icc one :)
The only comment I had... the patch doesn't make sense. I mean, makepkg has no notion of gcc, and we can use it just fine with ANY compiler. All this logic belongs in the build() function, not in makepkg.
On Fri, Oct 2, 2009 at 2:03 PM, Aaron Griffin <aaronmgriffin@gmail.com> wrote:
Comments welcome on the icc one :)
The only comment I had... the patch doesn't make sense. I mean, makepkg has no notion of gcc, and we can use it just fine with ANY compiler. All this logic belongs in the build() function, not in makepkg.
Additionally, the /etc/package.icc and /etc/package.icc-cflags files are a little goofy, and not similar to anything else makepkg tries to do. I get that you're trying to do this automatically for building all packages, but this can already be done: cp makepkg.conf makepkg.icc # add CC, CXX, CFLAGS, CXXFLAGS for icc into makepkg.icc for pkg in $(list-packages-to-build); if grep $pkg /etc/packages.icc; then makepkg --config=/etc/makepkg.icc else makepkg fi done
On Sat 03 Oct 2009 01:43 +0800, Ray Rashif wrote:
2009/10/2 huntxu <mhuntxu@gmail.com>
2. let makepkg install custom license automatically When making packages whose licenses are "custom", we use PKGBUILD to install the license file manually. Since it is a common step for those packages, why not let makepkg do that automatically? Just specify $licensefile in your PKGBUILD(like $licensefile=LICENSE) and ensure the license file is in $startdir, it then will be automatically install to $pkgdir/usr/share/licenses/$pkgname/$licensefile when packaging.
I don't quite like this one. Custom licenses are not always handmade, they can reside somewhere in $srcdir. Even if this is an "optional" variable, it's sort of not really worth it.
It can be a path, or makepkg could parse $license for the word "custom" and look in $startdir for the file of which the name is after the colon eg. "custom:FOO". Can be handled many ways, but..is it worth the extra code, and KISS to let a variable define something which can just be scripted inside build() easily?
Awhile ago I was thinking about how we could actually link the license name to the license text. We could get rid of the 'custom' usage and just do something like this: license=('FOO:$srcdir/FOO.txt' 'BAR:$srcdir/BAR.txt' 'GPL') Anything without a file specified is assumed to be common (in the licenses package). Anything with a file is a custom license and would be packaged appropriately. Extra metadata could even be added to the PKGINFO/pacmandb and licenses could be displayed via common utilities. That's just some brainstorming though. I don't know if such features are really that valuable. I tend to dislike unnecessary features.
participants (6)
-
Aaron Griffin
-
huntxu
-
Loui Chang
-
Ray Rashif
-
Sebastian Nowicki
-
Xavier