wok-next annotate samba/receipt @ rev 20286
remove ppp-dev, ppp-pam
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Nov 08 15:57:06 2017 +0100 (2017-11-08) |
parents | d5d0fe089938 |
children | da6f77539069 |
rev | line source |
---|---|
al@19850 | 1 # SliTaz package receipt v2. |
pascal@1250 | 2 |
pascal@1250 | 3 PACKAGE="samba" |
al@19850 | 4 VERSION="4.6.7" |
pascal@1250 | 5 CATEGORY="system-tools" |
al@19850 | 6 SHORT_DESC="File and print services with SMB/CIFS" |
pascal@1250 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@14999 | 8 LICENSE="GPL3" |
al@19850 | 9 WEB_SITE="https://www.samba.org/" |
al@19850 | 10 BUGS="Open directory needs MIT kerberos support (krb5)" |
al@19850 | 11 COOKOPTS="!menus" |
al@19850 | 12 |
pascal@1250 | 13 TARBALL="$PACKAGE-$VERSION.tar.gz" |
al@19850 | 14 WGET_URL="https://download.samba.org/pub/samba/stable/$TARBALL" |
pascal@1250 | 15 |
al@19850 | 16 BUILD_DEPENDS="python-dev perl acl-dev docbook-xsl openldap-dev \ |
al@19850 | 17 gnutls-dev krb5-dev cyrus-sasl-dev zlib-dev popt-dev libtdb-dev talloc-dev \ |
pascal@20273 | 18 libgcrypt-dev nss-dev cups-dev dbus-dev pam pam-dev" |
pascal@20273 | 19 SPLIT="samba samba-pam samba-dev" # TODO: swat |
al@19850 | 20 |
al@19850 | 21 version() { |
al@19850 | 22 wget -O- -q https://download.samba.org/pub/samba/ | \ |
al@19850 | 23 sed '/LATEST-IS-SAMBA/!d; s|.*SAMBA-\([^<]*\).*|\1|' |
al@19850 | 24 } |
pascal@10454 | 25 |
pascal@1250 | 26 # Rules to configure and make the package. |
pascal@1250 | 27 compile_rules() |
pascal@1250 | 28 { |
al@19850 | 29 # http://www.linuxfromscratch.org/blfs/view/stable/basicnet/samba.html |
al@19850 | 30 |
pascal@20273 | 31 cp -a $src $src-pam |
al@19850 | 32 ./configure \ |
al@19850 | 33 --prefix=/usr \ |
al@19850 | 34 --sysconfdir=/etc \ |
al@19850 | 35 --localstatedir=/var \ |
al@19850 | 36 --with-piddir=/run/samba \ |
al@19850 | 37 --with-pammodulesdir=/lib/security \ |
al@19850 | 38 --enable-fhs \ |
pascal@20273 | 39 --without-pam \ |
al@19850 | 40 --without-ad-dc \ |
al@19850 | 41 --without-systemd \ |
al@19850 | 42 --enable-selftest \ |
al@19850 | 43 $CONFIGURE_ARGS && |
al@19850 | 44 make && make install || return 1 |
al@19850 | 45 |
pascal@20273 | 46 cd $src-pam |
pascal@20273 | 47 ./configure \ |
pascal@20273 | 48 --prefix=/usr \ |
pascal@20273 | 49 --sysconfdir=/etc \ |
pascal@20273 | 50 --localstatedir=/var \ |
pascal@20273 | 51 --with-piddir=/run/samba \ |
pascal@20273 | 52 --with-pammodulesdir=/lib/security \ |
pascal@20273 | 53 --enable-fhs \ |
pascal@20273 | 54 --with-pam \ |
pascal@20273 | 55 --without-ad-dc \ |
pascal@20273 | 56 --without-systemd \ |
pascal@20273 | 57 --enable-selftest \ |
pascal@20273 | 58 $CONFIGURE_ARGS && |
pascal@20279 | 59 make && make DESTDIR=$DESTDIR-pam install || return 1 |
al@19850 | 60 |
pascal@20273 | 61 for inst in $install $install-pam ; do |
pascal@20273 | 62 mkdir -p $inst/lib |
pascal@20273 | 63 mv $inst/usr/lib/libnss_wins.so* $inst/usr/lib/libnss_winbind.so* \ |
pascal@20273 | 64 $inst/lib |
pascal@20273 | 65 ln -sf ../../lib/libnss_winbind.so.2 $inst/usr/lib/libnss_winbind.so |
pascal@20273 | 66 ln -sf ../../lib/libnss_wins.so.2 $inst/usr/lib/libnss_wins.so |
al@19850 | 67 |
pascal@20273 | 68 install -m644 examples/smb.conf.default $inst/etc/samba |
al@19850 | 69 |
pascal@20273 | 70 mkdir -pv $inst/etc/openldap/schema |
pascal@20273 | 71 cp examples/LDAP/README $inst/etc/openldap/schema/README.LDAP |
pascal@20273 | 72 cp examples/LDAP/samba* $inst/etc/openldap/schema |
pascal@20273 | 73 cp -r examples/LDAP/get* examples/LDAP/ol* $inst/etc/openldap/schema |
al@19850 | 74 |
pascal@20273 | 75 cp -a $stuff/etc $inst |
al@19850 | 76 |
pascal@20273 | 77 # Symlink smbspool to cups backend |
pascal@20273 | 78 mkdir -p $inst/usr/lib/cups/backend |
pascal@20273 | 79 ln -sf /usr/bin/smbspool $inst/usr/lib/cups/backend/smb |
al@19850 | 80 |
pascal@20273 | 81 # for swat package |
pascal@20273 | 82 # icodir="$inst/usr/share/icons/hicolor/48x48/apps" |
pascal@20273 | 83 # mkdir -p $icodir |
pascal@20273 | 84 # cp $stuff/swat.png $icodir |
pascal@20273 | 85 |
pascal@20273 | 86 chown -R root:root $inst |
pascal@20273 | 87 done |
pascal@1250 | 88 } |
pascal@1250 | 89 |
pascal@1250 | 90 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@1250 | 91 genpkg_rules() |
pascal@1250 | 92 { |
al@19850 | 93 # Note, packages samba-common, smbclient was removed due to circular dependencies: |
al@19850 | 94 # smbclient <--> samba <--> samba-common |
al@19850 | 95 case $PACKAGE in |
al@19850 | 96 # smbclient) |
al@19850 | 97 # copy smbclient smbspool smbget smbtree smbcacls smbcquotas smbtar \ |
al@19850 | 98 # rpcclient net nmblookup libnetapi.so* libsmbclient.so* smb |
al@19850 | 99 # CAT="network|client" |
al@19850 | 100 # DEPENDS="samba libldap libtdb popt talloc" |
al@19850 | 101 # ;; |
al@19850 | 102 # swat) |
al@19850 | 103 # copy swat/ swat.desktop swat.png |
al@19850 | 104 # CAT="development|Samba Web Administration Tool" |
al@19850 | 105 # DEPENDS="samba" |
al@19850 | 106 # ;; |
al@19850 | 107 samba) |
al@19850 | 108 copy @std |
al@19850 | 109 # remove_already_packed |
al@19850 | 110 DEPENDS="acl attr dbus libcups libgnutls libldap libtdb ncurses \ |
al@19850 | 111 ncurses-libform ncurses-libpanel perl popt python talloc \ |
al@19850 | 112 talloc-python zlib" |
al@19850 | 113 PROVIDE="samba-common smbclient" |
al@19850 | 114 TAZPANEL_DAEMON="man|edit::/etc/samba/smb.conf|web::$WEB_SITE" |
al@19850 | 115 CONFIG_FILES="/etc/samba/smb.conf" |
al@19850 | 116 ;; |
pascal@20275 | 117 samba-pam) |
pascal@20277 | 118 CAT="system-tools|using PAM" |
pascal@20274 | 119 install=$install-pam copy @std |
pascal@20273 | 120 # remove by hand already packed files... |
pascal@20273 | 121 DEPENDS="acl attr dbus libcups libgnutls libldap libtdb ncurses \ |
pascal@20273 | 122 ncurses-libform ncurses-libpanel perl popt python talloc \ |
pascal@20273 | 123 talloc-python zlib pam" |
pascal@20273 | 124 PROVIDE="samba:pam samba-common smbclient" |
pascal@20273 | 125 TAZPANEL_DAEMON="man::samba|edit::/etc/samba/smb.conf|web::$WEB_SITE" |
pascal@20273 | 126 CONFIG_FILES="/etc/samba/smb.conf" |
pascal@20273 | 127 ;; |
al@19850 | 128 *-dev) |
al@19850 | 129 copy @dev |
al@19850 | 130 DEPENDS="samba talloc-dev" |
al@19850 | 131 ;; |
al@19850 | 132 esac |
pascal@1250 | 133 } |
pascal@1250 | 134 |
pascal@1250 | 135 # Pre and post install commands for Tazpkg. |
al@19850 | 136 post_install_samba() { |
al@19850 | 137 [ -n "$quiet" ] || cat <<EOT |
pascal@1250 | 138 |
al@19850 | 139 .----------------------------------------------------. |
al@19850 | 140 | The main configuration file is /etc/samba/smb.conf | |
al@19850 | 141 |----------------------------------------------------| |
al@19850 | 142 | To start samba server you can run: | |
al@19850 | 143 | /etc/init.d/samba start | |
al@19850 | 144 | | |
al@19850 | 145 | Or add samba to RUN_DAEMONS in /etc/rcS.conf | |
al@19850 | 146 '----------------------------------------------------' |
al@19850 | 147 EOT |
al@19850 | 148 } |
pascal@1250 | 149 |
al@19850 | 150 post_install_swat() { |
al@19850 | 151 [ -f "$1/etc/lighttpd/lighttpd.conf" ] || return |
al@19850 | 152 |
al@19850 | 153 [ ! grep -q /usr/share/samba/swat/ "$1/etc/lighttpd/lighttpd.conf" ] || return |
al@19850 | 154 |
al@19850 | 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" |
al@19850 | 156 |
al@19850 | 157 [ -z "$1" ] || return |
al@19850 | 158 # Start Web server. |
al@19850 | 159 /etc/init.d/lighttpd stop |
al@19850 | 160 /etc/init.d/lighttpd start |
pascal@1250 | 161 } |