wok-next view samba/receipt @ rev 21020

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