wok-next annotate samba/receipt @ rev 20529

Up libblockdev (2.16), nspr (4.18), openssh (7.6p1), udisks2 (2.7.6).
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat Mar 24 15:55:55 2018 +0200 (2018-03-24)
parents da6f77539069
children 757d032c55c7
rev   line source
al@19850 1 # SliTaz package receipt v2.
pascal@1250 2
pascal@1250 3 PACKAGE="samba"
pascal@20499 4 VERSION="4.6.14"
pascal@1250 5 CATEGORY="system-tools"
al@19850 6 SHORT_DESC="File and print services with SMB/CIFS"
pascal@1250 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@14999 8 LICENSE="GPL3"
al@19850 9 WEB_SITE="https://www.samba.org/"
al@20529 10 LFS="http://www.linuxfromscratch.org/blfs/view/stable/basicnet/samba.html"
al@19850 11
pascal@1250 12 TARBALL="$PACKAGE-$VERSION.tar.gz"
al@19850 13 WGET_URL="https://download.samba.org/pub/samba/stable/$TARBALL"
pascal@1250 14
al@19850 15 BUILD_DEPENDS="python-dev perl acl-dev docbook-xsl openldap-dev \
al@19850 16 gnutls-dev krb5-dev cyrus-sasl-dev zlib-dev popt-dev libtdb-dev talloc-dev \
pascal@20273 17 libgcrypt-dev nss-dev cups-dev dbus-dev pam pam-dev"
al@20529 18 SPLIT="samba samba-dev samba-pam:pam" # TODO: swat
al@20529 19
al@20529 20 BUGS="Open directory needs MIT kerberos support (krb5)"
al@20529 21 COOKOPTS="!menus"
al@19850 22
al@19850 23 version() {
al@19850 24 wget -O- -q https://download.samba.org/pub/samba/ | \
al@19850 25 sed '/LATEST-IS-SAMBA/!d; s|.*SAMBA-\([^<]*\).*|\1|'
al@19850 26 }
pascal@10454 27
al@20529 28 compile_rules() {
al@20529 29 case $SET in
al@20529 30 '') SET_ARGS='--without-pam';;
al@20529 31 pam) SET_ARGS='--with-pam';;
al@20529 32 esac
al@19850 33
al@19850 34 ./configure \
al@19850 35 --prefix=/usr \
al@19850 36 --sysconfdir=/etc \
al@19850 37 --localstatedir=/var \
al@19850 38 --with-piddir=/run/samba \
al@19850 39 --with-pammodulesdir=/lib/security \
al@19850 40 --enable-fhs \
al@19850 41 --without-ad-dc \
al@19850 42 --without-systemd \
al@19850 43 --enable-selftest \
al@20529 44 $SET_ARGS \
al@19850 45 $CONFIGURE_ARGS &&
al@19850 46 make && make install || return 1
al@19850 47
al@20529 48 mkdir -p $instsll/lib/
al@20529 49 mv $install/usr/lib/libnss_wins.so* $install/usr/lib/libnss_winbind.so* \
al@20529 50 $install/lib
al@20529 51 ln -sf ../../lib/libnss_winbind.so.2 $install/usr/lib/libnss_winbind.so
al@20529 52 ln -sf ../../lib/libnss_wins.so.2 $install/usr/lib/libnss_wins.so
al@19850 53
al@20529 54 install -m644 examples/smb.conf.default $install/etc/samba
al@19850 55
al@20529 56 mkdir -pv $install/etc/openldap/schema
al@20529 57 cp examples/LDAP/README $install/etc/openldap/schema/README.LDAP
al@20529 58 cp examples/LDAP/samba* $install/etc/openldap/schema
al@20529 59 cp -r examples/LDAP/get* examples/LDAP/ol* $install/etc/openldap/schema
al@19850 60
al@20529 61 cp -a $stuff/etc $install
al@19850 62
al@20529 63 # Symlink smbspool to cups backend
al@20529 64 mkdir -p $install/usr/lib/cups/backend/
al@20529 65 ln -sf /usr/bin/smbspool $install/usr/lib/cups/backend/smb
al@19850 66
al@20529 67 # for swat package
al@20529 68 # icodir="$inst/usr/share/icons/hicolor/48x48/apps"
al@20529 69 # mkdir -p $icodir
al@20529 70 # cp $stuff/swat.png $icodir
al@19850 71
al@20529 72 chown -R root:root $install
pascal@1250 73 }
pascal@1250 74
al@20529 75 genpkg_rules() {
al@19850 76 # Note, packages samba-common, smbclient was removed due to circular dependencies:
al@19850 77 # smbclient <--> samba <--> samba-common
al@19850 78 case $PACKAGE in
al@19850 79 # swat)
al@19850 80 # copy swat/ swat.desktop swat.png
al@19850 81 # CAT="development|Samba Web Administration Tool"
al@19850 82 # DEPENDS="samba"
al@19850 83 # ;;
al@19850 84 samba)
al@19850 85 copy @std
al@19850 86 DEPENDS="acl attr dbus libcups libgnutls libldap libtdb ncurses \
al@19850 87 ncurses-libform ncurses-libpanel perl popt python talloc \
al@19850 88 talloc-python zlib"
al@19850 89 PROVIDE="samba-common smbclient"
al@19850 90 TAZPANEL_DAEMON="man|edit::/etc/samba/smb.conf|web::$WEB_SITE"
al@19850 91 CONFIG_FILES="/etc/samba/smb.conf"
al@19850 92 ;;
pascal@20275 93 samba-pam)
al@20529 94 copy @std
pascal@20277 95 CAT="system-tools|using PAM"
pascal@20273 96 DEPENDS="acl attr dbus libcups libgnutls libldap libtdb ncurses \
pascal@20273 97 ncurses-libform ncurses-libpanel perl popt python talloc \
pascal@20273 98 talloc-python zlib pam"
pascal@20273 99 PROVIDE="samba:pam samba-common smbclient"
pascal@20273 100 TAZPANEL_DAEMON="man::samba|edit::/etc/samba/smb.conf|web::$WEB_SITE"
pascal@20273 101 CONFIG_FILES="/etc/samba/smb.conf"
pascal@20273 102 ;;
al@19850 103 *-dev)
al@19850 104 copy @dev
al@19850 105 DEPENDS="samba talloc-dev"
al@19850 106 ;;
al@19850 107 esac
pascal@1250 108 }
pascal@1250 109
al@19850 110 post_install_samba() {
al@19850 111 [ -n "$quiet" ] || cat <<EOT
pascal@1250 112
al@19850 113 .----------------------------------------------------.
al@19850 114 | The main configuration file is /etc/samba/smb.conf |
al@19850 115 |----------------------------------------------------|
al@19850 116 | To start samba server you can run: |
al@19850 117 | /etc/init.d/samba start |
al@19850 118 | |
al@19850 119 | Or add samba to RUN_DAEMONS in /etc/rcS.conf |
al@19850 120 '----------------------------------------------------'
al@19850 121 EOT
al@19850 122 }
pascal@1250 123
al@19850 124 post_install_swat() {
al@19850 125 [ -f "$1/etc/lighttpd/lighttpd.conf" ] || return
al@19850 126
al@19850 127 [ ! grep -q /usr/share/samba/swat/ "$1/etc/lighttpd/lighttpd.conf" ] || return
al@19850 128
al@19850 129 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/swat/" => "/usr/share/samba/swat/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
al@19850 130
al@19850 131 [ -z "$1" ] || return
al@19850 132 # Start Web server.
al@19850 133 /etc/init.d/lighttpd stop
al@19850 134 /etc/init.d/lighttpd start
pascal@1250 135 }