SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "boinc"

# SliTaz package receipt.

PACKAGE="boinc"
VERSION="7.16.3"
CATEGORY="network"
SHORT_DESC="Open-source software for volunteer computing and grid computing."
MAINTAINER="pankso@slitaz.org"
LICENSE="GPL3"
WEB_SITE="https://boinc.berkeley.edu/"

TARBALL="$PACKAGE-$VERSION.tar.gz"
WGET_URL="https://github.com/BOINC/$PACKAGE/archive/client_release/${VERSION%.*}/$VERSION.tar.gz"

# The init script requires bash.
DEPENDS="bash libcurl libnotify openssl wxWidgets"
BUILD_DEPENDS="autoconf automake curl-dev file libidn-dev 
    libnotify-dev libtool openssl-dev sqlite-dev wxWidgets-dev"

current_version()
{
    wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \
    sed '/archive.*tar/!d;s|.*/\(.*\).tar.*|\1|;q'
}

# Rules to configure and make the package.
compile_rules()
{
    sed -i 's/AC_PROG_CPP/&\nAC_PROG_OBJCXX/' configure.ac

#    automake --add-missing

    ./_autosetup &&
    ./configure            \
        --disable-server    \
        --enable-unicode    \
        --enable-optimize    \
        $CONFIGURE_ARGS &&
    make &&
    for i in locale/*/*.mo
      do
        [ -s $(dirname $i)/$(basename ${i%mo})po ] &&
        rm $i && msgfmt -o $i $(dirname $i)/$(basename ${i%mo})po
      done &&
    make install
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p \
        $fs/usr/lib \
        $fs/var/lib/boinc \
        $fs/usr/share/pixmaps

    cp -a $install/usr/etc        $fs
    chmod 0644            $fs/etc/boinc-client.conf
    cp -a $install/usr/bin        $fs/usr
    cp -a $install/usr/lib/*.so*    $fs/usr/lib
    cp $src/packages/generic/sea/boincmgr.48x48.png \
                    $fs/usr/share/pixmaps/boincmgr.png
    rm                $fs/etc/init.d/boinc-client
    cp $stuff/boinc-client        $fs/etc/init.d/boinc-client
}

post_install()
{
    echo
    # Check if boinc user already exists
    if grep -q ^${BOINCUSER}: "$1/etc/passwd"
      then
        chroot "$1/" adduser -g "BOINC User" -h /var/lib/boinc -s /bin/bash -S -H -D boinc
      else
        # In case boinc was previously installed:
        chroot "$1/" chown -R boinc /var/lib/boinc
    fi

    echo 'Start the boinc client with "# /etc/init.d/boinc-client start"'
}

post_remove()
{
    echo
    echo -n "Delete user boinc and /var/lib/boinc (yes/No) ? : "
    read -t 30 answer
    if [ "$answer" = "yes" ]
      then
        chroot "$1/" deluser boinc
        rm -r "$1/var/lib/boinc"
      else
        echo ""
        echo "Leaving user boinc and /var/lib/boinc"
    fi
}
6047 packages and 209931 files in current database (Wed Jun 26 15:35:30 2024)