void-packages/srcpkgs/cifs-utils/template

34 lines
1.2 KiB
Bash

# Template file for 'cifs-utils'
pkgname=cifs-utils
version=6.6
revision=1
build_style=gnu-configure
configure_args="--sbindir=/usr/bin"
make_install_args="ROOTSBINDIR=/usr/bin"
hostmakedepends="pkg-config libcap-ng-devel"
makedepends="mit-krb5-devel talloc-devel libcap-ng-devel samba-devel keyutils-devel pam-devel"
short_desc="CIFS filesystem user-space tools"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
license="GPL-2"
homepage="http://wiki.samba.org/index.php/LinuxCIFS_utils"
distfiles="https://ftp.samba.org/pub/linux-cifs/$pkgname/$pkgname-$version.tar.bz2"
checksum=d07152a807de6840566bbcc69a97ff6fa17fca4e09ceb4641d74882a83e67125
pre_configure() {
# Fix musl build
sed -i ${wrksrc}/mtab.c \
-e "/#include <stdlib.h>/a #include <limits.h>" \
-e "/#include <stdlib.h>/a #include <paths.h>"
sed -i ${wrksrc}/getcifsacl.c \
-e "/#include <stdlib.h>/a #include <endian.h>" \
-e "/#include <stdlib.h>/a #include <linux/limits.h>"
sed -i ${wrksrc}/setcifsacl.c \
-e "/#include <stdlib.h>/a #include <paths.h>" \
-e "/#include <stdlib.h>/a #include <endian.h>" \
-e "/#include <stdlib.h>/a #include <linux/limits.h>"
}
post_install() {
chmod +s ${DESTDIR}/usr/bin/mount.cifs
rm -rf ${DESTDIR}/usr/include
}