SliTaz Packages

Community Doc Forum Pro Shop Bugs Hg
.

Receipt for package "samba"

# SliTaz package receipt.

PACKAGE="samba"
VERSION="3.6.7"
CATEGORY="system-tools"
SHORT_DESC="File and print services with SMB/CIFS."
MAINTAINER="pascal.bellard@slitaz.org"
LICENSE="GPL3"
TARBALL="$PACKAGE-$VERSION.tar.gz"
WEB_SITE="https://www.samba.org/"
WGET_URL="${WEB_SITE}$PACKAGE/ftp/stable/$TARBALL"
TAZPANEL_DAEMON="man|edit::/etc/samba/smb.conf|web::$WEB_SITE"
SUGGESTED="gamin cups perl"
CONFIG_FILES="/etc/samba"
BUGS="Open directory needs MIT kerberos support (krb5)"

BUILD_DEPENDS="openldap openldap-dev libcomerr-dev cups-dev talloc-dev \
pkg-config libldap krb5"
DEPENDS="libldap samba-common glibc-base ncursesw popt zlib cifs-utils acl \
krb5 libcups"

# What is the latest version available today?
current_version()
{
    wget -O - ${WGET_URL%/*} 2>/dev/null | \
    sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*\".*|\\1|" | sort -Vr | sed q
}

# Rules to configure and make the package.
compile_rules()
{
    patch -p0 < $stuff/CVE-2017-7494.u
    cd $src/source3
    ./configure --prefix=/usr --infodir=/usr/share/info \
    --with-piddir=/var/run/samba --with-lockdir=/var/run/samba \
    --with-winbind --with-ldap --with-fhs --enable-cups --enable-swat \
    --enable-shared-libs --enable-external-libtalloc --with-libtdb \
    --with-libsmbsharemodes --with-libsmbclient --without-pam \
    --sysconfdir=/etc --localstatedir=/var \
    --mandir=/usr/share/man $CONFIGURE_ARGS &&
    make -j1 &&
    make -j1 DESTDIR=$DESTDIR install || return 1
    #rm -f $DESTDIR/usr/*bin/*.old
    #ln -s libwbclient.so $DESTDIR/usr/lib/libwbclient.so.0
}

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
    mkdir -p $fs/usr
    cp -a $install/etc $fs
    cp -a $install/var $fs
    cp -a $install/usr/lib $fs/usr
    cp -a $install/usr/sbin $fs/usr
    cp -a $install/usr/bin $fs/usr
    cp -a $stuff/etc $fs
    cat $stuff/*.files-list | while read file; do
        rm -rf $fs$file
    done
}

# Pre and post install commands for Tazpkg.
post_install()
{
    cat <<EOF
----
The main configuration file is /etc/samba/smb.conf
----
To start $PACKAGE server you can run :

    /etc/init.d/$PACKAGE start

Or add $PACKAGE to RUN_DAEMONS in /etc/rcS.conf
----
EOF
}
6025 packages and 203154 files in current database (Thu Apr 25 06:17:47 2024)