Contents of /smage/trunk/core/samba/samba-3.5.16-r1.smage2
Parent Directory | Revision Log
Revision 4002 -
(show annotations)
(download)
Mon Aug 6 09:06:19 2012 UTC (12 years, 1 month ago) by niro
File size: 3469 byte(s)
Mon Aug 6 09:06:19 2012 UTC (12 years, 1 month ago) by niro
File size: 3469 byte(s)
-fixed dependencies and removed deprecated variables
1 | # $Id$ |
2 | |
3 | PNAME="samba" |
4 | PVER="3.5.16" |
5 | PBUILD="r1" |
6 | |
7 | PCAT="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 | >= dev-libs/libcap-2" |
16 | |
17 | SDEPEND=">= sys-dev/automake-4 |
18 | >= sys-dev/autoconf-5 |
19 | >= virtual/sed" |
20 | |
21 | SRCFILE="${PNAME}-${PVER}.tar.gz" |
22 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
23 | |
24 | FILESDIR="${SOURCEDIR}/samba" |
25 | |
26 | ALX_PKG_KEEP="etc/samba/smb.conf |
27 | etc/rc.d/init.d/nmbd |
28 | usr/bin/net |
29 | usr/sbin/nmbd |
30 | var/run/samba |
31 | var/cache/samba |
32 | var/lib/samba" |
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 | preinstall() |
140 | { |
141 | add_conf_prot_ignore /etc/samba/smb.conf |
142 | } |
143 | |
144 | postinstall() |
145 | { |
146 | mstartservice nmbd |
147 | } |
148 | |
149 | postremove() |
150 | { |
151 | mstopservice nmbd |
152 | } |