wok-next view samba/receipt @ rev 20806
I. node update: security -> https://nodejs.org/en/blog/vulnerability/june-2018-security-releases/ 9.5.0 -> 9.11.2 II. add checksum
author | Erkan Yilmaz <erkan@slitaz.org> |
---|---|
date | Wed Jun 13 08:26:54 2018 +0000 (2018-06-13) |
parents | 555cf3b9f1ff |
children | f48456621a9d |
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/stable/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="samba samba-dev samba-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 && make install || return 1
49 mkdir -p $instsll/lib/
50 mv $install/usr/lib/libnss_wins.so* $install/usr/lib/libnss_winbind.so* \
51 $install/lib
52 ln -sf ../../lib/libnss_winbind.so.2 $install/usr/lib/libnss_winbind.so
53 ln -sf ../../lib/libnss_wins.so.2 $install/usr/lib/libnss_wins.so
55 install -m644 examples/smb.conf.default $install/etc/samba
57 mkdir -pv $install/etc/openldap/schema
58 cp examples/LDAP/README $install/etc/openldap/schema/README.LDAP
59 cp examples/LDAP/samba* $install/etc/openldap/schema
60 cp -r examples/LDAP/get* examples/LDAP/ol* $install/etc/openldap/schema
62 cp -a $stuff/etc $install
64 # Symlink smbspool to cups backend
65 mkdir -p $install/usr/lib/cups/backend/
66 ln -sf /usr/bin/smbspool $install/usr/lib/cups/backend/smb
68 # for swat package
69 # icodir="$inst/usr/share/icons/hicolor/48x48/apps"
70 # mkdir -p $icodir
71 # cp $stuff/swat.png $icodir
73 chown -R root:root $install
74 }
76 genpkg_rules() {
77 # Note, packages samba-common, smbclient was removed due to circular dependencies:
78 # smbclient <--> samba <--> samba-common
79 case $PACKAGE in
80 # swat)
81 # copy swat/ swat.desktop swat.png
82 # CAT="development|Samba Web Administration Tool"
83 # DEPENDS="samba"
84 # ;;
85 samba)
86 copy @std
87 DEPENDS="acl attr dbus libcups libgnutls libldap libtdb ncurses \
88 ncurses-libform ncurses-libpanel perl popt python talloc \
89 talloc-python zlib"
90 PROVIDE="samba-common smbclient"
91 TAZPANEL_DAEMON="man|edit::/etc/samba/smb.conf|web::$WEB_SITE"
92 CONFIG_FILES="/etc/samba/smb.conf"
93 ;;
94 samba-pam)
95 copy @std
96 CAT="system-tools|using PAM"
97 DEPENDS="acl attr dbus libcups libgnutls libldap libtdb ncurses \
98 ncurses-libform ncurses-libpanel perl popt python talloc \
99 talloc-python zlib pam"
100 PROVIDE="samba:pam samba-common smbclient"
101 TAZPANEL_DAEMON="man::samba|edit::/etc/samba/smb.conf|web::$WEB_SITE"
102 CONFIG_FILES="/etc/samba/smb.conf"
103 ;;
104 *-dev)
105 copy @dev
106 DEPENDS="samba talloc-dev"
107 ;;
108 esac
109 }
111 post_install_samba() {
112 [ -n "$quiet" ] || cat <<EOT
114 .----------------------------------------------------.
115 | The main configuration file is /etc/samba/smb.conf |
116 |----------------------------------------------------|
117 | To start samba server you can run: |
118 | /etc/init.d/samba start |
119 | |
120 | Or add samba to RUN_DAEMONS in /etc/rcS.conf |
121 '----------------------------------------------------'
122 EOT
123 }
125 post_install_swat() {
126 [ -f "$1/etc/lighttpd/lighttpd.conf" ] || return
128 [ ! grep -q /usr/share/samba/swat/ "$1/etc/lighttpd/lighttpd.conf" ] || return
130 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/swat/" => "/usr/share/samba/swat/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
132 [ -z "$1" ] || return
133 # Start Web server.
134 /etc/init.d/lighttpd stop
135 /etc/init.d/lighttpd start
136 }