Magellan Linux

Contents of /trunk/core/samba/samba-3.4.2-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3475 - (show annotations) (download)
Wed Oct 21 23:35:44 2009 UTC (14 years, 6 months ago) by niro
File size: 7050 byte(s)
-try to reduce size -> shared libs and explizit no debug info
1 # $Id$
2
3 PNAME="samba"
4 PVER="3.4.2"
5 PBUILD="r2"
6
7 PCATEGORIE="net-fs"
8 STATE="unstable"
9
10 DESCRIPTION="Samba provides seamless file and print services to SMB/CIFS clients."
11 HOMEPAGE="http://www.samba.org"
12
13 DEPEND=">= virtual/glibc
14 >= net-print/cups-1.4
15 >= dev-libs/popt-1.15
16 >= sys-libs/readline-6
17 >= app-admin/fam-2.7.0
18 >= dev-libs/openssl-0.9.8
19 >= net-dns/avahi-0.6.25"
20
21 SDEPEND=">= sys-dev/automake-4
22 >= sys-dev/autoconf-5
23 >= sys-apps/sed-4"
24
25 SRCFILE="${PNAME}-${PVER}.tar.gz"
26 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
27
28 FILESDIR="${SOURCEDIR}/samba"
29
30 sminclude mtools
31
32 SRC_URI=(
33 http://us1.samba.org/samba/ftp/stable/${SRCFILE}
34 mirror://${PNAME}/${SRCFILE}
35 mirror://${PNAME}/smb.conf-3.0.14a
36 mirror://${PNAME}/lmhosts
37 mirror://${PNAME}/smbusers
38 mirror://${PNAME}/samba.rc
39 # mirror://${PNAME}/samba-3.3.4-libdirsymlink.patch
40 # mirror://${PNAME}/samba-3.3.4-extrabins.patch
41 )
42
43 UP2DATE="updatecmd http://ftp.samba.org/samba/ftp | 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 # # patchwork
54 # mpatch samba-3.3.4-libdirsymlink.patch || die
55 # mpatch samba-3.3.4-extrabins.patch || die
56
57 # add our vendor suffix
58 sed -i "s:^\(SAMBA_VERSION_VENDOR_SUFFIX=\).*:\1\"magellan\":" ${SRCDIR}/source3/VERSION || die
59 cd ${SRCDIR}/source3
60 sh script/mkversion.sh || die
61
62 # compilation fix
63 # (u)mount.cifs is broken; missing include/version.h header
64 ln -snf ../include ${SRCDIR}/source3/client || die
65
66 # # reconfigure makefiles
67 # cd ${SRCDIR}/source
68 # autoreconf -I. -Ilib/replace || die
69 # sh autogen.sh || die
70 }
71
72 src_compile()
73 {
74 cd ${SRCDIR}/source3
75
76 # remove swat completely now; since we have no httpd server yet
77 # if really needed we make an extra package to save diskspace
78 # --disable-swat option is there, no patches needed anymore ;)
79 mconfigure \
80 --with-fhs \
81 --sysconfdir=/etc/samba \
82 --localstatedir=/var \
83 --with-configdir=/etc/samba \
84 --libdir=/usr/$(mlibdir)/samba \
85 --with-swatdir=/usr/share/doc/${PNAME}-${PVER}/swat \
86 --with-piddir=/var/run/samba \
87 --with-lockdir=/var/cache/samba \
88 --with-logfilebase=/var/log/samba \
89 --with-privatedir=/var/lib/samba/private \
90 --enable-shared-libs \
91 --with-cifsmount \
92 --with-automount \
93 --with-libsmbclient \
94 --with-syslog \
95 --without-acl-support \
96 --enable-cups \
97 --without-krb5 \
98 --without-ldap \
99 --with-readline \
100 --with-winbind \
101 --without-pam \
102 --without-pam_smbpass \
103 --with-quotas \
104 --with-sys-quotas \
105 --with-cifsmount=no \
106 --disable-swat \
107 --enable-avahi \
108 --disable-developer \
109 --disable-dmalloc \
110 || die
111
112 mmake proto || die
113 mmake everything || die
114
115 # build mount.cifs separatly to fix pic issues
116 mmake bin/mount.cifs || die
117 mmake bin/umount.cifs || die
118 }
119
120 src_install()
121 {
122 cd ${SRCDIR}/source3
123
124 # needed directories
125 minstalldir /etc/samba || die
126 minstalldir /sbin || die
127 minstalldir /usr/$(mlibdir)/cups/backend || die
128 minstalldir /usr/share/doc/${PNAME}-${PVER}/examples || die
129
130 # needed directories by samba at runtime
131 mkeepdir /var/log/samba || die
132 mkeepdir /var/run/samba || die
133 mkeepdir /var/cache/samba || die
134 mkeepdir /var/lib/samba/netlogon || die
135 mkeepdir /var/lib/samba/profiles || die
136 mkeepdir /var/lib/samba/printers/W32X86 || die
137 mkeepdir /var/lib/samba/printers/WIN40 || die
138 mkeepdir /var/lib/samba/printers/W32ALPHA || die
139 mkeepdir /var/lib/samba/printers/W32MIPS || die
140 mkeepdir /var/lib/samba/printers/W32PPC || die
141 mkeepdir /var/lib/samba/private || die
142 mkeepdir /var/spool/samba || die
143
144 # fix permissions
145 mchmod 0700 /var/lib/samba/private || die
146 mchmod 1777 /var/spool/samba || die
147
148 make DESTDIR=${BINDIR} install-everything || die
149
150 # if exist remove *.old binaries
151 if [[ -n $(find ${BINDIR}/usr/bin -type f -name '*.old') ]]
152 then
153 for i in ${BINDIR}/usr/bin/*.old
154 do
155 [[ -e ${i} ]] && rm -f ${i} || die
156 done
157 fi
158
159 # install wins nsswitch extensions
160 minstalldir /usr/$(mlibdir) || die
161 minstallfile ${SRCDIR}/nsswitch/libnss_wins.so /usr/$(mlibdir) || die
162 mlink libnss_wins.so /usr/$(mlibdir)/libnss_wins.so.2 || die
163 minstallfile ${SRCDIR}/nsswitch/libnss_winbind.so /usr/$(mlibdir) || die
164 mlink libnss_winbind.so /usr/$(mlibdir)/libnss_winbind.so.2 || die
165
166 # install cifs tools
167 minstallexec bin/mount.cifs || die
168 minstallexec bin/umount.cifs || die
169 mchmod 4755 /usr/bin/mount.cifs || die
170 mchmod 4755 /usr/bin/umount.cifs || die
171
172 # add support for mount
173 mlink ../usr/bin/mount.cifs /sbin/mount.cifs || die
174
175 # samba doesn't create these symlinks anymore
176 mlink samba/libsmbclient.so /usr/$(mlibdir)/libsmbclient.so.0 || die
177 mlink samba/libsmbclient.so /usr/$(mlibdir)/libsmbclient.so || die
178 mlink samba/libtalloc.so /usr/$(mlibdir)/libtalloc.so.1 || die
179 mlink samba/libtalloc.so /usr/$(mlibdir)/libtalloc.so || die
180 mlink samba/libtdb.so /usr/$(mlibdir)/libtdb.so.1 || die
181 mlink samba/libtdb.so /usr/$(mlibdir)/libtdb.so || die
182 mlink samba/libwbclient.so /usr/$(mlibdir)/libwbclient.so.0 || die
183 mlink samba/libwbclient.so /usr/$(mlibdir)/libwbclient.so || die
184
185 # add cups printing support
186 mlink ../../../bin/smbspool /usr/$(mlibdir)/cups/backend/smb || die
187
188 # install our config files
189 # fake smb.conf to get smbmount work
190 memptyfile /etc/samba/smb.conf || die
191
192 # our smb example config
193 minstalletc smb.conf-3.0.14a smb.conf.example /etc/samba || die
194
195 # our lmhosts and smbusers config
196 minstalletc lmhosts lmhosts /etc/samba || die
197 minstalletc smbusers smbusers /etc/samba || die
198
199 # our initscript
200 minstallrc samba.rc samba || die
201
202 # # install example docs - not wanted anymore to save some space
203 # cp -a ${SRCDIR}/examples/* ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/examples || die
204 #
205 # # fix all permissions
206 # chmod -R 755 $(find ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/examples -type d) || die
207 # chmod -R 644 $(find ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/examples ! -type d) || die
208
209 # # remove unneeded docs, this saves some space ;)
210 # rm -rf ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/swat/help/{guide,howto,devel} || die
211 # rm -rf ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/swat/using_samba || die
212
213 # using a patch now
214 # # remove swat completely now; since we have no httpd server yet
215 # # if really needed we make an extra package to save diskspace
216 # rm -f ${BINDIR}/usr/sbin/swat || die
217 # rm -f ${BINDIR}/usr/share/man/man8/swat.8 || die
218 # rm -rf ${BINDIR}/usr/share/doc/${PNAME}-${PVER}/swat || die
219
220 # other docs
221 cd ${SRCDIR}
222 minstalldocs COPYING Manifest README REVISION Read-Manifest-Now Roadmap WHATSNEW.txt || die
223 }
224
225 postinstall()
226 {
227 echo
228 echo "To initialize samba's password database, please run:"
229 echo " pdbedit --force-initialized-passwords"
230 echo
231 echo "If you experience client locks in file transfers _only_, try the parameter"
232 echo " use sendfile = no (man smb.conf(5), man sendfile(2))"
233 echo
234 echo "There also seem some problems with the smbfs implementation of the recent 2.6 kernels."
235 echo "If you experience problems (lockups) with smbfs, try cifs as an alternative."
236 echo
237 }

Properties

Name Value
svn:keywords Id