wok-next view samba/receipt @ rev 20299

Up remmina (1.2.0-rcgit.24)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Nov 09 22:26:00 2017 +0100 (2017-11-09)
parents d5d0fe089938
children da6f77539069
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 pam pam-dev"
19 SPLIT="samba samba-pam 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 cp -a $src $src-pam
32 ./configure \
33 --prefix=/usr \
34 --sysconfdir=/etc \
35 --localstatedir=/var \
36 --with-piddir=/run/samba \
37 --with-pammodulesdir=/lib/security \
38 --enable-fhs \
39 --without-pam \
40 --without-ad-dc \
41 --without-systemd \
42 --enable-selftest \
43 $CONFIGURE_ARGS &&
44 make && make install || return 1
46 cd $src-pam
47 ./configure \
48 --prefix=/usr \
49 --sysconfdir=/etc \
50 --localstatedir=/var \
51 --with-piddir=/run/samba \
52 --with-pammodulesdir=/lib/security \
53 --enable-fhs \
54 --with-pam \
55 --without-ad-dc \
56 --without-systemd \
57 --enable-selftest \
58 $CONFIGURE_ARGS &&
59 make && make DESTDIR=$DESTDIR-pam install || return 1
61 for inst in $install $install-pam ; do
62 mkdir -p $inst/lib
63 mv $inst/usr/lib/libnss_wins.so* $inst/usr/lib/libnss_winbind.so* \
64 $inst/lib
65 ln -sf ../../lib/libnss_winbind.so.2 $inst/usr/lib/libnss_winbind.so
66 ln -sf ../../lib/libnss_wins.so.2 $inst/usr/lib/libnss_wins.so
68 install -m644 examples/smb.conf.default $inst/etc/samba
70 mkdir -pv $inst/etc/openldap/schema
71 cp examples/LDAP/README $inst/etc/openldap/schema/README.LDAP
72 cp examples/LDAP/samba* $inst/etc/openldap/schema
73 cp -r examples/LDAP/get* examples/LDAP/ol* $inst/etc/openldap/schema
75 cp -a $stuff/etc $inst
77 # Symlink smbspool to cups backend
78 mkdir -p $inst/usr/lib/cups/backend
79 ln -sf /usr/bin/smbspool $inst/usr/lib/cups/backend/smb
81 # for swat package
82 # icodir="$inst/usr/share/icons/hicolor/48x48/apps"
83 # mkdir -p $icodir
84 # cp $stuff/swat.png $icodir
86 chown -R root:root $inst
87 done
88 }
90 # Rules to gen a SliTaz package suitable for Tazpkg.
91 genpkg_rules()
92 {
93 # Note, packages samba-common, smbclient was removed due to circular dependencies:
94 # smbclient <--> samba <--> samba-common
95 case $PACKAGE in
96 # smbclient)
97 # copy smbclient smbspool smbget smbtree smbcacls smbcquotas smbtar \
98 # rpcclient net nmblookup libnetapi.so* libsmbclient.so* smb
99 # CAT="network|client"
100 # DEPENDS="samba libldap libtdb popt talloc"
101 # ;;
102 # swat)
103 # copy swat/ swat.desktop swat.png
104 # CAT="development|Samba Web Administration Tool"
105 # DEPENDS="samba"
106 # ;;
107 samba)
108 copy @std
109 # remove_already_packed
110 DEPENDS="acl attr dbus libcups libgnutls libldap libtdb ncurses \
111 ncurses-libform ncurses-libpanel perl popt python talloc \
112 talloc-python zlib"
113 PROVIDE="samba-common smbclient"
114 TAZPANEL_DAEMON="man|edit::/etc/samba/smb.conf|web::$WEB_SITE"
115 CONFIG_FILES="/etc/samba/smb.conf"
116 ;;
117 samba-pam)
118 CAT="system-tools|using PAM"
119 install=$install-pam copy @std
120 # remove by hand already packed files...
121 DEPENDS="acl attr dbus libcups libgnutls libldap libtdb ncurses \
122 ncurses-libform ncurses-libpanel perl popt python talloc \
123 talloc-python zlib pam"
124 PROVIDE="samba:pam samba-common smbclient"
125 TAZPANEL_DAEMON="man::samba|edit::/etc/samba/smb.conf|web::$WEB_SITE"
126 CONFIG_FILES="/etc/samba/smb.conf"
127 ;;
128 *-dev)
129 copy @dev
130 DEPENDS="samba talloc-dev"
131 ;;
132 esac
133 }
135 # Pre and post install commands for Tazpkg.
136 post_install_samba() {
137 [ -n "$quiet" ] || cat <<EOT
139 .----------------------------------------------------.
140 | The main configuration file is /etc/samba/smb.conf |
141 |----------------------------------------------------|
142 | To start samba server you can run: |
143 | /etc/init.d/samba start |
144 | |
145 | Or add samba to RUN_DAEMONS in /etc/rcS.conf |
146 '----------------------------------------------------'
147 EOT
148 }
150 post_install_swat() {
151 [ -f "$1/etc/lighttpd/lighttpd.conf" ] || return
153 [ ! grep -q /usr/share/samba/swat/ "$1/etc/lighttpd/lighttpd.conf" ] || return
155 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/swat/" => "/usr/share/samba/swat/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
157 [ -z "$1" ] || return
158 # Start Web server.
159 /etc/init.d/lighttpd stop
160 /etc/init.d/lighttpd start
161 }