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