You are not logged in.

#1 2010-08-02 21:58:12

xenom
Member
Registered: 2009-03-19
Posts: 7

Firefox-nightly : Old files

Hello.

I maintain the firefox-nightly PKGBUILD, and someone ask me to add "-N" or "-O ${FX_SRC}" argument to wget, so it just keep the latest tar.gz from mozilla.

I think it can be convenient to use "wget -N", but in an other way, it could be useful to keep the old files, in case of one update don't work/causes problem, and delete them manually when it's ok.

What do you think, firefox-nightly users, dev, TU ?

Offline

#2 2010-08-06 16:06:01

skodabenz
Banned
From: Tamilnadu, India
Registered: 2010-04-11
Posts: 382

Re: Firefox-nightly : Old files

Instead of pkgver showing the firefox version, I think it would be better to use the date of building the package as the okgver (like *-git AUR packages). This way we will know nightly build of "which date" is currently installed in the system.

I also recommend aria2c instead of wget as partially downloaded files can be resumed. I always edit the pkgbuild to use aria2c to download the tar.bz2 archive. My net connection drops sometimes and when I restart makepkg the partially downloaded file in ${srcdir} is resumed.


My new forum user/nick name is "the.ridikulus.rat" .

Offline

#3 2010-08-07 09:42:13

xenom
Member
Registered: 2009-03-19
Posts: 7

Re: Firefox-nightly : Old files

@skaodabenz : It's impossible to add the date in pkgver. The pkgver are updated when the makepkg is run for CVS, it's not a part of PKGBUILD. I don't have find any way to change the pckgver during the build.

I will keep wget instead of aria2, because wget is a package from core and part of the standard base install. Using aria2 would add an necessary dependencies.

Offline

#4 2010-08-08 16:07:50

skodabenz
Banned
From: Tamilnadu, India
Registered: 2010-04-11
Posts: 382

Re: Firefox-nightly : Old files

It's impossible to add the date in pkgver. The pkgver are updated when the makepkg is run for CVS, it's not a part of PKGBUILD. I don't have find any way to change the pckgver during the build.

How about

replacing $pkgver with $ffver, and

pkgver=$(date +%Y%m%d)
ffver=4.0b4pre

I will keep wget instead of aria2, because wget is a package from core and part of the standard base install. Using aria2 would add an necessary dependencies.

msg "Downloading..."
if [ -e /usr/bin/aria2c ]
then
       aria2c ${FX_SRC_URI} || return 1
else
       wget ${FX_SRC_URI} || return 1
fi

PKGBUILD with the changes

# Maintainer: Cedric MATHIEU <me.xenom @ gmail.com>
# Contributor: coderoar <coderoar @ gmail.com>

pkgname=firefox-nightly
pkgdesc='Standalone web browser from mozilla.org, nightly build.'
url='http://www.mozilla.org/projects/firefox'
license=('MPL' 'GPL' 'LGPL')

arch=('i686' 'x86_64')

pkgver=$(date +%Y%m%d)
pkgrel=1

ffver=4.0b4pre

source=( 'firefox-nightly.desktop' 'firefox-nightly-safe.desktop' )
md5sums=( '940233ba24a2de784ea6c610872f01e4' '488e66c72fb678d2b99a22fe87bc5974' )
sha1sums=('6880230bc487bd65c5da43c19498f4520793e27b' '7faa96301d1c3d7772da859b96b3420cb0f34bb3')

depends=( 'desktop-file-utils' 'libxt' 'mime-types' 'nss' 'shared-mime-info' )
makedepends=('wget')

build() {
    cd ${srcdir}

    FX_SRC="firefox-${ffver}.en-US.linux-${CARCH}.tar.bz2"
    FX_SRC_URI="http://ftp.mozilla.org/pub/firefox/nightly/latest-trunk/${FX_SRC}"

    msg "Downloading..."
    if [ -e /usr/bin/aria2c ]
    then
        aria2c ${FX_SRC_URI} || return 1
    else
        wget ${FX_SRC_URI} || return 1
    fi
    
    msg "Extracting..."
    bsdtar -x -f ${FX_SRC} || return 1
    
    msg "Packaging..."

#    uncomment this line to remove them if you want
#    rm -rf firefox/{extensions,plugins,searchplugins} || return 1

    mkdir -p ${pkgdir}/{usr/{bin,share/{applications,pixmaps}},opt} || return 1
    cp -R firefox ${pkgdir}/opt/firefox-${ffver} || return 1

    ln -s /opt/firefox-${ffver}/firefox ${pkgdir}/usr/bin/firefox-nightly || return 1
    install -m644 ${srcdir}/{firefox-nightly.desktop,firefox-nightly-safe.desktop} ${pkgdir}/usr/share/applications/ || return 1
    install -m644 ${srcdir}/firefox/icons/mozicon128.png ${pkgdir}/usr/share/pixmaps/${pkgname}-icon.png || return 1
}

Last edited by skodabenz (2010-08-08 16:13:38)


My new forum user/nick name is "the.ridikulus.rat" .

Offline

#5 2010-08-09 18:49:19

xenom
Member
Registered: 2009-03-19
Posts: 7

Re: Firefox-nightly : Old files

Thanks for the PKGBUILD.

How about

replacing $pkgver with $ffver, and

pkgver=$(date +%Y%m%d)
ffver=4.0b4pre

Yes, I don't have think that we can add variable outside of the build function.

I have add this to my PKGBUILD :

fxver=4.0b4pre
pkgver="$fxver"_"$(date +%Y%m%d)"
pkgrel=1

This way we have the version and the date.


For aria2, I would not add this, because if I add aria, I must add curl and others. I would just keep the standard, and it's easy to change this. Sorry.

Offline

#6 2010-08-10 07:39:10

skodabenz
Banned
From: Tamilnadu, India
Registered: 2010-04-11
Posts: 382

Re: Firefox-nightly : Old files

Thanks for the update. No problem about aria2.


My new forum user/nick name is "the.ridikulus.rat" .

Offline

Board footer

Powered by FluxBB