wok-next annotate samba/receipt @ rev 20095

Update/add packages needed for building MATE desktop:
Add: gnome-keyring3, gtkmm3, libappindicator-gtk[23], libfakekey, libgnome-keyring3, libindicator-gtk[23], libpeas.
Update: atkmm, cairomm, gcr, glibmm, gssdp, gupnp, icon-naming-utils, libcap-ng, libspectre, libwnck3, libxklavier, pangomm, perl-xml-sax.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Sat Oct 28 16:45:22 2017 +0300 (2017-10-28)
parents 9b7c1ea86466
children 81ae85517a60
rev   line source
al@19850 1 # SliTaz package receipt v2.
pascal@1250 2
pascal@1250 3 PACKAGE="samba"
al@19850 4 VERSION="4.6.7"
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@19850 10 BUGS="Open directory needs MIT kerberos support (krb5)"
al@19850 11 COOKOPTS="!menus"
al@19850 12
pascal@1250 13 TARBALL="$PACKAGE-$VERSION.tar.gz"
al@19850 14 WGET_URL="https://download.samba.org/pub/samba/stable/$TARBALL"
pascal@1250 15
al@19850 16 BUILD_DEPENDS="python-dev perl acl-dev docbook-xsl openldap-dev \
al@19850 17 gnutls-dev krb5-dev cyrus-sasl-dev zlib-dev popt-dev libtdb-dev talloc-dev \
al@19850 18 libgcrypt-dev nss-dev cups-dev dbus-dev"
al@19850 19 SPLIT="samba-dev" # TODO: swat
al@19850 20
al@19850 21 version() {
al@19850 22 wget -O- -q https://download.samba.org/pub/samba/ | \
al@19850 23 sed '/LATEST-IS-SAMBA/!d; s|.*SAMBA-\([^<]*\).*|\1|'
al@19850 24 }
pascal@10454 25
pascal@1250 26 # Rules to configure and make the package.
pascal@1250 27 compile_rules()
pascal@1250 28 {
al@19850 29 # http://www.linuxfromscratch.org/blfs/view/stable/basicnet/samba.html
al@19850 30
al@19850 31 ./configure \
al@19850 32 --prefix=/usr \
al@19850 33 --sysconfdir=/etc \
al@19850 34 --localstatedir=/var \
al@19850 35 --with-piddir=/run/samba \
al@19850 36 --with-pammodulesdir=/lib/security \
al@19850 37 --enable-fhs \
al@19850 38 --without-ad-dc \
al@19850 39 --without-systemd \
al@19850 40 --enable-selftest \
al@19850 41 $CONFIGURE_ARGS &&
al@19850 42 make && make install || return 1
al@19850 43
al@19850 44 mkdir -p $install/lib
al@19850 45 mv $install/usr/lib/libnss_wins.so* $install/usr/lib/libnss_winbind.so* \
al@19850 46 $install/lib
al@19850 47 ln -sf ../../lib/libnss_winbind.so.2 $install/usr/lib/libnss_winbind.so
al@19850 48 ln -sf ../../lib/libnss_wins.so.2 $install/usr/lib/libnss_wins.so
al@19850 49
al@19850 50 install -m644 examples/smb.conf.default $install/etc/samba
al@19850 51
al@19850 52 mkdir -pv $install/etc/openldap/schema
al@19850 53 cp examples/LDAP/README $install/etc/openldap/schema/README.LDAP
al@19850 54 cp examples/LDAP/samba* $install/etc/openldap/schema
al@19850 55 cp -r examples/LDAP/get* examples/LDAP/ol* $install/etc/openldap/schema
al@19850 56
al@19850 57 cp -a $stuff/etc $install
al@19850 58
al@19850 59 # Symlink smbspool to cups backend
al@19850 60 mkdir -p $install/usr/lib/cups/backend
al@19850 61 ln -sf /usr/bin/smbspool $install/usr/lib/cups/backend/smb
al@19850 62
al@19850 63 # for swat package
al@19850 64 # icodir="$install/usr/share/icons/hicolor/48x48/apps"
al@19850 65 # mkdir -p $icodir
al@19850 66 # cp $stuff/swat.png $icodir
al@19850 67
al@19850 68 chown -R root:root $install
pascal@1250 69 }
pascal@1250 70
pascal@1250 71 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@1250 72 genpkg_rules()
pascal@1250 73 {
al@19850 74 # Note, packages samba-common, smbclient was removed due to circular dependencies:
al@19850 75 # smbclient <--> samba <--> samba-common
al@19850 76 case $PACKAGE in
al@19850 77 # smbclient)
al@19850 78 # copy smbclient smbspool smbget smbtree smbcacls smbcquotas smbtar \
al@19850 79 # rpcclient net nmblookup libnetapi.so* libsmbclient.so* smb
al@19850 80 # CAT="network|client"
al@19850 81 # DEPENDS="samba libldap libtdb popt talloc"
al@19850 82 # ;;
al@19850 83 # swat)
al@19850 84 # copy swat/ swat.desktop swat.png
al@19850 85 # CAT="development|Samba Web Administration Tool"
al@19850 86 # DEPENDS="samba"
al@19850 87 # ;;
al@19850 88 samba)
al@19850 89 copy @std
al@19850 90 # remove_already_packed
al@19850 91 DEPENDS="acl attr dbus libcups libgnutls libldap libtdb ncurses \
al@19850 92 ncurses-libform ncurses-libpanel perl popt python talloc \
al@19850 93 talloc-python zlib"
al@19850 94 PROVIDE="samba-common smbclient"
al@19850 95 TAZPANEL_DAEMON="man|edit::/etc/samba/smb.conf|web::$WEB_SITE"
al@19850 96 CONFIG_FILES="/etc/samba/smb.conf"
al@19850 97 ;;
al@19850 98 *-dev)
al@19850 99 copy @dev
al@19850 100 DEPENDS="samba talloc-dev"
al@19850 101 ;;
al@19850 102 esac
pascal@1250 103 }
pascal@1250 104
pascal@1250 105 # Pre and post install commands for Tazpkg.
al@19850 106 post_install_samba() {
al@19850 107 [ -n "$quiet" ] || cat <<EOT
pascal@1250 108
al@19850 109 .----------------------------------------------------.
al@19850 110 | The main configuration file is /etc/samba/smb.conf |
al@19850 111 |----------------------------------------------------|
al@19850 112 | To start samba server you can run: |
al@19850 113 | /etc/init.d/samba start |
al@19850 114 | |
al@19850 115 | Or add samba to RUN_DAEMONS in /etc/rcS.conf |
al@19850 116 '----------------------------------------------------'
al@19850 117 EOT
al@19850 118 }
pascal@1250 119
al@19850 120 post_install_swat() {
al@19850 121 [ -f "$1/etc/lighttpd/lighttpd.conf" ] || return
al@19850 122
al@19850 123 [ ! grep -q /usr/share/samba/swat/ "$1/etc/lighttpd/lighttpd.conf" ] || return
al@19850 124
al@19850 125 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 126
al@19850 127 [ -z "$1" ] || return
al@19850 128 # Start Web server.
al@19850 129 /etc/init.d/lighttpd stop
al@19850 130 /etc/init.d/lighttpd start
pascal@1250 131 }