Magellan Linux

Contents of /smage/tags/alx-0_6_0/core/samba/samba-3.5.9-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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