wok-next view samba/receipt @ rev 21613
updated eboard (1.1.1 -> 1.1.3)
author | Hans-G?nter Theisgen |
---|---|
date | Thu Jun 25 10:33:28 2020 +0100 (2020-06-25) |
parents | 0f2575775b2d |
children |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="samba"
4 VERSION="4.12.2"
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="acl-dev cups-dev cyrus-sasl-dev dbus-dev docbook-xsl
16 gnutls-dev krb5-dev libgcrypt-dev nss-dev openldap-dev
17 pam pam-dev perl popt-dev python-dev talloc-dev tdb-dev
18 zlib-dev"
19 SPLIT="$PACKAGE-dev $PACKAGE-pam:pam" # TODO: swat
21 BUGS="Open directory needs MIT kerberos support (krb5)"
22 COOKOPTS="!menus"
24 version()
25 {
26 wget -O- -q https://download.samba.org/pub/samba/ | \
27 sed '/LATEST-IS-SAMBA/!d; s|.*SAMBA-\([^<]*\).*|\1|'
28 }
30 compile_rules()
31 {
32 case $SET in
33 '') SET_ARGS='--without-pam';;
34 pam) SET_ARGS='--with-pam';;
35 esac
37 # site script isn't used
38 ./configure \
39 --prefix=/usr \
40 --sysconfdir=/etc \
41 --localstatedir=/var \
42 --with-piddir=/run/samba \
43 --with-pammodulesdir=/lib/security \
44 --enable-fhs \
45 --without-ad-dc \
46 --without-systemd \
47 --enable-selftest \
48 $SET_ARGS \
49 $CONFIGURE_ARGS &&
50 make &&
51 make install || return 1
53 mkdir -p $install/lib
55 mv $install/usr/lib/libnss_wins.so* $install/lib
56 mv $install/usr/lib/libnss_winbind.so* $install/lib
57 ln -sf ../../lib/libnss_winbind.so.2 $install/usr/lib/libnss_winbind.so
58 ln -sf ../../lib/libnss_wins.so.2 $install/usr/lib/libnss_wins.so
60 install -m644 examples/smb.conf.default $install/etc/samba
62 mkdir -pv $install/etc/openldap/schema
63 cp examples/LDAP/README $install/etc/openldap/schema/README.LDAP
64 cp examples/LDAP/samba* $install/etc/openldap/schema
65 cp -r examples/LDAP/get* $install/etc/openldap/schema
66 cp -r examples/LDAP/get* $install/etc/openldap/schema
67 cp -r examples/LDAP/ol* $install/etc/openldap/schema
69 cp -a $stuff/etc $install
71 # Symlink smbspool to cups backend
72 mkdir -p $install/usr/lib/cups/backend/
73 ln -sf /usr/bin/smbspool $install/usr/lib/cups/backend/smb
75 # for swat package
76 # icodir="$inst/usr/share/icons/hicolor/48x48/apps"
77 # mkdir -p $icodir
78 # cp $stuff/swat.png $icodir
80 chown -R root:root $install
81 }
83 genpkg_rules()
84 {
85 # Note, packages samba-common, smbclient was removed due to circular dependencies:
86 # smbclient <--> samba <--> samba-common
87 case $PACKAGE in
88 # swat)
89 # copy swat/ swat.desktop swat.png
90 # CAT="development|Samba Web Administration Tool"
91 # DEPENDS="samba"
92 # ;;
93 samba)
94 copy @std
95 DEPENDS="acl attr dbus libcups libgnutls libldap tdb ncurses \
96 ncurses-libform ncurses-libpanel perl popt python talloc \
97 talloc-python zlib"
98 PROVIDE="samba-common smbclient"
99 TAZPANEL_DAEMON="man|edit::/etc/samba/smb.conf|web::$WEB_SITE"
100 CONFIG_FILES="/etc/samba/smb.conf"
101 ;;
102 samba-pam)
103 copy @std
104 CAT="system-tools|using PAM"
105 DEPENDS="acl attr dbus libcups libgnutls libldap tdb ncurses \
106 ncurses-libform ncurses-libpanel perl popt python talloc \
107 talloc-python zlib pam"
108 PROVIDE="samba:pam samba-common smbclient"
109 TAZPANEL_DAEMON="man::samba|edit::/etc/samba/smb.conf|web::$WEB_SITE"
110 CONFIG_FILES="/etc/samba/smb.conf"
111 ;;
112 *-dev)
113 copy @dev
114 DEPENDS="samba talloc-dev"
115 ;;
116 esac
117 }
119 post_install_samba()
120 {
121 [ -n "$quiet" ] || cat <<EOT
123 .----------------------------------------------------.
124 | The main configuration file is /etc/samba/smb.conf |
125 |----------------------------------------------------|
126 | To start samba server you can run: |
127 | /etc/init.d/samba start |
128 | |
129 | Or add samba to RUN_DAEMONS in /etc/rcS.conf |
130 '----------------------------------------------------'
131 EOT
132 }
134 post_install_swat()
135 {
136 [ -f "$1/etc/lighttpd/lighttpd.conf" ] || return
138 [ ! grep -q /usr/share/samba/swat/ "$1/etc/lighttpd/lighttpd.conf" ] || return
140 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/swat/" => "/usr/share/samba/swat/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
142 [ -z "$1" ] || return
143 # Start Web server.
144 /etc/init.d/lighttpd stop
145 /etc/init.d/lighttpd start
146 }