Magellan Linux

Contents of /smage/trunk/core/samba/samba-3.6.0-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3174 - (show annotations) (download)
Mon Sep 12 09:32:58 2011 UTC (12 years, 9 months ago) by niro
File size: 3596 byte(s)
-keep neccessary libs to run nmbd
1 # $Id$
2
3 PNAME="samba"
4 PVER="3.6.0"
5 PBUILD="r1"
6
7 PCATEGORIE="net-fs"
8
9 DESCRIPTION="Samba provides seamless file and print services to SMB/CIFS clients."
10 HOMEPAGE="http://www.samba.org"
11
12 DEPEND=">= virtual/glibc
13 >= dev-libs/popt-1.16
14 >= sys-libs/ncurses-5.9"
15
16 SDEPEND=">= sys-dev/automake-4
17 >= sys-dev/autoconf-5
18 >= sys-apps/sed-4"
19
20 SRCFILE="${PNAME}-${PVER}.tar.gz"
21 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
22
23 FILESDIR="${SOURCEDIR}/samba"
24
25 ALX_ONLY_KEEP="etc/samba/smb.conf
26 etc/rc.d/init.d/nmbd
27 usr/bin/net
28 usr/sbin/nmbd
29 usr/$(mlibdir)/samba/libtalloc.so
30 usr/$(mlibdir)/samba/libtalloc.so.*
31 usr/$(mlibdir)/samba/libdtdb.so
32 usr/$(mlibdir)/samba/libdtdb.so.*
33 var/run/samba
34 var/cache/samba
35 var/lib/samba"
36 sminclude mtools alx-split
37
38 SRC_URI=(
39 http://us1.samba.org/samba/ftp/stable/${SRCFILE}
40 mirror://${PNAME}/${SRCFILE}
41 )
42
43 UP2DATE="updatecmd http://ftp.samba.org/pub/samba | grep ${PNAME}-[0-9].* | lasttarball gz"
44
45 src_prepare()
46 {
47 munpack ${SRCFILE} || die
48 cd ${SRCDIR}
49
50 # examples: to be copied as docs
51 rm -rf ${SRCDIR}/examples.ORIG || die
52
53 # add our vendor suffix
54 sed -i "s:^\(SAMBA_VERSION_VENDOR_SUFFIX=\).*:\1\"magellan\":" ${SRCDIR}/source3/VERSION || die
55 cd ${SRCDIR}/source3
56 sh script/mkversion.sh || die
57
58 # compilation fix
59 # (u)mount.cifs is broken; missing include/version.h header
60 ln -snf ../include ${SRCDIR}/source3/client || die
61 }
62
63 src_compile()
64 {
65 cd ${SRCDIR}/source3
66
67 # remove swat completely now; since we have no httpd server yet
68 # if really needed we make an extra package to save diskspace
69 # --disable-swat option is there, no patches needed anymore ;)
70 mconfigure \
71 --with-fhs \
72 --sysconfdir=/etc/samba \
73 --localstatedir=/var \
74 --with-configdir=/etc/samba \
75 --libdir=/usr/$(mlibdir)/samba \
76 --with-swatdir=/usr/share/doc/${PNAME}-${PVER}/swat \
77 --with-piddir=/var/run/samba \
78 --with-lockdir=/var/cache/samba \
79 --with-logfilebase=/var/log/samba \
80 --with-privatedir=/var/lib/samba/private \
81 --enable-shared-libs \
82 --without-cifsmount \
83 --without-automount \
84 --without-libsmbclient \
85 --without-syslog \
86 --without-acl-support \
87 --disable-cups \
88 --without-krb5 \
89 --without-ldap \
90 --without-readline \
91 --without-winbind \
92 --without-pam \
93 --without-pam_smbpass \
94 --without-quotas \
95 --without-sys-quotas \
96 --disable-swat \
97 --disable-avahi \
98 --disable-developer \
99 --disable-dmalloc \
100 || die
101
102 mmake proto || die
103 mmake everything || die
104 }
105
106 alx_generic_src_install()
107 {
108 cd ${SRCDIR}/source3
109
110 # needed directories by samba at runtime
111 mkeepdir /var/run/samba || die
112 mkeepdir /var/lib/samba || die
113 mkeepdir /var/cache/samba || die
114
115 make DESTDIR=${BINDIR} install-everything || die
116
117 # if exist remove *.old binaries
118 if [[ -n $(find ${BINDIR}/usr/bin -type f -name '*.old') ]]
119 then
120 for i in ${BINDIR}/usr/bin/*.old
121 do
122 [[ -e ${i} ]] && rm -f ${i} || die
123 done
124 fi
125
126 # our initscript
127 minstalldir /etc/rc.d/init.d/|| die
128 mcinjectexec nmbd.rc /etc/rc.d/init.d/nmbd || die
129
130 # create a mininmal configuration to get nmbd working
131 minstalldir /etc/samba || die
132 echo '[global]' > ${BINDIR}/etc/samba/smb.conf || die
133 echo 'workgroup = WORKGROUP' >> ${BINDIR}/etc/samba/smb.conf || die
134 echo '#netbios name = <name_of_this_server>' >> ${BINDIR}/etc/samba/smb.conf || die
135 echo 'dns proxy = no' >> ${BINDIR}/etc/samba/smb.conf || die
136
137 # other docs
138 cd ${SRCDIR}
139 minstalldocs COPYING Manifest README REVISION Read-Manifest-Now Roadmap WHATSNEW.txt || die
140 }
141
142 preinstall()
143 {
144 add_conf_prot_ignore /etc/samba/smb.conf
145 }
146
147 postinstall()
148 {
149 mstartservice nmbd
150 }
151
152 postremove()
153 {
154 mstopservice nmbd
155 }