void-packages/srcpkgs/samba/template

104 lines
3 KiB
Text
Raw Normal View History

2010-12-13 22:41:22 +00:00
# Template file for 'samba'
pkgname=samba
2013-01-31 09:48:12 +00:00
version=3.6.12
revision=2
2010-12-13 22:41:22 +00:00
build_wrksrc=source3
build_style=gnu-configure
configure_args="--with-fhs --with-pam --with-pam_smbpass --with-ldap
2012-12-11 13:13:39 +00:00
--with-configdir=/etc/samba --with-lockdir=/var/samba
--with-cachedir=/var/samba --with-nmbdsocketdir=/run/samba/socket
--with-statedir=/var/samba --with-piddir=/run/samba --with-dnsupdate
--with-pammodulesdir=/usr/lib/security --with-automount --disable-swat
--with-syslog --enable-external-libtalloc --with-quotas --enable-cups
--enable-external-libtdb --disable-fam --with-ads --with-acl-support
--with-shared-modules=idmap_ad,idmap_adex,idmap_rid,idmap_hash,idmap_tdb2"
2010-12-13 22:41:22 +00:00
short_desc="SMB/CIFS file, print, and login server for Unix"
maintainer="Juan RP <xtraeme@gmail.com>"
2012-05-02 06:57:15 +00:00
license="GPL-3"
2012-07-09 21:37:57 +00:00
homepage="http://www.samba.org"
distfiles="http://us1.samba.org/samba/ftp/stable/$pkgname-$version.tar.gz"
2013-01-31 09:48:12 +00:00
checksum=6ff797c1772613bd5172d2c8b900fd56bf096d7252faee8b47c4925a4fdc9f8b
2010-12-13 22:41:22 +00:00
2012-12-11 13:17:38 +00:00
makedepends="pkg-config perl readline-devel python-devel libcap-devel
popt-devel e2fsprogs-devel mit-krb5-devel>=1.10.1 libldap-devel pam-devel
acl-devel avahi-libs-devel tdb-devel talloc-devel cups-devel"
2012-12-11 13:13:39 +00:00
post_install() {
cd ${wrksrc}
2012-12-11 13:13:39 +00:00
# conf file
cat examples/smb.conf.default | \
sed 's|log file = .*$|log file = /var/log/samba/%m.log|g' > \
${DESTDIR}/etc/samba/smb.conf
# fix logrotate
sed -i -e 's|log.%m|%m.log|g' ${DESTDIR}/etc/samba/smb.conf
# fix spool directory
sed -i 's|/usr/spool/samba|/var/spool/samba|g' \
${DESTDIR}/etc/samba/smb.conf
# nsswitch libraries
2012-07-09 21:37:57 +00:00
vinstall nsswitch/libnss_wins.so 755 usr/lib
ln -s libnss_wins.so ${DESTDIR}/usr/lib/libnss_wins.so.2
2012-07-09 21:37:57 +00:00
vinstall nsswitch/libnss_winbind.so 755 usr/lib
ln -s libnss_winbind.so ${DESTDIR}/usr/lib/libnss_winbind.so.2
# winbind krb5 locator
vinstall source3/bin/winbind_krb5_locator.so 755 \
usr/lib/krb5/plugins/libkrb5
# Remove unused manpages
2010-12-13 22:41:22 +00:00
rm -f ${DESTDIR}/usr/share/man/man8/tdb*
rm -f ${DESTDIR}/usr/share/man/man8/swat*
# systemd units
for f in nmbd smbd winbindd; do
2012-07-09 21:37:57 +00:00
vinstall ${FILESDIR}/${f}.service 644 usr/lib/systemd/system
done
# systemd tmpfiles
vinstall ${FILESDIR}/samba.tmpfiles 644 usr/lib/tmpfiles.d samba.conf
# PAM support
vinstall ${FILESDIR}/samba.pam 644 etc/pam.d samba
2010-12-13 22:41:22 +00:00
}
smbclient_package() {
short_desc="Command-line SMB/CIFS clients for Unix"
pkg_install() {
vmove usr/bin
vmove usr/share/man/man1
}
}
libsmbclient_package() {
short_desc="Shared libraries for communication with SMB/CIFS servers"
depends="mit-krb5-libs>=1.10.1"
pkg_install() {
vmove "usr/lib/libwbclient.so*"
vmove "usr/lib/libsmbclient.so*"
vmove usr/share/man/man7/libsmbclient.7
}
}
samba-devel_package() {
depends="libsmbclient>=${version}"
short_desc="${short_desc} - development files"
pkg_install() {
vmove usr/include
}
}
samba_package() {
conf_files="/etc/samba/smb.conf /etc/pam.d/samba"
# Don't restart services automatically.
systemd_services="
nmbd.service off
smbd.service off
winbindd.service off"
pkg_install() {
vmove etc
vmove usr
}
}