[Frugalware-devel] Frugalbuild review
Gabriel C
crazy at frugalware.org
Mon Feb 25 16:09:57 CET 2008
Miklos Vajna wrote:
> On Sun, Feb 24, 2008 at 09:22:21PM +0100, gaetan <bouleetbil at frogdev.info> wrote:
>> like to participate to your project if possible. I've created 4 FB, if
>> you can give some advices on them ...
>
> below are a few :)
and some more ;)
>
>> SNACK
>>
>> # Compiling Time: 0.17 SBU
>> # Maintainer: bouleetbil <bouleetbil at frogdev.info>
>>
>> pkgname=snack
>> pkgver=2.2.10
>> pkgrel=1
>> pkgdesc="he Snack Sound Toolkit (Tcl)"
>> depends=('alsa-lib' 'tcl' 'tk' 'python')
>
> tk already depends on tcl, so you can omit tcl. makepkg has a -a switch
> or you can use the chkdep utility directly to find dependencies; it
> omits such unnecessary packages.
>
>> groups=('multimedia-extra')
xmultimedia-extra , it pulls X
>> archs=('i686')
>> url="http://www.speech.kth.se"
>> source=($url/$pkgname/dist/$pkgname$pkgver.tar.gz)
>> up2date="lynx -dump $url/$pkgname/download.html |grep 'Version '|cut -d
>> ' ' -f 6 | sed -n '1p'"
>> sha1sums=('2c333fde061cf1cb7d5932c9cff4eb968c7d095a')
>> _F_cd_path=$pkgname$pkgver/unix
>
> you can use _F_cd_path here but usually we use that variable if that
> would be the only reason to add a build()
>
> so a build()
> {
> Fcd foo
> Fbuild
> }
>
> can be replaced by:
>
> _F_cd_path=foo
>
> otherwise you can just use Fcd, it's easier and the code is more
> readable.
>
>> build()
>> {
>> Fmake --enable-alsa --enable-threads --libdir=/usr/lib
>> --includedir=/usr/include
>> Fmakeinstall
>
> Fbuild = Fpatchall + Fmake + Fmakeinstall, do you can just use Fbuild
> --enable-alsa etc. here.
>
>> cd ../python
>> python setup.py install --root=$Fdestdir || Fdie
>
> same, ideally you can use Fbuild instead of 'python setup.py install
> --root=$Fdestdir'
>
>> Squashfs-tools
>
> are you using this package for a livecd or for something else?
>
> for a livecd, we have already a package in the fwlive_pkgs repo:
>
> http://ftp.frugalware.org/pub/other/people/janny/fwlive_pkgs/source/apps-extra/squashfs/
>
> though it's heavily patched to use lzma compression.
Well that package is useless for -current yet anyway.
>
>> #no _F_sourceforge_sep didn't work
>> #bug : FS#2792
Have a look again at that bug ;)
_F_sourceforge_sep="None"
>> #_F_sourceforge_name=$RealName
>> #_F_sourceforge_broken_up2date="1"
>> #_F_sourceforge_sep=""
>> #_F_sourceforge_prefix=""
>> #_F_sourceforge_ext=".tgz"
>> #_F_sourceforge_dirname=$RealName
>> #Finclude sourceforge
>>
>>
>> source="http://mesh.dl.sourceforge.net/sourceforge/$RealName/$RealName$pkgver.tgz"
>
> that's ok but you can still use Finclude sourceforge,
> $_F_sourceforge_mirror and just overwrite the source/url/up2date that
> sourceforge.sh would set.
>
>> #Move sources repertory :
>> mv mksquashfs $Fdestdir/usr/bin/mksquashfs
>> mv unsquashfs $Fdestdir/usr/bin/unsquahfs
>
> or just Fexerel /usr/bin/mksquashfs, Fexerel /usr/bin/unsquahfs (like
> gentoo's insinto and dobin)
>
>> build()
>> {
>> #Create repertories :
>> Fmkdir usr/bin/
>> echo "cd /usr/share/$pkgname-$pkgver" > $pkgname.sh
>> echo "python foff.py" >> $pkgname.sh
>> chmod +x $pkgname.sh
>> #icon
>> Ficon $pkgname/foff_logo00.png
>> Fdesktop2
>> #install
>> mv $pkgname.sh $Fdestdir/usr/bin/$pkgname
>> Fmkdir usr/share/
>> mv $pkgname $Fdestdir/usr/share/$pkgname-$pkgver
>> }
>
> oh, there is no setup.py for this package?
>
> having py code in /usr/share and not under /usr/lib/python$ver sounds
> ugly.
>
If you don't use F* commands you have to || return 1 or use || Fdie
so mv foo bar || Fdie etc
>> PATCH basedir.diff
>> --- usr/local/bin/qemulator 2007-03-03 22:40:27.000000000 +0100
>> +++ usr/local/bin/qemulator 2007-03-03 22:32:29.000000000 +0100
>> @@ -78,6 +78,7 @@
>> if not os.path.exists(os.path.join(basedir, "main.py")):
>> if os.path.exists(os.path.join(os.getcwd(), "main.py")):
>> basedir = os.getcwd()
>> +basedir = "/usr/lib/qemulator"
>> sys.path.insert(0, basedir)
>> os.chdir(basedir)
>> #print "basedir: " + basedir
>
> hm what is the purpose of this patch? have you tried to contact upstream
> so that the patch could be in the next upstream release?
>
> i hope these are useful hints. if nobody picks up these buildscripts,
> then please open a task for each FBs in the BTS so that your valuable
> work won't lost.
>
> thanks,
> - VMiklos
crazy
More information about the Frugalware-devel
mailing list